Enum cudb::value::Value[][src]

pub enum Value {
    Id(String),
    Int32(i32),
    String(String),
    Dict(Document),
    Array(Vec<Value>),
}
Expand description

Variant type for (data) document values.

Variants

Id(String)

Special type for unique identification, similar to MongoDB’s _id.

Tuple Fields of Id

0: String
Int32(i32)

Fixed-size integer type.

Tuple Fields of Int32

0: i32
String(String)

Arbitrary-length strings.

Tuple Fields of String

0: String
Dict(Document)

Recursive documents (hashtables).

Tuple Fields of Dict

0: Document
Array(Vec<Value>)

Array types.

Tuple Fields of Array

0: Vec<Value>

Implementations

Check if the provided Value is the same variant as the current Value. A variant is a component of an enum.

Based on: https://stackoverflow.com/a/32554326

Returns inclusive minimum for range search on value.

See Constraint::generate_value_ranges() for more details.

Returns inclusive maximum for range search on value.

See Constraint::generate_value_ranges() for more details. Note that this imposes an arbitrary maximum limit for unbounded values, such as strings.

Trait Implementations

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

We do not allow indexing by a Document. Panics if a Document is used.

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

Define a total ordering on all scalar values. Panics if non-scalar or unlike values.

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 !=.

We can only compare like scalar types (i.e., not documents nor arrays).

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

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.