pub struct DependsCleanup<T, C = DefaultDependencyConfig>(pub T, _);Expand description
Wrapper for dependencies that have cleanup callbacks.
DependsCleanup works like Depends but for types implementing
FromDependencyWithCleanup. It automatically registers cleanup
functions with the request’s cleanup stack.
Tuple Fields§
§0: TImplementations§
Source§impl<T, C> DependsCleanup<T, C>
impl<T, C> DependsCleanup<T, C>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Unwrap the inner value.
Trait Implementations§
Source§impl<T: Clone, C: Clone> Clone for DependsCleanup<T, C>
impl<T: Clone, C: Clone> Clone for DependsCleanup<T, C>
Source§fn clone(&self) -> DependsCleanup<T, C>
fn clone(&self) -> DependsCleanup<T, C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T, C> Deref for DependsCleanup<T, C>
impl<T, C> Deref for DependsCleanup<T, C>
Source§impl<T, C> DerefMut for DependsCleanup<T, C>
impl<T, C> DerefMut for DependsCleanup<T, C>
Source§impl<T, C> FromRequest for DependsCleanup<T, C>where
T: FromDependencyWithCleanup<Value = T>,
C: DependsConfig,
impl<T, C> FromRequest for DependsCleanup<T, C>where
T: FromDependencyWithCleanup<Value = T>,
C: DependsConfig,
Source§type Error = <T as FromDependencyWithCleanup>::Error
type Error = <T as FromDependencyWithCleanup>::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 DependsCleanup<T, C>where
T: Freeze,
impl<T, C> RefUnwindSafe for DependsCleanup<T, C>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<T, C> Send for DependsCleanup<T, C>
impl<T, C> Sync for DependsCleanup<T, C>
impl<T, C> Unpin for DependsCleanup<T, C>
impl<T, C> UnwindSafe for DependsCleanup<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).