#[non_exhaustive]pub enum MemoryClass {
Host,
PinnedHost,
Device(u8),
Shared,
}Expand description
The memory class associated with a payload.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Host
Regular host memory.
PinnedHost
Pinned (page-locked) host memory, suitable for DMA.
Device(u8)
A device-specific memory region (e.g., GPU/NPU).
A shared region accessible by multiple devices.
Trait Implementations§
Source§impl Clone for MemoryClass
impl Clone for MemoryClass
Source§fn clone(&self) -> MemoryClass
fn clone(&self) -> MemoryClass
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryClass
impl Debug for MemoryClass
Source§impl Default for MemoryClass
impl Default for MemoryClass
Source§impl Hash for MemoryClass
impl Hash for MemoryClass
Source§impl PartialEq for MemoryClass
impl PartialEq for MemoryClass
impl Copy for MemoryClass
impl Eq for MemoryClass
impl StructuralPartialEq for MemoryClass
Auto Trait Implementations§
impl Freeze for MemoryClass
impl RefUnwindSafe for MemoryClass
impl Send for MemoryClass
impl Sync for MemoryClass
impl Unpin for MemoryClass
impl UnsafeUnpin for MemoryClass
impl UnwindSafe for MemoryClass
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