pub trait GroupedWeightedFuture: Sealed {
    type Future: Future;
    type Q;

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

A trait for types which can be converted into a Future, an optional group, and a weight.

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

Required Associated Types§

source

type Future: Future

The associated Future type.

source

type Q

The associated key lookup type.

Required Methods§

source

fn weight(&self) -> usize

Returns the weight.

source

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

Turns self into its components.

Implementations on Foreign Types§

source§

impl<Fut, Q> GroupedWeightedFuture for (usize, Option<Q>, Fut)where Fut: Future,

§

type Future = Fut

§

type Q = Q

source§

fn weight(&self) -> usize

source§

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

Implementors§