#[non_exhaustive]pub enum DataType {
}Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Any
Accepts any value.
Unknown
Not known.
Boolean
true or false.
Integer
A whole number, of any width or signedness.
Float
A binary floating-point number.
Decimal
A fixed-point decimal, with its precision (total digits) and scale (digits after the point) when the source gives them.
String
Text.
Binary
Bytes.
Date
A calendar date.
Timestamp
A date and time, with its time zone when the source gives one.
List(Box<Field>)
A sequence of items, each described by the field.
Struct(Vec<Field>)
Named fields.
Map
Keys to values.
Implementations§
Source§impl DataType
impl DataType
Sourcepub fn list(item: DataType) -> DataType
pub fn list(item: DataType) -> DataType
A list of nullable items, under the conventional name item.
Sourcepub fn map(key: DataType, value: DataType) -> DataType
pub fn map(key: DataType, value: DataType) -> DataType
A map from non-null keys to nullable values, under the
conventional names key and value.
Sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Whether values of this type are numbers (integer, float or decimal).
Trait Implementations§
Source§impl Display for DataType
The lowercase name: integer, decimal(10,2), timestamp[UTC],
list<string>, map<string, integer>, struct.
impl Display for DataType
The lowercase name: integer, decimal(10,2), timestamp[UTC],
list<string>, map<string, integer>, struct.
impl Eq for DataType
impl StructuralPartialEq for DataType
Auto Trait Implementations§
impl Freeze for DataType
impl RefUnwindSafe for DataType
impl Send for DataType
impl Sync for DataType
impl Unpin for DataType
impl UnsafeUnpin for DataType
impl UnwindSafe for DataType
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more