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
type Key: Key + Send + Sync
The key this loader uses to load/create the resource
type Error: Send + Sync + 'static
The error type returned when the resource loader fails to load/create the resource