Enum bolt_proto::value::Value[][src]

pub enum Value {
Show 21 variants Boolean(bool), Integer(i64), Float(f64), Bytes(Vec<u8>), List(Vec<Value>), Map(HashMap<String, Value>), Null, String(String), Node(Node), Relationship(Relationship), Path(Path), UnboundRelationship(UnboundRelationship), Date(NaiveDate), Time(NaiveTimeFixedOffset), DateTimeOffset(DateTime<FixedOffset>), DateTimeZoned(DateTime<Tz>), LocalTime(NaiveTime), LocalDateTime(NaiveDateTime), Duration(Duration), Point2D(Point2D), Point3D(Point3D),
}
Expand description

An enum that can hold values of all Bolt-compatible types.

Conversions are provided for most types, and are usually pretty intuitive (bool to Value::Boolean, i32 to Value::Integer, HashMap to Value::Map, etc.), but some types have no analog in Rust, like a timezone-aware time. For such types, conversions are still provided, but may feel a bit clunky (for example, you can convert a (NaiveTime, impl Offset) tuple into a Value::Time).

Variants

Boolean(bool)

Tuple Fields

0: bool

Integer(i64)

Tuple Fields

0: i64

Float(f64)

Tuple Fields

0: f64

Bytes(Vec<u8>)

Tuple Fields

0: Vec<u8>

List(Vec<Value>)

Tuple Fields

0: Vec<Value>

Map(HashMap<String, Value>)

Tuple Fields

Null

String(String)

Tuple Fields

0: String

Node(Node)

Tuple Fields

0: Node

Relationship(Relationship)

Tuple Fields

Path(Path)

Tuple Fields

0: Path

UnboundRelationship(UnboundRelationship)

Tuple Fields

Date(NaiveDate)

Tuple Fields

Time(NaiveTimeFixedOffset)

Tuple Fields

DateTimeOffset(DateTime<FixedOffset>)

Tuple Fields

DateTimeZoned(DateTime<Tz>)

Tuple Fields

LocalTime(NaiveTime)

Tuple Fields

LocalDateTime(NaiveDateTime)

Tuple Fields

Duration(Duration)

Tuple Fields

Point2D(Point2D)

Tuple Fields

Point3D(Point3D)

Tuple Fields

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

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

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

This method tests for !=.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

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.