Struct cpython::buffer::ReadOnlyCell
source · pub struct ReadOnlyCell<T>(/* private fields */);
Expand description
Like std::mem::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