pub struct Inject<T> { /* private fields */ }Expand description
Wrapper type for automatic dependency injection in controllers and services.
ⓘ
pub struct UserController {
service: Inject<UserService>,
}Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Inject<T>
impl<T> RefUnwindSafe for Inject<T>where
T: RefUnwindSafe,
impl<T> Send for Inject<T>
impl<T> Sync for Inject<T>
impl<T> Unpin for Inject<T>
impl<T> UnsafeUnpin for Inject<T>
impl<T> UnwindSafe for Inject<T>where
T: RefUnwindSafe,
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