pub struct Admin { /* private fields */ }Expand description
Admin instance builder
Implementations§
Source§impl Admin
impl Admin
Sourcepub fn items_per_page(self, count: usize) -> Self
pub fn items_per_page(self, count: usize) -> Self
Set items per page
Sourcepub fn max_items_per_page(self, count: usize) -> Self
pub fn max_items_per_page(self, count: usize) -> Self
Set the maximum items-per-page a client may request
Sourcepub fn require_auth(self, required: bool) -> Self
pub fn require_auth(self, required: bool) -> Self
Enable/disable authentication
Sourcepub fn data_source(self, source: Arc<dyn DataSource>) -> Self
pub fn data_source(self, source: Arc<dyn DataSource>) -> Self
Set the backing data source (defaults to an in-memory store)
Sourcepub fn register_model(self, model: ModelDefinition) -> Self
pub fn register_model(self, model: ModelDefinition) -> Self
Register a model with the admin
Sourcepub fn build(self) -> AdminInstance
pub fn build(self) -> AdminInstance
Build the admin instance
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Admin
impl !UnwindSafe for Admin
impl Freeze for Admin
impl Send for Admin
impl Sync for Admin
impl Unpin for Admin
impl UnsafeUnpin for Admin
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
impl<R, D> DepsPresent<D> for R
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging