[][src]Enum b3_rs::datatypes::DataType

pub enum DataType {
    Null,
    StandardType(KnownType),
    StandardExtendedType(KnownExtendedType),
    UserExtendedType(u64),
}

Data type container.

Variants

Null

The null data type.

StandardType(KnownType)

A standard-defined data type.

The type is encoded in the "data type" bits of an item's control byte.

StandardExtendedType(KnownExtendedType)

A standard-defined extended data type.

The type is encoded as a UVarInt (unsigned LEB128) added after the item's control byte, and the "data type" bits of the control byte are all set to 1.

UserExtendedType(u64)

A user-defined extended data type.

The type is encoded as a UVarInt (unsigned LEB128) added after the item's control byte, and the "data type" bits of the control byte are all set to 1.

Data type numbers 96 through 8191 (inclusive) are available for use as user-defined types.

Implementations

impl DataType[src]

pub fn encode(&self) -> Result<(u8, Vec<u8>), Error>[src]

Trait Implementations

impl Clone for DataType[src]

impl Copy for DataType[src]

impl Debug for DataType[src]

impl From<KnownExtendedType> for DataType[src]

impl From<KnownType> for DataType[src]

impl From<u64> for DataType[src]

impl PartialEq<DataType> 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> From<T> for T[src]

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

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.