Skip to main content

DataTypeSnapshot

Enum DataTypeSnapshot 

Source
#[repr(u8)]
pub enum DataTypeSnapshot {
Show 19 variants Blob = 80, Boolean = 48, Custom(Box<CustomDataTypeSnapshot>), Date = 64, Datetime = 65, Decimal = 34, Float32 = 32, Float64 = 33, Int16 = 2, Int32 = 3, Int64 = 4, Int8 = 1, Json = 96, Text = 81, Uuid = 82, Uint16 = 17, Uint32 = 18, Uint64 = 19, Uint8 = 16,
}
Expand description

Stable, tag-keyed encoding of a column data type.

The discriminants are part of the on-disk format and must not be reused or reordered; new variants must take a fresh tag.

Variants§

§

Blob = 80

Arbitrary binary blob.

§

Boolean = 48

Boolean value.

§

Custom(Box<CustomDataTypeSnapshot>)

User-defined custom data type, identified by name + on-disk wire layout.

§

Date = 64

Calendar date with no time component.

§

Datetime = 65

Date and time.

§

Decimal = 34

Arbitrary-precision decimal number.

§

Float32 = 32

32-bit IEEE-754 floating point.

§

Float64 = 33

64-bit IEEE-754 floating point.

§

Int16 = 2

Signed 16-bit integer.

§

Int32 = 3

Signed 32-bit integer.

§

Int64 = 4

Signed 64-bit integer.

§

Int8 = 1

Signed 8-bit integer.

§

Json = 96

JSON document.

§

Text = 81

UTF-8 text string.

§

Uuid = 82

UUID value.

§

Uint16 = 17

Unsigned 16-bit integer.

§

Uint32 = 18

Unsigned 32-bit integer.

§

Uint64 = 19

Unsigned 64-bit integer.

§

Uint8 = 16

Unsigned 8-bit integer.

Trait Implementations§

Source§

impl Clone for DataTypeSnapshot

Source§

fn clone(&self) -> DataTypeSnapshot

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DataTypeSnapshot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DataTypeSnapshot

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Encode for DataTypeSnapshot

Source§

const ALIGNMENT: PageOffset = 32

The alignment requirement in bytes for the data type. Read more
Source§

const SIZE: DataSize = DataSize::Dynamic

The size characteristic of the data type. Read more
Source§

fn size(&self) -> MSize

Returns the size in bytes of the encoded data type.
Source§

fn encode(&self) -> Cow<'_, [u8]>

Encodes the data type into a vector of bytes.
Source§

fn decode(data: Cow<'_, [u8]>) -> MemoryResult<Self>
where Self: Sized,

Decodes the data type from a slice of bytes.
Source§

impl PartialEq for DataTypeSnapshot

Source§

fn eq(&self, other: &DataTypeSnapshot) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for DataTypeSnapshot

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for DataTypeSnapshot

Source§

impl StructuralPartialEq for DataTypeSnapshot

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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