2022-06-06 12:55:25 +02:00
|
|
|
pub mod derive_attr {
|
|
|
|
use bae::FromAttributes;
|
|
|
|
|
|
|
|
#[derive(
|
|
|
|
Debug,
|
|
|
|
Eq,
|
|
|
|
PartialEq,
|
|
|
|
FromAttributes,
|
2022-07-17 22:12:18 +02:00
|
|
|
Default,
|
|
|
|
Clone
|
2022-06-06 12:55:25 +02:00
|
|
|
)]
|
|
|
|
pub struct ActixAdmin {
|
2022-07-17 22:12:18 +02:00
|
|
|
pub primary_key: Option<()>,
|
2022-07-21 19:01:05 +02:00
|
|
|
pub html_input_type: Option<syn::LitStr>,
|
2022-07-31 16:33:02 +02:00
|
|
|
pub select_list: Option<syn::LitStr>,
|
2022-08-20 23:31:45 +02:00
|
|
|
pub searchable: Option<()>,
|
2022-12-29 19:56:20 +01:00
|
|
|
pub textarea: Option<()>,
|
|
|
|
pub file_upload: Option<()>,
|
2023-01-15 14:11:23 +01:00
|
|
|
pub not_empty: Option<()>,
|
2023-01-15 14:18:46 +01:00
|
|
|
pub list_sort_position: Option<syn::LitStr>,
|
2023-02-15 12:18:24 +01:00
|
|
|
pub list_hide_column: Option<()>,
|
|
|
|
pub list_regex_mask: Option<syn::LitStr>
|
2022-06-06 15:25:37 +02:00
|
|
|
//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<()>,
|
|
|
|
}
|
|
|
|
}
|