pub enum Value {
Show 30 variants Nothing, Uuid(Uuid), Str(String), Bytes(Bytes), Int16(i16), Int32(i32), Int64(i64), Float32(f32), Float64(f64), BigInt(BigInt), ConfigMemory(ConfigMemory), Decimal(Decimal), Bool(bool), Datetime(Datetime), LocalDatetime(LocalDatetime), LocalDate(LocalDate), LocalTime(LocalTime), Duration(Duration), RelativeDuration(RelativeDuration), DateDuration(DateDuration), Json(Json), Set(Vec<Value>), Object { shape: ObjectShape, fields: Vec<Option<Value>>, }, SparseObject(SparseObject), Tuple(Vec<Value>), NamedTuple { shape: NamedTupleShape, fields: Vec<Value>, }, Array(Vec<Value>), Vector(Vec<f32>), Enum(EnumValue), Range(Range<Box<Value>>),
}

Variants§

§

Nothing

§

Uuid(Uuid)

§

Str(String)

§

Bytes(Bytes)

§

Int16(i16)

§

Int32(i32)

§

Int64(i64)

§

Float32(f32)

§

Float64(f64)

§

BigInt(BigInt)

§

ConfigMemory(ConfigMemory)

§

Decimal(Decimal)

§

Bool(bool)

§

Datetime(Datetime)

§

LocalDatetime(LocalDatetime)

§

LocalDate(LocalDate)

§

LocalTime(LocalTime)

§

Duration(Duration)

§

RelativeDuration(RelativeDuration)

§

DateDuration(DateDuration)

§

Json(Json)

§

Set(Vec<Value>)

§

Object

Fields

§fields: Vec<Option<Value>>
§

SparseObject(SparseObject)

§

Tuple(Vec<Value>)

§

NamedTuple

Fields

§fields: Vec<Value>
§

Array(Vec<Value>)

§

Vector(Vec<f32>)

§

Enum(EnumValue)

§

Range(Range<Box<Value>>)

Implementations§

source§

impl Value

source

pub fn kind(&self) -> &'static str

source

pub fn empty_tuple() -> Value

Trait Implementations§

source§

impl Clone for Value

source§

fn clone(&self) -> Value

Returns a copy 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 Value

source§

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

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

impl<T: Into<Value>> From<Range<T>> for Value

source§

fn from(src: Range<T>) -> Value

Converts to this type from the input type.
source§

impl From<String> for Value

source§

fn from(s: String) -> Value

Converts to this type from the input type.
source§

impl From<i16> for Value

source§

fn from(s: i16) -> Value

Converts to this type from the input type.
source§

impl From<i32> for Value

source§

fn from(s: i32) -> Value

Converts to this type from the input type.
source§

impl From<i64> for Value

source§

fn from(s: i64) -> Value

Converts to this type from the input type.
source§

impl PartialEq<Value> for Value

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl QueryArg for Value

source§

fn encode_slot(&self, enc: &mut Encoder<'_>) -> Result<(), Error>

source§

fn check_descriptor( &self, ctx: &DescriptorContext<'_>, pos: TypePos ) -> Result<(), Error>

source§

fn to_value(&self) -> Result<Value, Error>

source§

impl QueryArgs for Value

source§

fn encode(&self, enc: &mut Encoder<'_>) -> Result<(), Error>

source§

impl QueryResult for Value

§

type State = Arc<dyn Codec>

source§

fn prepare( ctx: &DescriptorContext<'_>, root_pos: TypePos ) -> Result<Arc<dyn Codec>, Error>

source§

fn decode(codec: &mut Arc<dyn Codec>, msg: &Bytes) -> Result<Self, Error>

source§

impl StructuralPartialEq for Value

Auto Trait Implementations§

§

impl RefUnwindSafe for Value

§

impl Send for Value

§

impl Sync for Value

§

impl Unpin for Value

§

impl UnwindSafe for Value

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.