#[macro_export]
macro_rules! admin {
(
configure { $($_cfg:tt)* }
$(
$key:ident : $($model:ident)::+ => $form:path {
title: $title:literal
$(, create_form: $create_form_path:path)?
$(, edit_form: $edit_form_path:path)?
$(, list_display: [ $([$display_col:literal, $display_label:literal]),* $(,)? ])?
$(, list_filter: [ $([$filter_col:literal, $filter_label:literal $(, $entry_limit:literal)?]),* $(,)? ])?
$(,)?
}
)*
) => {
$(
const _: () = {
fn _check_types() {
fn _model(_: &$($model)::+) {}
fn _form(_: &$form) {}
}
};
)*
};
(
$(
$key:ident : $($model:ident)::+ => $form:path {
title: $title:literal
$(, create_form: $create_form_path:path)?
$(, edit_form: $edit_form_path:path)?
$(, list_display: [ $([$display_col:literal, $display_label:literal]),* $(,)? ])?
$(, list_filter: [ $([$filter_col:literal, $filter_label:literal $(, $entry_limit:literal)?]),* $(,)? ])?
$(,)?
}
)*
) => {
$(
const _: () = {
fn _check_types() {
fn _model(_: &$($model)::+) {}
fn _form(_: &$form) {}
}
};
)*
};
}