[][src]Enum tfrecord::protos::DataType

#[repr(i32)]pub enum DataType {
    DtInvalid,
    DtFloat,
    DtDouble,
    DtInt32,
    DtUint8,
    DtInt16,
    DtInt8,
    DtString,
    DtComplex64,
    DtInt64,
    DtBool,
    DtQint8,
    DtQuint8,
    DtQint32,
    DtBfloat16,
    DtQint16,
    DtQuint16,
    DtUint16,
    DtComplex128,
    DtHalf,
    DtResource,
    DtVariant,
    DtUint32,
    DtUint64,
    DtFloatRef,
    DtDoubleRef,
    DtInt32Ref,
    DtUint8Ref,
    DtInt16Ref,
    DtInt8Ref,
    DtStringRef,
    DtComplex64Ref,
    DtInt64Ref,
    DtBoolRef,
    DtQint8Ref,
    DtQuint8Ref,
    DtQint32Ref,
    DtBfloat16Ref,
    DtQint16Ref,
    DtQuint16Ref,
    DtUint16Ref,
    DtComplex128Ref,
    DtHalfRef,
    DtResourceRef,
    DtVariantRef,
    DtUint32Ref,
    DtUint64Ref,
}

(== 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. Only for cast ops.

DtQint16

Quantized int16

DtQuint16

Quantized uint16

DtUint16
DtComplex128

Double-precision complex

DtHalf
DtResource
DtVariant

Arbitrary C++ data types

DtUint32
DtUint64
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

Implementations

impl DataType[src]

pub fn is_valid(value: i32) -> bool[src]

Returns true if value is a variant of DataType.

pub fn from_i32(value: i32) -> Option<DataType>[src]

Converts an i32 to a DataType, or None if value is not a valid variant.

Trait Implementations

impl Clone for DataType[src]

impl Copy for DataType[src]

impl Debug for DataType[src]

impl Default for DataType[src]

impl<'de> Deserialize<'de> for DataType[src]

impl Eq for DataType[src]

impl From<DataType> for i32[src]

impl Hash for DataType[src]

impl Ord for DataType[src]

impl PartialEq<DataType> for DataType[src]

impl PartialOrd<DataType> for DataType[src]

impl Serialize for DataType[src]

impl StructuralEq for DataType[src]

impl StructuralPartialEq for DataType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.