pub enum PrimitiveType {
Show 19 variants
Boolean,
Int,
Long,
Float,
Double,
Decimal {
precision: u32,
scale: u32,
},
Date,
Time,
Timestamp,
Timestamptz,
TimestampNs,
TimestamptzNs,
String,
Uuid,
Fixed(u64),
Binary,
Unknown,
Geometry(GeometryType),
Geography(GeographyType),
}Expand description
Primitive data types
Variants§
Boolean
True or False
Int
32-bit signed integer
Long
64-bit signed integer
Float
32-bit IEEE 754 floating point.
Double
64-bit IEEE 754 floating point.
Decimal
Fixed point decimal
Date
Calendar date without timezone or time.
Time
Time of day in microsecond precision, without date or timezone.
Timestamp
Timestamp in microsecond precision, without timezone
Timestamptz
Timestamp in microsecond precision, with timezone
TimestampNs
Timestamp in nanosecond precision, without timezone
TimestamptzNs
Timestamp in nanosecond precision with timezone
String
Arbitrary-length character sequences encoded in utf-8
Uuid
Universally Unique Identifiers, should use 16-byte fixed
Fixed(u64)
Fixed length byte array
Binary
Arbitrary-length byte array.
Unknown
Default / null column type used when a more specific type is not known.
Geometry(GeometryType)
Geometry values encoded as well-known binary.
Geography(GeographyType)
Geography values encoded as well-known binary.
Implementations§
Source§impl PrimitiveType
impl PrimitiveType
pub fn serialize<__S>(
__self: &PrimitiveType,
__serializer: __S,
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
Source§impl<'de> PrimitiveType
impl<'de> PrimitiveType
pub fn deserialize<__D>(
__deserializer: __D,
) -> Result<PrimitiveType, __D::Error>where
__D: Deserializer<'de>,
Source§impl PrimitiveType
impl PrimitiveType
Sourcepub fn compatible(&self, literal: &PrimitiveLiteral) -> bool
pub fn compatible(&self, literal: &PrimitiveLiteral) -> bool
Check whether literal is compatible with the type.
Trait Implementations§
Source§impl Clone for PrimitiveType
impl Clone for PrimitiveType
Source§fn clone(&self) -> PrimitiveType
fn clone(&self) -> PrimitiveType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PrimitiveType
impl Debug for PrimitiveType
Source§impl<'de> Deserialize<'de> for PrimitiveType
impl<'de> Deserialize<'de> for PrimitiveType
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 Display for PrimitiveType
impl Display for PrimitiveType
Source§impl From<PrimitiveType> for Type
impl From<PrimitiveType> for Type
Source§fn from(value: PrimitiveType) -> Self
fn from(value: PrimitiveType) -> Self
Source§impl Hash for PrimitiveType
impl Hash for PrimitiveType
Source§impl PartialEq for PrimitiveType
impl PartialEq for PrimitiveType
Source§impl Serialize for PrimitiveType
impl Serialize for PrimitiveType
impl Eq for PrimitiveType
impl StructuralPartialEq for PrimitiveType
Auto Trait Implementations§
impl Freeze for PrimitiveType
impl RefUnwindSafe for PrimitiveType
impl Send for PrimitiveType
impl Sync for PrimitiveType
impl Unpin for PrimitiveType
impl UnsafeUnpin for PrimitiveType
impl UnwindSafe for PrimitiveType
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more