pub struct PinnedBuf<T> { /* private fields */ }Expand description
Typed pinned buffer.
Send + Sync — the raw pointer is page-locked host memory; the actor + this handle are the only writers, and the pool’s generation gate prevents post-restart aliasing.
Implementations§
Source§impl<T> PinnedBuf<T>
impl<T> PinnedBuf<T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn as_ptr(&self) -> *const T
pub fn as_mut_ptr(&mut self) -> *mut T
Sourcepub fn as_slice(&self) -> &[T]
pub fn as_slice(&self) -> &[T]
View as a host slice. SAFETY: relies on the buffer being initialized for the requested length. For zero-init you must fill before reading.
pub fn as_mut_slice(&mut self) -> &mut [T]
Trait Implementations§
impl<T: Send> Send for PinnedBuf<T>
impl<T: Sync> Sync for PinnedBuf<T>
Auto Trait Implementations§
impl<T> Freeze for PinnedBuf<T>
impl<T> RefUnwindSafe for PinnedBuf<T>where
T: RefUnwindSafe,
impl<T> Unpin for PinnedBuf<T>where
T: Unpin,
impl<T> UnsafeUnpin for PinnedBuf<T>
impl<T> UnwindSafe for PinnedBuf<T>where
T: RefUnwindSafe + 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