pub struct DemoController {
pub service: Arc<DemoService>,
}
Expand description
Demo controller that uses the enhanced #[inject] macro
Fields§
§service: Arc<DemoService>
Implementations§
Source§impl DemoController
impl DemoController
Sourcepub fn from_ioc_container(
container: &IocContainer,
_scope: Option<&ScopeId>,
) -> Result<Self, String>
pub fn from_ioc_container( container: &IocContainer, _scope: Option<&ScopeId>, ) -> Result<Self, String>
This method would be generated by the enhanced #[inject] macro
pub fn handle_request(&self) -> String
Auto Trait Implementations§
impl Freeze for DemoController
impl RefUnwindSafe for DemoController
impl Send for DemoController
impl Sync for DemoController
impl Unpin for DemoController
impl UnwindSafe for DemoController
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