pub struct ReadOnlyCell<T: Element>(/* private fields */);
Expand description
Like std::cell::Cell, but only provides read-only access to the data.
&ReadOnlyCell<T>
is basically a safe version of *const T
:
The data cannot be modified through the reference, but other references may
be modifying the data.
Implementations§
Auto Trait Implementations§
impl<T> !Freeze for ReadOnlyCell<T>
impl<T> !RefUnwindSafe for ReadOnlyCell<T>
impl<T> Send for ReadOnlyCell<T>where
T: Send,
impl<T> !Sync for ReadOnlyCell<T>
impl<T> Unpin for ReadOnlyCell<T>where
T: Unpin,
impl<T> UnwindSafe for ReadOnlyCell<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