Struct AlignedBlobBuf
pub struct AlignedBlobBuf { /* private fields */ }Expand description
A heap-allocated, 4 KB-aligned, PAGE_SIZE-byte buffer.
One per logical blob in flight. Cheap to construct (single
alloc), cheap to clone (single memcpy). Send + Sync — the
raw pointer is the sole owner of its allocation.
Implementations§
§impl AlignedBlobBuf
impl AlignedBlobBuf
pub fn zeroed() -> Self
pub fn zeroed() -> Self
Allocate a zero-filled buffer.
pub fn uninit() -> Self
pub fn uninit() -> Self
Allocate an uninitialized buffer. Caller must fill before reading (typical use: io_uring read fills it from disk).
pub fn as_ptr(&self) -> *const u8
pub fn as_ptr(&self) -> *const u8
Raw pointer for FFI / io_uring iovec. Always non-null,
always 4 KB-aligned, always PAGE_SIZE bytes valid.
pub fn as_mut_ptr(&mut self) -> *mut u8
pub fn as_mut_ptr(&mut self) -> *mut u8
Mutable raw pointer. Same invariants as Self::as_ptr.
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Mutable view as a slice of PAGE_SIZE bytes.
Trait Implementations§
§impl Clone for AlignedBlobBuf
impl Clone for AlignedBlobBuf
§impl Debug for AlignedBlobBuf
impl Debug for AlignedBlobBuf
§impl Default for AlignedBlobBuf
impl Default for AlignedBlobBuf
§impl Drop for AlignedBlobBuf
impl Drop for AlignedBlobBuf
impl Send for AlignedBlobBuf
impl Sync for AlignedBlobBuf
Auto Trait Implementations§
impl Freeze for AlignedBlobBuf
impl RefUnwindSafe for AlignedBlobBuf
impl Unpin for AlignedBlobBuf
impl UnsafeUnpin for AlignedBlobBuf
impl UnwindSafe for AlignedBlobBuf
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