pub struct SharedLayoutCell(/* private fields */);Expand description
SharedLayout wrapper that explicitly opts into interior mutability.
The v1 events layout is designed for concurrent mutation through atomics and raw pointers.
Rust requires such mutation through a shared reference to be mediated by UnsafeCell.
This type is repr(transparent) over the ABI layout, so it can be used over the same mapped
bytes as SharedLayout.
Implementations§
Sourcepub fn from_mut(shared: &mut SharedLayout) -> &SharedLayoutCell
pub fn from_mut(shared: &mut SharedLayout) -> &SharedLayoutCell
Borrow a SharedLayoutCell view over a uniquely-mutable SharedLayout.
Sourcepub unsafe fn from_ptr<'a>(ptr: *mut SharedLayout) -> &'a SharedLayoutCell
pub unsafe fn from_ptr<'a>(ptr: *mut SharedLayout) -> &'a SharedLayoutCell
Borrow a SharedLayoutCell view over a raw pointer.
§Safety
ptr must be valid for reads/writes for the lifetime 'a.
Auto Trait Implementations§
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