pub struct ModuleContext { /* private fields */ }Implementations§
Source§impl ModuleContext
impl ModuleContext
pub fn route(&mut self, router: Router)
Sourcepub fn actions<V: ViewSet>(
&mut self,
resource: &str,
name: &str,
config: ViewSetConfig<V>,
)
pub fn actions<V: ViewSet>( &mut self, resource: &str, name: &str, config: ViewSetConfig<V>, )
Register standalone typed actions without mounting model CRUD.
pub fn route_at_root(&mut self, router: Router)
pub fn signal(&mut self, signal: impl Into<String>, access: SignalAccess)
pub fn model<M: Model>(&mut self)
pub fn viewset<M, S>(&mut self, viewset: CrudViewSet<M, S>)where
M: Model<PrimaryKey: RestKey> + Send + Sync + 'static,
S: ModelSerializer<Model = M, Input = M> + ModelWriteSerializer<Model = M> + Serialize + Send + Sync + 'static,
pub fn viewset_with<V>(&mut self, viewset: V)
pub fn api_endpoints(&self) -> &[ApiEndpoint]
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ModuleContext
impl !UnwindSafe for ModuleContext
impl Forget for ModuleContext
impl Freeze for ModuleContext
impl Move for ModuleContext
impl Send for ModuleContext
impl Sync for ModuleContext
impl Unpin for ModuleContext
impl UnsafeUnpin for ModuleContext
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