Enum ark_api::ml::HardwareType
source · #[non_exhaustive]#[repr(u32)]pub enum HardwareType {
CPU,
GPU,
LargeGPU,
}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.
Trait Implementations§
source§impl CheckedBitPattern for HardwareType
impl CheckedBitPattern for HardwareType
§type Bits = u32
type Bits = u32
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.source§fn is_valid_bit_pattern(
bits: &<HardwareType as CheckedBitPattern>::Bits
) -> bool
fn is_valid_bit_pattern( bits: &<HardwareType as CheckedBitPattern>::Bits ) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.source§impl Clone for HardwareType
impl Clone for HardwareType
source§fn clone(&self) -> HardwareType
fn clone(&self) -> HardwareType
Returns a copy 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 HardwareType
impl Debug for HardwareType
source§impl PartialEq<HardwareType> for HardwareType
impl PartialEq<HardwareType> for HardwareType
source§fn eq(&self, other: &HardwareType) -> bool
fn eq(&self, other: &HardwareType) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TryFrom<u32> for HardwareType
impl TryFrom<u32> for HardwareType
§type Error = TryFromPrimitiveError<HardwareType>
type Error = TryFromPrimitiveError<HardwareType>
The type returned in the event of a conversion error.
source§fn try_from(
number: u32
) -> Result<HardwareType, TryFromPrimitiveError<HardwareType>>
fn try_from( number: u32 ) -> Result<HardwareType, TryFromPrimitiveError<HardwareType>>
Performs the conversion.
source§impl TryFromPrimitive for HardwareType
impl TryFromPrimitive for HardwareType
type Primitive = u32
const NAME: &'static str = "HardwareType"
fn try_from_primitive( number: <HardwareType as TryFromPrimitive>::Primitive ) -> Result<HardwareType, TryFromPrimitiveError<HardwareType>>
impl Copy for HardwareType
impl Eq for HardwareType
impl NoUninit for HardwareType
impl StructuralEq for HardwareType
impl StructuralPartialEq for HardwareType
Auto Trait Implementations§
impl RefUnwindSafe for HardwareType
impl Send for HardwareType
impl Sync for HardwareType
impl Unpin for HardwareType
impl UnwindSafe for HardwareType
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