Struct cyfs_lib::NOCCollectionRWSync
source · [−]pub struct NOCCollectionRWSync<T> where
T: Default + CollectionCodec<T> + Send + Sync + 'static, { /* private fields */ }
Implementations
sourceimpl<T> NOCCollectionRWSync<T> where
T: Default + CollectionCodec<T> + Send + Sync + 'static,
impl<T> NOCCollectionRWSync<T> where
T: Default + CollectionCodec<T> + Send + Sync + 'static,
pub fn new(id: &str, noc: Box<dyn NamedObjectCache>) -> Self
pub fn is_dirty(&self) -> bool
pub fn set_dirty(&self, dirty: bool)
pub fn coll(&self) -> &Arc<RwLock<T>>
pub fn id(&self) -> &str
pub fn swap(&self, value: T) -> T
pub async fn load(&self) -> BuckyResult<()>
pub async fn save(&self) -> BuckyResult<()>
pub async fn save_impl(&self) -> BuckyResult<()>
pub async fn delete(&mut self) -> BuckyResult<()>
pub fn start_save(&self, dur: Duration)
pub fn stop_save(&self)
Trait Implementations
sourceimpl<T> Clone for NOCCollectionRWSync<T> where
T: Default + CollectionCodec<T> + Send + Sync + 'static,
impl<T> Clone for NOCCollectionRWSync<T> where
T: Default + CollectionCodec<T> + Send + Sync + 'static,
Auto Trait Implementations
impl<T> !RefUnwindSafe for NOCCollectionRWSync<T>
impl<T> Send for NOCCollectionRWSync<T>
impl<T> Sync for NOCCollectionRWSync<T>
impl<T> Unpin for NOCCollectionRWSync<T>
impl<T> !UnwindSafe for NOCCollectionRWSync<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more