pub trait WeightedFuture: Sealed {
    type Future: Future;

    // Required methods
    fn weight(&self) -> usize;
    fn into_components(self) -> (usize, Self::Future);
}
Expand description

A trait for types which can be converted into a Future and a weight.

Provided in case it’s necessary. This trait is only implemented for (usize, impl Future).

Required Associated Types§

source

type Future: Future

The associated Future type.

Required Methods§

source

fn weight(&self) -> usize

The weight of the future.

source

fn into_components(self) -> (usize, Self::Future)

Turns self into its components.

Implementations on Foreign Types§

source§

impl<Fut> WeightedFuture for (usize, Fut)where Fut: Future,

§

type Future = Fut

source§

fn weight(&self) -> usize

source§

fn into_components(self) -> (usize, Self::Future)

Implementors§