pub struct ReadOnly<S>(/* private fields */);Expand description
A read-only view of a store: reads pass through, writes are rejected
with a PermissionDenied error.
Useful for handing a store to code that should only observe it (display layers, documentation consumers).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for ReadOnly<S>where
S: Freeze,
impl<S> RefUnwindSafe for ReadOnly<S>where
S: RefUnwindSafe,
impl<S> Send for ReadOnly<S>where
S: Send,
impl<S> Sync for ReadOnly<S>where
S: Sync,
impl<S> Unpin for ReadOnly<S>where
S: Unpin,
impl<S> UnsafeUnpin for ReadOnly<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for ReadOnly<S>where
S: 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