2022-06-06 12:55:25 +02:00
|
|
|
pub mod derive_attr {
|
|
|
|
use bae::FromAttributes;
|
|
|
|
|
|
|
|
#[derive(
|
|
|
|
Debug,
|
|
|
|
Eq,
|
|
|
|
PartialEq,
|
|
|
|
FromAttributes,
|
|
|
|
Default
|
|
|
|
)]
|
|
|
|
pub struct ActixAdmin {
|
2022-06-06 15:25:37 +02:00
|
|
|
pub primary_key: Option<()>
|
|
|
|
//pub inner_type: Option<syn::Type>,
|
2022-06-06 12:55:25 +02:00
|
|
|
|
|
|
|
// Anything that implements `syn::parse::Parse` is supported.
|
|
|
|
//mandatory_type: syn::Type,
|
|
|
|
//mandatory_ident: syn::Ident,
|
|
|
|
|
|
|
|
// Fields wrapped in `Option` are optional and default to `None` if
|
|
|
|
// not specified in the attribute.
|
|
|
|
//optional_missing: Option<syn::Type>,
|
|
|
|
//optional_given: Option<syn::Type>,
|
|
|
|
|
|
|
|
// A "switch" is something that doesn't take arguments.
|
|
|
|
// All fields with type `Option<()>` are considered swiches.
|
|
|
|
// They default to `None`.
|
|
|
|
//switch: Option<()>,
|
|
|
|
}
|
|
|
|
}
|