pub struct SharedFanoutLayoutCell<const N: usize>(/* private fields */);Expand description
SharedFanoutLayout<N> wrapper that explicitly opts into interior mutability.
The v1 fanout 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 SharedFanoutLayout<N>.
Implementations§
Sourcepub fn from_mut(
shared: &mut SharedFanoutLayout<N>,
) -> &SharedFanoutLayoutCell<N>
pub fn from_mut( shared: &mut SharedFanoutLayout<N>, ) -> &SharedFanoutLayoutCell<N>
Borrow a SharedFanoutLayoutCell view over a uniquely-mutable SharedFanoutLayout<N>.
Sourcepub unsafe fn from_ptr<'a>(
ptr: *mut SharedFanoutLayout<N>,
) -> &'a SharedFanoutLayoutCell<N>
pub unsafe fn from_ptr<'a>( ptr: *mut SharedFanoutLayout<N>, ) -> &'a SharedFanoutLayoutCell<N>
Borrow a SharedFanoutLayoutCell 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