pub struct DumbCacheSource<T: 'static + Send + Sync>(/* private fields */);
Implementations§
Source§impl<T: 'static + Send + Sync> DumbCacheSource<T>
impl<T: 'static + Send + Sync> DumbCacheSource<T>
pub fn new() -> DumbCacheSource<T>
Trait Implementations§
Source§impl<T: 'static + Send + Sync> CacheSource for DumbCacheSource<T>
impl<T: 'static + Send + Sync> CacheSource for DumbCacheSource<T>
type Value = T
Source§fn load(&self, _id: &str, _create: bool) -> Result<T>
fn load(&self, _id: &str, _create: bool) -> Result<T>
Create a new cached object. Return a value defined by default
configurations if
create
is set. In the course of creation, no state
should be stored out of RAM, e.g., writing to files or calling to remote
machines.Auto Trait Implementations§
impl<T> Freeze for DumbCacheSource<T>
impl<T> RefUnwindSafe for DumbCacheSource<T>where
T: RefUnwindSafe,
impl<T> Send for DumbCacheSource<T>
impl<T> Sync for DumbCacheSource<T>
impl<T> Unpin for DumbCacheSource<T>where
T: Unpin,
impl<T> UnwindSafe for DumbCacheSource<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more