Trait CacheClient

Source
pub trait CacheClient:
    Sized
    + Send
    + Sync
where Self::Error: Error + Send + Sync + 'static,
{ type Error; // Required method fn fetch( &self, uri: &str, ) -> impl Future<Output = Result<Resource, Report<Self::Error>>> + Send; }

Required Associated Types§

Required Methods§

Source

fn fetch( &self, uri: &str, ) -> impl Future<Output = Result<Resource, Report<Self::Error>>> + Send

Simple async interface to fetch data and its TTL for an URI

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.

Implementations on Foreign Types§

Source§

impl CacheClient for Client

Source§

type Error = ClientError

Source§

async fn fetch(&self, uri: &str) -> Result<Resource, Report<Self::Error>>

Implementors§