tokio::net::addr

Type Alias ReadyFuture

Source
type ReadyFuture<T> = Ready<Result<T>>;

Aliased Type§

struct ReadyFuture<T>(/* private fields */);

Implementations

Source§

impl<T> Ready<T>

1.82.0 · Source

pub fn into_inner(self) -> T

Consumes the Ready, returning the wrapped value.

§Panics

Will panic if this Ready was already polled to completion.

§Examples
use std::future;

let a = future::ready(1);
assert_eq!(a.into_inner(), 1);

Trait Implementations

1.48.0 · Source§

impl<T> Clone for Ready<T>
where T: Clone,

Source§

fn clone(&self) -> Ready<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
1.48.0 · Source§

impl<T> Debug for Ready<T>
where T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
1.48.0 · Source§

impl<T> Future for Ready<T>

Source§

type Output = T

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Ready<T>>, _cx: &mut Context<'_>) -> Poll<T>

Attempts to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
1.48.0 · Source§

impl<T> Unpin for Ready<T>