pub enum Value {
Show 20 variants U32(u32), V32(u32), I32(i32), Z32(i32), U64(u64), V64(u64), I64(i64), Z64(i64), F32(f32), F64(f64), DateTime(DateTime<Utc>), Duration(Duration), String(Chars), Bytes(Bytes), True, False, Null, Ok, Error(Chars), Array(Arc<[Value]>),
}

Variants

U32(u32)

full 4 byte u32

V32(u32)

LEB128 varint, 1 - 5 bytes depending on value

I32(i32)

full 4 byte i32

Z32(i32)

LEB128 varint zigzag encoded, 1 - 5 bytes depending on abs(value)

U64(u64)

full 8 byte u64

V64(u64)

LEB128 varint, 1 - 10 bytes depending on value

I64(i64)

full 8 byte i64

Z64(i64)

LEB128 varint zigzag encoded, 1 - 10 bytes depending on abs(value)

F32(f32)

4 byte ieee754 single precision float

F64(f64)

8 byte ieee754 double precision float

DateTime(DateTime<Utc>)

UTC timestamp

Duration(Duration)

Duration

String(Chars)

unicode string, zero copy decode

Bytes(Bytes)

byte array, zero copy decode

True

boolean true

False

boolean false

Null

Empty value

Ok

An explicit ok

Error(Chars)

An explicit error

Array(Arc<[Value]>)

An array of values

Implementations

Whatever value is attempt to turn it into the type specified

cast value directly to any type implementing FromValue

return true if the value is some kind of number, otherwise false.

return an iterator that will perform a depth first traversal of the specified value. All array elements will be flattened into non array values.

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

attempt to cast v to the type of self using any reasonable means

extract the type of self from v if the type of v is equivelent to the type of self, otherwise return None. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the ! operator.

Performs the unary ! operation. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

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

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.