Trait Resolver

Source
pub trait Resolver:
    Clone
    + Send
    + 'static {
    type Key: Array;

    // Required methods
    fn fetch(&mut self, key: Self::Key) -> impl Future<Output = ()> + Send;
    fn cancel(&mut self, key: Self::Key) -> impl Future<Output = ()> + Send;
}
Expand description

Responsible for fetching data and notifying a Consumer.

Required Associated Types§

Source

type Key: Array

Type used to uniquely identify data.

Required Methods§

Source

fn fetch(&mut self, key: Self::Key) -> impl Future<Output = ()> + Send

Initiate a fetch request.

Source

fn cancel(&mut self, key: Self::Key) -> impl Future<Output = ()> + Send

Cancel a fetch request.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<K: Array> Resolver for Mailbox<K>

Source§

type Key = K