Struct pyo3::buffer::ReadOnlyCell
source · [−]#[repr(transparent)]pub struct ReadOnlyCell<T: Element>(_);
Available on non-
Py_LIMITED_API
or Py_3_11
only.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> !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
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