#[repr(i32)]pub enum DataType {
Show 51 variants
DtInvalid,
DtFloat,
DtDouble,
DtInt32,
DtUint8,
DtInt16,
DtInt8,
DtString,
DtComplex64,
DtInt64,
DtBool,
DtQint8,
DtQuint8,
DtQint32,
DtBfloat16,
DtQint16,
DtQuint16,
DtUint16,
DtComplex128,
DtHalf,
DtResource,
DtVariant,
DtUint32,
DtUint64,
DtFloat8E5m2,
DtFloat8E4m3fn,
DtFloatRef,
DtDoubleRef,
DtInt32Ref,
DtUint8Ref,
DtInt16Ref,
DtInt8Ref,
DtStringRef,
DtComplex64Ref,
DtInt64Ref,
DtBoolRef,
DtQint8Ref,
DtQuint8Ref,
DtQint32Ref,
DtBfloat16Ref,
DtQint16Ref,
DtQuint16Ref,
DtUint16Ref,
DtComplex128Ref,
DtHalfRef,
DtResourceRef,
DtVariantRef,
DtUint32Ref,
DtUint64Ref,
DtFloat8E5m2Ref,
DtFloat8E4m3fnRef,
}
Expand description
(== suppress_warning documentation-presence ==) LINT.IfChange
Variants§
DtInvalid
Not a legal value for DataType. Used to indicate a DataType field has not been set.
DtFloat
Data types that all computation devices are expected to be capable to support.
DtDouble
DtInt32
DtUint8
DtInt16
DtInt8
DtString
DtComplex64
Single-precision complex
DtInt64
DtBool
DtQint8
Quantized int8
DtQuint8
Quantized uint8
DtQint32
Quantized int32
DtBfloat16
Float32 truncated to 16 bits.
DtQint16
Quantized int16
DtQuint16
Quantized uint16
DtUint16
DtComplex128
Double-precision complex
DtHalf
DtResource
DtVariant
Arbitrary C++ data types
DtUint32
DtUint64
DtFloat8E5m2
5 exponent bits, 2 mantissa bits.
DtFloat8E4m3fn
4 exponent bits, 3 mantissa bits, finite-only, with
DtFloatRef
Do not use! These are only for parameters. Every enum above should have a corresponding value below (verified by types_test).
DtDoubleRef
DtInt32Ref
DtUint8Ref
DtInt16Ref
DtInt8Ref
DtStringRef
DtComplex64Ref
DtInt64Ref
DtBoolRef
DtQint8Ref
DtQuint8Ref
DtQint32Ref
DtBfloat16Ref
DtQint16Ref
DtQuint16Ref
DtUint16Ref
DtComplex128Ref
DtHalfRef
DtResourceRef
DtVariantRef
DtUint32Ref
DtUint64Ref
DtFloat8E5m2Ref
DtFloat8E4m3fnRef
Implementations§
source§impl DataType
impl DataType
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl<'de> Deserialize<'de> for DataType
impl<'de> Deserialize<'de> for DataType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl Ord for DataType
impl Ord for DataType
source§impl PartialEq<DataType> for DataType
impl PartialEq<DataType> for DataType
source§impl PartialOrd<DataType> for DataType
impl PartialOrd<DataType> for DataType
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for DataType
impl TryFrom<i32> for DataType
§type Error = DecodeError
type Error = DecodeError
impl Copy for DataType
impl Eq for DataType
impl StructuralEq for DataType
impl StructuralPartialEq for DataType
Auto Trait Implementations§
impl RefUnwindSafe for DataType
impl Send for DataType
impl Sync for DataType
impl Unpin for DataType
impl UnwindSafe for DataType
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
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.