pub struct UserModule;
Expand description
Example module demonstrating the module system
Trait Implementations§
Source§impl ServiceModule for UserModule
impl ServiceModule for UserModule
Source§fn description(&self) -> Option<&str>
fn description(&self) -> Option<&str>
Get module description
Source§fn configure(&self, services: &mut ServiceBindings)
fn configure(&self, services: &mut ServiceBindings)
Configure services for this module using ServiceBindings
Source§fn depends_on(&self) -> Vec<ModuleId>
fn depends_on(&self) -> Vec<ModuleId>
Get module dependencies (other modules this module depends on)
Source§fn initialize(
&self,
container: &IocContainer,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + '_>>
fn initialize( &self, container: &IocContainer, ) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + '_>>
Initialize module after all dependencies are loaded
Source§fn shutdown(
&self,
container: &IocContainer,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + '_>>
fn shutdown( &self, container: &IocContainer, ) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + '_>>
Cleanup module resources
Source§fn is_compatible_with(&self, other_version: &str) -> bool
fn is_compatible_with(&self, other_version: &str) -> bool
Check if module is compatible with given version
Source§fn metadata(&self) -> ModuleMetadatawhere
Self: Sized,
fn metadata(&self) -> ModuleMetadatawhere
Self: Sized,
Get module metadata
Auto Trait Implementations§
impl Freeze for UserModule
impl RefUnwindSafe for UserModule
impl Send for UserModule
impl Sync for UserModule
impl Unpin for UserModule
impl UnwindSafe for UserModule
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