[−][src]Struct pasts::Task
A task that is either working or has completed.
Methods
impl<'a, F, O> Task<'a, F, O> where
F: Future<Output = O>,
[src]
F: Future<Output = O>,
pub fn set(&mut self, future: F)
[src]
Set a new future for this task.
pub fn poll(&mut self, cx: &mut Context) -> Poll<O>
[src]
Poll the future associated with this task if it hasn't completed.
pub fn is_wait(&self) -> bool
[src]
Return true if still have to wait for future.
pub fn is_done(&self) -> bool
[src]
Return true if future has completed.
Auto Trait Implementations
impl<'a, F, O> RefUnwindSafe for Task<'a, F, O> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<'a, F, O> Send for Task<'a, F, O> where
F: Send,
F: Send,
impl<'a, F, O> Sync for Task<'a, F, O> where
F: Sync,
F: Sync,
impl<'a, F, O> Unpin for Task<'a, F, O>
impl<'a, F, O> !UnwindSafe for Task<'a, F, O>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,