pub trait Resolver:
Clone
+ Send
+ 'static {
type Key: Span;
// Required methods
fn fetch(&mut self, key: Self::Key) -> impl Future<Output = ()> + Send;
fn cancel(&mut self, key: Self::Key) -> impl Future<Output = ()> + Send;
fn clear(&mut self) -> impl Future<Output = ()> + Send;
fn retain(
&mut self,
predicate: impl Fn(&Self::Key) -> bool + Send + 'static,
) -> impl Future<Output = ()> + Send;
}
Expand description
Responsible for fetching data and notifying a Consumer
.
Required Associated Types§
Required Methods§
Sourcefn fetch(&mut self, key: Self::Key) -> impl Future<Output = ()> + Send
fn fetch(&mut self, key: Self::Key) -> impl Future<Output = ()> + Send
Initiate 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.