Skip to main content

Fetcher

Trait Fetcher 

Source
pub trait Fetcher {
    type Key: Span;
    type Value;

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

Fetches raw values for resolver keys.

Required Associated Types§

Source

type Key: Span

Key requested by the resolver.

Source

type Value

Raw value delivered to the consumer for validation.

Required Methods§

Source

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

Fetch the value for key.

Return None for transient failures, missing data, or unexpected source responses. The resolver will retry while the key still has retained subscribers.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§