pub struct AdminRoutes { /* private fields */ }Expand description
Admin route handler
Implementations§
Source§impl AdminRoutes
impl AdminRoutes
Sourcepub fn new(admin: AdminInstance) -> Self
pub fn new(admin: AdminInstance) -> Self
Create new admin routes
Sourcepub async fn dashboard(&self) -> DashboardView
pub async fn dashboard(&self) -> DashboardView
Handle dashboard request
Sourcepub async fn list(
&self,
model_name: &str,
params: ListParams,
) -> Option<ListView>
pub async fn list( &self, model_name: &str, params: ListParams, ) -> Option<ListView>
Handle model list request
Sourcepub async fn detail(&self, model_name: &str, id: &str) -> Option<DetailView>
pub async fn detail(&self, model_name: &str, id: &str) -> Option<DetailView>
Handle model detail/edit request
Sourcepub async fn create(&self, model_name: &str) -> Option<CreateView>
pub async fn create(&self, model_name: &str) -> Option<CreateView>
Handle create request
Auto Trait Implementations§
impl Freeze for AdminRoutes
impl RefUnwindSafe for AdminRoutes
impl Send for AdminRoutes
impl Sync for AdminRoutes
impl Unpin for AdminRoutes
impl UnwindSafe for AdminRoutes
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