pub struct RefCellStorage;Expand description
SharedStorage implementation backed by RefCell.
Trait Implementations§
Source§type Storage<T> = RefCell<SharedValue<T>>
type Storage<T> = RefCell<SharedValue<T>>
Concrete cell or lock type containing
SharedValue<T>.Source§type ReadGuard<'a, T> = Ref<'a, SharedValue<T>>
where
T: 'a
type ReadGuard<'a, T> = Ref<'a, SharedValue<T>> where T: 'a
Guard returned by read access.
Source§type WriteGuard<'a, T> = RefMut<'a, SharedValue<T>>
where
T: 'a
type WriteGuard<'a, T> = RefMut<'a, SharedValue<T>> where T: 'a
Guard returned by write access.
Source§type ReadError<'a, T> = BorrowError
where
T: 'a
type ReadError<'a, T> = BorrowError where T: 'a
Error returned by read access.
Source§type WriteError<'a, T> = BorrowMutError
where
T: 'a
type WriteError<'a, T> = BorrowMutError where T: 'a
Error returned by write access.
Source§fn new<T>(value: SharedValue<T>) -> Self::Storage<T>
fn new<T>(value: SharedValue<T>) -> Self::Storage<T>
Creates backend storage containing the authoritative state and runtime data.
Source§fn read<T>(
storage: &Self::Storage<T>,
) -> Result<Self::ReadGuard<'_, T>, Self::ReadError<'_, T>>
fn read<T>( storage: &Self::Storage<T>, ) -> Result<Self::ReadGuard<'_, T>, Self::ReadError<'_, T>>
Attempts read access to the backend storage.
Source§fn write<T>(
storage: &Self::Storage<T>,
) -> Result<Self::WriteGuard<'_, T>, Self::WriteError<'_, T>>
fn write<T>( storage: &Self::Storage<T>, ) -> Result<Self::WriteGuard<'_, T>, Self::WriteError<'_, T>>
Attempts write access to the backend storage.
Auto Trait Implementations§
impl Freeze for RefCellStorage
impl RefUnwindSafe for RefCellStorage
impl Send for RefCellStorage
impl StateClone for RefCellStorage
impl StateCopy for RefCellStorage
impl Sync for RefCellStorage
impl Unpin for RefCellStorage
impl UnsafeUnpin for RefCellStorage
impl UnwindSafe for RefCellStorage
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
Source§type Storage<T> = <Storage as SharedStorage>::Storage<T>
type Storage<T> = <Storage as SharedStorage>::Storage<T>
Concrete cell or lock type containing
SharedValue<T>.Source§type ReadGuard<'a, T: 'a> = <Storage as SharedStorage>::ReadGuard<'a, T>
where
Storage: 'a
type ReadGuard<'a, T: 'a> = <Storage as SharedStorage>::ReadGuard<'a, T> where Storage: 'a
Guard returned by read access.
Source§type WriteGuard<'a, T: 'a> = <Storage as SharedStorage>::WriteGuard<'a, T>
where
Storage: 'a
type WriteGuard<'a, T: 'a> = <Storage as SharedStorage>::WriteGuard<'a, T> where Storage: 'a
Guard returned by write access.