pub struct Depends<T, C = DefaultDependencyConfig>(pub T, _);Expand description
Dependency injection extractor.
Tuple Fields§
§0: TImplementations§
Trait Implementations§
Source§impl<T, C> FromRequest for Depends<T, C>where
T: FromDependency,
C: DependsConfig,
impl<T, C> FromRequest for Depends<T, C>where
T: FromDependency,
C: DependsConfig,
Source§type Error = <T as FromDependency>::Error
type Error = <T as FromDependency>::Error
Error type when extraction fails.
Source§async fn from_request(
ctx: &RequestContext,
req: &mut Request,
) -> Result<Self, Self::Error>
async fn from_request( ctx: &RequestContext, req: &mut Request, ) -> Result<Self, Self::Error>
Extract a value from the request. Read more
Auto Trait Implementations§
impl<T, C> Freeze for Depends<T, C>where
T: Freeze,
impl<T, C> RefUnwindSafe for Depends<T, C>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<T, C> Send for Depends<T, C>
impl<T, C> Sync for Depends<T, C>
impl<T, C> Unpin for Depends<T, C>
impl<T, C> UnwindSafe for Depends<T, C>where
T: UnwindSafe,
C: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).