pub struct DefaultAdminModelManager<T> { /* private fields */ }Expand description
A default implementation of AdminModelManager for an AdminModel.
Implementations§
Source§impl<T> DefaultAdminModelManager<T>
impl<T> DefaultAdminModelManager<T>
Trait Implementations§
Source§impl<T: AdminModel + Send + Sync + 'static> AdminModelManager for DefaultAdminModelManager<T>
impl<T: AdminModel + Send + Sync + 'static> AdminModelManager for DefaultAdminModelManager<T>
Source§fn get_objects<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 Request,
) -> Pin<Box<dyn Future<Output = Result<Vec<Box<dyn AdminModel>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_objects<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 Request,
) -> Pin<Box<dyn Future<Output = Result<Vec<Box<dyn AdminModel>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the list of objects of this model.
Source§fn get_object_by_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 Request,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn AdminModel>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_object_by_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 Request,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn AdminModel>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Returns the object with the given ID.
Source§fn form_context(&self) -> Box<dyn FormContext>
fn form_context(&self) -> Box<dyn FormContext>
Returns an empty form context for this model.
Source§fn form_context_from_object(
&self,
object: Box<dyn AdminModel>,
) -> Box<dyn FormContext>
fn form_context_from_object( &self, object: Box<dyn AdminModel>, ) -> Box<dyn FormContext>
Returns a form context pre-filled with the data from given object. Read more
Source§fn save_from_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 mut Request,
object_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn FormContext>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_from_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 mut Request,
object_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn FormContext>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Saves the object by using the form data from given request. Read more
Source§fn remove_by_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 mut Request,
object_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn remove_by_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 mut Request,
object_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Removes the object with the given ID. Read more
Source§impl<T> Debug for DefaultAdminModelManager<T>where
PhantomData<T>: Debug,
impl<T> Debug for DefaultAdminModelManager<T>where
PhantomData<T>: Debug,
Auto Trait Implementations§
impl<T> Freeze for DefaultAdminModelManager<T>
impl<T> RefUnwindSafe for DefaultAdminModelManager<T>where
T: RefUnwindSafe,
impl<T> Send for DefaultAdminModelManager<T>where
T: Send,
impl<T> Sync for DefaultAdminModelManager<T>where
T: Sync,
impl<T> Unpin for DefaultAdminModelManager<T>where
T: Unpin,
impl<T> UnwindSafe for DefaultAdminModelManager<T>where
T: UnwindSafe,
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
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 moreSource§impl<T> IntoField<Auto<T>> for T
impl<T> IntoField<Auto<T>> for T
Source§fn into_field(self) -> Auto<T>
fn into_field(self) -> Auto<T>
Available on crate feature
db only.Converts the type to the field type.