Trait cachy::ResourceProvider [] [src]

pub trait ResourceProvider<R> {
    type Key: Key + Send + Sync;
    type Error: Send + Sync + 'static;
    fn load<K: Into<Self::Key>>(&self, k: K) -> Result<R, Self::Error>;
}

Something that provides a resource

Associated Types

The key this loader uses to load/create the resource

The error type returned when the resource loader fails to load/create the resource

Required Methods

Loads/creates the resource

Implementors