#[non_exhaustive]#[repr(u32)]pub enum MemoryAllocationType {
Pinned = 1,
Managed = 2,
}Expand description
Kind of physical memory backing an allocation.
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.
Pinned = 1
Memory that cannot migrate from its current location while the application uses it.
Managed = 2
This allocation type is managed memory.
Trait Implementations§
Source§impl Clone for MemoryAllocationType
impl Clone for MemoryAllocationType
impl Copy for MemoryAllocationType
Source§impl Debug for MemoryAllocationType
impl Debug for MemoryAllocationType
Source§impl Display for MemoryAllocationType
impl Display for MemoryAllocationType
impl Eq for MemoryAllocationType
Source§impl From<MemoryAllocationType> for u32
impl From<MemoryAllocationType> for u32
Source§fn from(enum_value: MemoryAllocationType) -> Self
fn from(enum_value: MemoryAllocationType) -> Self
Converts to this type from the input type.
Source§impl From<MemoryAllocationType> for CUmemAllocationType
impl From<MemoryAllocationType> for CUmemAllocationType
Source§fn from(value: MemoryAllocationType) -> Self
fn from(value: MemoryAllocationType) -> Self
Converts to this type from the input type.
Source§impl Hash for MemoryAllocationType
impl Hash for MemoryAllocationType
Source§impl PartialEq for MemoryAllocationType
impl PartialEq for MemoryAllocationType
impl StructuralPartialEq for MemoryAllocationType
Source§impl TryFrom<CUmemAllocationType_enum> for MemoryAllocationType
impl TryFrom<CUmemAllocationType_enum> for MemoryAllocationType
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: CUmemAllocationType) -> Result<Self, UnknownEnumValue>
fn try_from(value: CUmemAllocationType) -> Result<Self, UnknownEnumValue>
Performs the conversion.
Source§impl TryFrom<u32> for MemoryAllocationType
impl TryFrom<u32> for MemoryAllocationType
Source§type Error = TryFromPrimitiveError<MemoryAllocationType>
type Error = TryFromPrimitiveError<MemoryAllocationType>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for MemoryAllocationType
impl TryFromPrimitive for MemoryAllocationType
const NAME: &'static str = "MemoryAllocationType"
type Primitive = u32
type Error = TryFromPrimitiveError<MemoryAllocationType>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
impl Forget for MemoryAllocationType
impl Freeze for MemoryAllocationType
impl Move for MemoryAllocationType
impl RefUnwindSafe for MemoryAllocationType
impl Send for MemoryAllocationType
impl Sync for MemoryAllocationType
impl Unpin for MemoryAllocationType
impl UnsafeUnpin for MemoryAllocationType
impl UnwindSafe for MemoryAllocationType
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.