#[non_exhaustive]#[repr(u32)]pub enum MemoryType {
Host = 1,
Device = 2,
Array = 3,
Unified = 4,
}Expand description
Memory types
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 = 1
Host memory.
Device = 2
Device memory.
Array = 3
Array memory.
Unified = 4
Unified device or host memory.
Trait Implementations§
Source§impl Clone for MemoryType
impl Clone for MemoryType
impl Copy for MemoryType
Source§impl Debug for MemoryType
impl Debug for MemoryType
Source§impl Display for MemoryType
impl Display for MemoryType
impl Eq for MemoryType
Source§impl From<MemoryType> for u32
impl From<MemoryType> for u32
Source§fn from(enum_value: MemoryType) -> Self
fn from(enum_value: MemoryType) -> Self
Converts to this type from the input type.
Source§impl From<MemoryType> for CUmemorytype
impl From<MemoryType> for CUmemorytype
Source§fn from(value: MemoryType) -> Self
fn from(value: MemoryType) -> Self
Converts to this type from the input type.
Source§impl Hash for MemoryType
impl Hash for MemoryType
Source§impl PartialEq for MemoryType
impl PartialEq for MemoryType
impl StructuralPartialEq for MemoryType
Source§impl TryFrom<CUmemorytype_enum> for MemoryType
impl TryFrom<CUmemorytype_enum> for MemoryType
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: CUmemorytype) -> Result<Self, UnknownEnumValue>
fn try_from(value: CUmemorytype) -> Result<Self, UnknownEnumValue>
Performs the conversion.
Source§impl TryFrom<u32> for MemoryType
impl TryFrom<u32> for MemoryType
Source§type Error = TryFromPrimitiveError<MemoryType>
type Error = TryFromPrimitiveError<MemoryType>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for MemoryType
impl TryFromPrimitive for MemoryType
const NAME: &'static str = "MemoryType"
type Primitive = u32
type Error = TryFromPrimitiveError<MemoryType>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
impl Forget for MemoryType
impl Freeze for MemoryType
impl Move for MemoryType
impl RefUnwindSafe for MemoryType
impl Send for MemoryType
impl Sync for MemoryType
impl Unpin for MemoryType
impl UnsafeUnpin for MemoryType
impl UnwindSafe for MemoryType
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.