pub enum Poll<T> {
Ready(T),
Pending,
}
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Indicates whether a value is available or if the current task has been
scheduled to receive a wakeup instead.
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Represents that a value is immediately ready.
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Represents that a value is not ready yet.
When a function returns Pending
, the function must also
ensure that the current task is scheduled to be awoken when
progress can be made.
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Change the ready value of this Poll
with the closure provided
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Returns whether this is Poll::Ready
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Returns whether this is Poll::Pending
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Change the success value of this Poll
with the closure provided
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Change the error value of this Poll
with the closure provided
Performs copy-assignment from source
. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the minimum of two values. Read more
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_trait
)
The type of this value when viewed as successful.
🔬 This is a nightly-only experimental API. (try_trait
)
The type of this value when viewed as failed.
🔬 This is a nightly-only experimental API. (try_trait
)
Applies the "?" operator. A return of Ok(t)
means that the execution should continue normally, and the result of ?
is the value t
. A return of Err(e)
means that execution should branch to the innermost enclosing catch
, or return from the function. Read more
🔬 This is a nightly-only experimental API. (try_trait
)
Wrap an error value to construct the composite result. For example, Result::Err(x)
and Result::from_error(x)
are equivalent. Read more
🔬 This is a nightly-only experimental API. (try_trait
)
Wrap an OK value to construct the composite result. For example, Result::Ok(x)
and Result::from_ok(x)
are equivalent. Read more
🔬 This is a nightly-only experimental API. (try_trait
)
The type of this value when viewed as successful.
🔬 This is a nightly-only experimental API. (try_trait
)
The type of this value when viewed as failed.
🔬 This is a nightly-only experimental API. (try_trait
)
Applies the "?" operator. A return of Ok(t)
means that the execution should continue normally, and the result of ?
is the value t
. A return of Err(e)
means that execution should branch to the innermost enclosing catch
, or return from the function. Read more
🔬 This is a nightly-only experimental API. (try_trait
)
Wrap an error value to construct the composite result. For example, Result::Err(x)
and Result::from_error(x)
are equivalent. Read more
🔬 This is a nightly-only experimental API. (try_trait
)
Wrap an OK value to construct the composite result. For example, Result::Ok(x)
and Result::from_ok(x)
are equivalent. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more