pub struct ActixAdminViewModel {Show 13 fields
pub entity_name: String,
pub primary_key: String,
pub fields: &'static [ActixAdminViewModelField],
pub show_search: bool,
pub user_can_access: Option<fn(&Session) -> bool>,
pub user_can_create: Option<fn(&Session) -> bool>,
pub user_can_edit: Option<fn(&Session) -> bool>,
pub user_can_delete: Option<fn(&Session) -> bool>,
pub user_can_view_details: Option<fn(&Session) -> bool>,
pub user_can_export: Option<fn(&Session) -> bool>,
pub default_show_aside: bool,
pub inline_edit: bool,
pub bulk_actions: Vec<ActixAdminBulkAction>,
}Fields§
§entity_name: String§primary_key: String§fields: &'static [ActixAdminViewModelField]§show_search: bool§user_can_access: Option<fn(&Session) -> bool>Top-level page access. If set and returns false, the entity is
invisible and every route 401s. Auth-independent (i.e. also honored
when enable_auth = false).
user_can_create: Option<fn(&Session) -> bool>Per-action permissions. When None, the action defaults to the value of
user_can_access (or true if that is also None).
user_can_edit: Option<fn(&Session) -> bool>§user_can_delete: Option<fn(&Session) -> bool>§user_can_view_details: Option<fn(&Session) -> bool>§user_can_export: Option<fn(&Session) -> bool>§default_show_aside: bool§inline_edit: bool§bulk_actions: Vec<ActixAdminBulkAction>Bulk actions registered for this entity. Cloned into the ViewModel by
the builder when add_bulk_action_for_entity is called.
Trait Implementations§
Source§impl Clone for ActixAdminViewModel
impl Clone for ActixAdminViewModel
Source§fn clone(&self) -> ActixAdminViewModel
fn clone(&self) -> ActixAdminViewModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl From<ActixAdminViewModel> for ActixAdminViewModelSerializable
impl From<ActixAdminViewModel> for ActixAdminViewModelSerializable
Source§fn from(entity: ActixAdminViewModel) -> Self
fn from(entity: ActixAdminViewModel) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ActixAdminViewModel
impl RefUnwindSafe for ActixAdminViewModel
impl Send for ActixAdminViewModel
impl Sync for ActixAdminViewModel
impl Unpin for ActixAdminViewModel
impl UnsafeUnpin for ActixAdminViewModel
impl UnwindSafe for ActixAdminViewModel
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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