pub struct AdminEntry {Show 16 fields
pub admin_name: &'static str,
pub display_name: &'static str,
pub singular_name: &'static str,
pub table: &'static str,
pub fields: &'static [AdminField],
pub core: bool,
pub list_display: &'static [&'static str],
pub list_filter: &'static [&'static str],
pub search_fields: &'static [&'static str],
pub search_index_column: Option<&'static str>,
pub ordering: &'static [&'static str],
pub list_per_page: usize,
pub readonly_fields: &'static [&'static str],
pub fieldsets: &'static [Fieldset],
pub bulk_actions: &'static [BulkAction],
pub inlines: &'static [Inline],
/* private fields */
}Expand description
Runtime metadata about one admin-registered model. Captures both
the AdminModel static surface and the super::ModelAdmin
customisation values at registration time, so handlers read every
per-model knob from this struct instead of re-resolving traits.
Fields§
§admin_name: &'static str§display_name: &'static str§singular_name: &'static str§table: &'static strSQL table name. For user-registered models this is <M as Model>::TABLE;
for the synthetic core User entry it’s "rustio_users".
fields: &'static [AdminField]§core: booltrue only for framework-owned entries (currently just User).
list_display: &'static [&'static str]ModelAdmin::list_display(). Empty → use every column on
fields; non-empty → use exactly the listed names in order.
list_filter: &'static [&'static str]ModelAdmin::list_filter(). Empty by default.
search_fields: &'static [&'static str]ModelAdmin::search_fields(). Empty by default.
search_index_column: Option<&'static str>ModelAdmin::search_index_column(). When Some, the
list-page search uses Postgres FTS against this tsvector
column instead of the default ILIKE OR-loop across
search_fields.
ordering: &'static [&'static str]ModelAdmin::ordering(). Strings parsed via
super::modeladmin::parse_order_spec.
list_per_page: usizeModelAdmin::list_per_page(). Default 50.
readonly_fields: &'static [&'static str]ModelAdmin::readonly_fields(). Empty by default.
fieldsets: &'static [Fieldset]ModelAdmin::fieldsets(). Empty → fall back to the
framework’s name-heuristic grouping.
bulk_actions: &'static [BulkAction]ModelAdmin::bulk_actions(). Empty by default — the bulk bar
only renders the framework’s built-in Delete.
inlines: &'static [Inline]ModelAdmin::inlines(). Empty by default — no related-
children section renders below the edit form. Project
authors opt in per parent model.
Auto Trait Implementations§
impl Freeze for AdminEntry
impl !RefUnwindSafe for AdminEntry
impl Send for AdminEntry
impl Sync for AdminEntry
impl Unpin for AdminEntry
impl UnsafeUnpin for AdminEntry
impl !UnwindSafe for AdminEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more