pub enum BasicValue {
Show 16 variants
Bytes(Bytes),
Str(Arc<str>),
Bool(bool),
Int64(i64),
Float32(f32),
Float64(f64),
Range(RangeValue),
Uuid(Uuid),
Date(NaiveDate),
Time(NaiveTime),
LocalDateTime(NaiveDateTime),
OffsetDateTime(DateTime<FixedOffset>),
TimeDelta(Duration),
Json(Arc<Value>),
Vector(Arc<[BasicValue]>),
UnionVariant {
tag_id: usize,
value: Box<BasicValue>,
},
}Variants§
Bytes(Bytes)
Str(Arc<str>)
Bool(bool)
Int64(i64)
Float32(f32)
Float64(f64)
Range(RangeValue)
Uuid(Uuid)
Date(NaiveDate)
Time(NaiveTime)
LocalDateTime(NaiveDateTime)
OffsetDateTime(DateTime<FixedOffset>)
TimeDelta(Duration)
Json(Arc<Value>)
Vector(Arc<[BasicValue]>)
UnionVariant
Implementations§
Source§impl BasicValue
impl BasicValue
Source§impl BasicValue
impl BasicValue
pub fn from_json(value: Value, schema: &BasicValueType) -> Result<Self>
Trait Implementations§
Source§impl Clone for BasicValue
impl Clone for BasicValue
Source§fn clone(&self) -> BasicValue
fn clone(&self) -> BasicValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BasicValue
impl Debug for BasicValue
Source§impl<'de> Deserialize<'de> for BasicValue
impl<'de> Deserialize<'de> for BasicValue
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Bytes> for BasicValue
impl From<Bytes> for BasicValue
Source§impl From<DateTime<FixedOffset>> for BasicValue
impl From<DateTime<FixedOffset>> for BasicValue
Source§fn from(value: DateTime<FixedOffset>) -> Self
fn from(value: DateTime<FixedOffset>) -> Self
Converts to this type from the input type.
Source§impl From<NaiveDate> for BasicValue
impl From<NaiveDate> for BasicValue
Source§impl From<NaiveDateTime> for BasicValue
impl From<NaiveDateTime> for BasicValue
Source§fn from(value: NaiveDateTime) -> Self
fn from(value: NaiveDateTime) -> Self
Converts to this type from the input type.
Source§impl From<NaiveTime> for BasicValue
impl From<NaiveTime> for BasicValue
Source§impl From<String> for BasicValue
impl From<String> for BasicValue
Source§impl From<TimeDelta> for BasicValue
impl From<TimeDelta> for BasicValue
Source§impl From<Uuid> for BasicValue
impl From<Uuid> for BasicValue
Source§impl From<Value> for BasicValue
impl From<Value> for BasicValue
Source§impl<T: Into<BasicValue>> From<Vec<T>> for BasicValue
impl<T: Into<BasicValue>> From<Vec<T>> for BasicValue
Source§impl From<bool> for BasicValue
impl From<bool> for BasicValue
Source§impl From<f32> for BasicValue
impl From<f32> for BasicValue
Source§impl From<f64> for BasicValue
impl From<f64> for BasicValue
Source§impl From<i64> for BasicValue
impl From<i64> for BasicValue
Source§impl PartialEq for BasicValue
impl PartialEq for BasicValue
Source§impl Serialize for BasicValue
impl Serialize for BasicValue
impl StructuralPartialEq for BasicValue
Auto Trait Implementations§
impl !Freeze for BasicValue
impl RefUnwindSafe for BasicValue
impl Send for BasicValue
impl Sync for BasicValue
impl Unpin for BasicValue
impl UnwindSafe for BasicValue
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
Converts
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> ⓘ
Converts
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