pub struct ArenaBuffer<S: MemoryDescription> { /* private fields */ }Expand description
A buffer allocated from an ArenaAllocator.
This struct wraps an Allocation from the offset_allocator crate,
and provides methods for interacting with the allocated memory.
The buffer is backed by a MemoryDescription object, and the allocation is freed when the buffer is dropped.
Implementations§
Source§impl<S> ArenaBuffer<S>where
S: MemoryDescription + NixlCompatible,
impl<S> ArenaBuffer<S>where
S: MemoryDescription + NixlCompatible,
Sourcepub fn nixl_descriptor(&self) -> Option<NixlDescriptor>
pub fn nixl_descriptor(&self) -> Option<NixlDescriptor>
Create a NIXL descriptor for this buffer with the correct offset and size.
This can be used when the base storage implements NixlCompatible to create a descriptor that points to just this buffer’s region.
Source§impl<S> ArenaBuffer<S>where
S: MemoryDescription + RegisteredView,
impl<S> ArenaBuffer<S>where
S: MemoryDescription + RegisteredView,
Sourcepub fn agent_name(&self) -> &str
pub fn agent_name(&self) -> &str
Get the agent name from registered storage.
This is a convenience method when using ArenaAllocator with NixlRegistered
Sourcepub fn registered_descriptor(&self) -> NixlDescriptor
pub fn registered_descriptor(&self) -> NixlDescriptor
Get a NIXL descriptor that includes registration information.
Trait Implementations§
Source§impl<S: MemoryDescription> Debug for ArenaBuffer<S>
impl<S: MemoryDescription> Debug for ArenaBuffer<S>
Source§impl<S: MemoryDescription> Drop for ArenaBuffer<S>
impl<S: MemoryDescription> Drop for ArenaBuffer<S>
Source§impl<S: MemoryDescription + 'static> MemoryDescription for ArenaBuffer<S>
impl<S: MemoryDescription + 'static> MemoryDescription for ArenaBuffer<S>
Source§fn storage_kind(&self) -> StorageKind
fn storage_kind(&self) -> StorageKind
Type of storage backing this region.
Source§fn nixl_descriptor(&self) -> Option<NixlDescriptor>
fn nixl_descriptor(&self) -> Option<NixlDescriptor>
Get the NIXL descriptor for this memory region.
Auto Trait Implementations§
impl<S> Freeze for ArenaBuffer<S>
impl<S> RefUnwindSafe for ArenaBuffer<S>where
S: RefUnwindSafe,
impl<S> Send for ArenaBuffer<S>
impl<S> Sync for ArenaBuffer<S>
impl<S> Unpin for ArenaBuffer<S>
impl<S> UnwindSafe for ArenaBuffer<S>where
S: RefUnwindSafe,
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