mz_environmentd::http

Type Alias Delayed

Source
type Delayed<T> = Shared<Receiver<T>>;

Aliased Type§

struct Delayed<T> { /* private fields */ }

Implementations

Source§

impl<Fut> Shared<Fut>
where Fut: Future,

Source

pub fn peek(&self) -> Option<&<Fut as Future>::Output>

Returns Some containing a reference to this Shared’s output if it has already been computed by a clone or None if it hasn’t been computed yet or this Shared already returned its output from poll.

Source

pub fn downgrade(&self) -> Option<WeakShared<Fut>>

Creates a new WeakShared for this Shared.

Returns None if it has already been polled to completion.

Source

pub fn strong_count(&self) -> Option<usize>

Gets the number of strong pointers to this allocation.

Returns None if it has already been polled to completion.

§Safety

This method by itself is safe, but using it correctly requires extra care. Another thread can change the strong count at any time, including potentially between calling this method and acting on the result.

Source

pub fn weak_count(&self) -> Option<usize>

Gets the number of weak pointers to this allocation.

Returns None if it has already been polled to completion.

§Safety

This method by itself is safe, but using it correctly requires extra care. Another thread can change the weak count at any time, including potentially between calling this method and acting on the result.

Source

pub fn ptr_hash<H>(&self, state: &mut H)
where H: Hasher,

Hashes the internal state of this Shared in a way that’s compatible with ptr_eq.

Source

pub fn ptr_eq(&self, rhs: &Shared<Fut>) -> bool

Returns true if the two Shareds point to the same future (in a vein similar to Arc::ptr_eq).

Returns false if either Shared has terminated.

Trait Implementations

Source§

impl<Fut> Clone for Shared<Fut>
where Fut: Future,

Source§

fn clone(&self) -> Shared<Fut>

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
Source§

impl<Fut> Debug for Shared<Fut>
where Fut: Future,

Source§

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

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

impl<Fut> Drop for Shared<Fut>
where Fut: Future,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<Fut> FusedFuture for Shared<Fut>
where Fut: Future, <Fut as Future>::Output: Clone,

Source§

fn is_terminated(&self) -> bool

Returns true if the underlying future should no longer be polled.
Source§

impl<Fut> Future for Shared<Fut>
where Fut: Future, <Fut as Future>::Output: Clone,

Source§

type Output = <Fut as Future>::Output

The type of value produced on completion.
Source§

fn poll( self: Pin<&mut Shared<Fut>>, cx: &mut Context<'_>, ) -> Poll<<Shared<Fut> as Future>::Output>

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