Enum vortex_dtype::PType
source · pub enum PType {
U8,
U16,
U32,
U64,
I8,
I16,
I32,
I64,
F16,
F32,
F64,
}Variants§
Implementations§
source§impl PType
impl PType
pub const fn is_unsigned_int(self) -> bool
pub const fn is_signed_int(self) -> bool
pub const fn is_int(self) -> bool
pub const fn is_float(self) -> bool
pub const fn byte_width(&self) -> usize
pub const fn bit_width(&self) -> usize
pub const fn max_value(&self) -> usize
pub fn to_signed(self) -> Self
pub fn to_unsigned(self) -> Self
Trait Implementations§
source§impl PartialOrd for PType
impl PartialOrd for PType
source§impl TryFrom<&DType> for PType
impl TryFrom<&DType> for PType
source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
source§fn try_from(value: &DType) -> VortexResult<Self>
fn try_from(value: &DType) -> VortexResult<Self>
Performs the conversion.
impl Copy for PType
impl Eq for PType
impl StructuralPartialEq for PType
Auto Trait Implementations§
impl Freeze for PType
impl RefUnwindSafe for PType
impl Send for PType
impl Sync for PType
impl Unpin for PType
impl UnwindSafe for PType
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more