pub(crate) struct BlockingTask<T> {
func: Option<T>,
}
Expand description
Converts a function to a future that completes on poll.
Fields§
§func: Option<T>
Implementations§
source§impl<T> BlockingTask<T>
impl<T> BlockingTask<T>
sourcepub(crate) fn new(func: T) -> BlockingTask<T> ⓘ
pub(crate) fn new(func: T) -> BlockingTask<T> ⓘ
Initializes a new blocking task from the given function.
Trait Implementations§
source§impl<T, R> Future for BlockingTask<T>
impl<T, R> Future for BlockingTask<T>
impl<T> Unpin for BlockingTask<T>
Auto Trait Implementations§
impl<T> Freeze for BlockingTask<T>where
T: Freeze,
impl<T> RefUnwindSafe for BlockingTask<T>where
T: RefUnwindSafe,
impl<T> Send for BlockingTask<T>where
T: Send,
impl<T> Sync for BlockingTask<T>where
T: Sync,
impl<T> UnwindSafe for BlockingTask<T>where
T: 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,
§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