pub struct OnDropFuture<Ft, F>{ /* private fields */ }Expand description
Future wrapper that runs a callback if dropped before completion.
Implementations§
Source§impl<Ft, F> OnDropFuture<Ft, F>
impl<Ft, F> OnDropFuture<Ft, F>
Sourcepub fn new(fut: Ft, on_drop: F) -> OnDropFuture<Ft, F> ⓘ
pub fn new(fut: Ft, on_drop: F) -> OnDropFuture<Ft, F> ⓘ
Creates a new OnDropFuture that calls on_drop if fut is dropped
before it completes.
Trait Implementations§
Source§impl<Ft, F> Future for OnDropFuture<Ft, F>
impl<Ft, F> Future for OnDropFuture<Ft, F>
impl<'__pin, Ft, F> Unpin for OnDropFuture<Ft, F>
Auto Trait Implementations§
impl<Ft, F> !Freeze for OnDropFuture<Ft, F>
impl<Ft, F> !RefUnwindSafe for OnDropFuture<Ft, F>
impl<Ft, F> !Sync for OnDropFuture<Ft, F>
impl<Ft, F> Send for OnDropFuture<Ft, F>
impl<Ft, F> UnsafeUnpin for OnDropFuture<Ft, F>where
Ft: UnsafeUnpin,
F: UnsafeUnpin,
impl<Ft, F> UnwindSafe for OnDropFuture<Ft, F>where
Ft: UnwindSafe,
F: 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<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more