GValue

Enum GValue 

Source
pub enum GValue {
Show 33 variants Null, Vertex(Vertex), Edge(Edge), Bytes(Vec<u8>), VertexProperty(VertexProperty), Property(Property), Uuid(Uuid), Int32(i32), Int64(i64), Float(f32), Double(f64), Date(DateTime<Utc>), List(List), Set(Set), Map(Map), Token(Token), String(String), Path(Path), TraversalMetrics(TraversalMetrics), Metric(Metric), TraversalExplanation(TraversalExplanation), IntermediateRepr(IntermediateRepr), P(Predicate), T(T), Bytecode(Bytecode), Traverser(Traverser), Scope(Scope), Order(Order), Bool(bool), TextP(TextP), Pop(Pop), Terminator(TerminatorToken), Cardinality(Cardinality),
}
Expand description

Represent possible values coming from the Gremlin Server

Variants§

§

Null

§

Vertex(Vertex)

§

Edge(Edge)

§

Bytes(Vec<u8>)

§

VertexProperty(VertexProperty)

§

Property(Property)

§

Uuid(Uuid)

§

Int32(i32)

§

Int64(i64)

§

Float(f32)

§

Double(f64)

§

Date(DateTime<Utc>)

§

List(List)

§

Set(Set)

§

Map(Map)

§

Token(Token)

§

String(String)

§

Path(Path)

§

TraversalMetrics(TraversalMetrics)

§

Metric(Metric)

§

TraversalExplanation(TraversalExplanation)

§

IntermediateRepr(IntermediateRepr)

§

P(Predicate)

§

T(T)

§

Bytecode(Bytecode)

§

Traverser(Traverser)

§

Scope(Scope)

§

Order(Order)

§

Bool(bool)

§

TextP(TextP)

§

Pop(Pop)

§

Terminator(TerminatorToken)

§

Cardinality(Cardinality)

Implementations§

Source§

impl GValue

Source

pub fn from_bytes(variant: usize, bytes: Vec<u8>) -> GValue

Source

pub fn to_variant(&self) -> u8

Source

pub fn is_null(&self) -> bool

Source

pub fn bytes(&self) -> Vec<u8>

Source

pub fn take<T>(self) -> GremlinResult<T>
where T: FromGValue,

Source

pub fn get<'a, T>(&'a self) -> GremlinResult<&'a T>
where T: BorrowFromGValue,

Source

pub fn is_cardinality(&self) -> bool

Trait Implementations§

Source§

impl Clone for GValue

Source§

fn clone(&self) -> GValue

Returns a duplicate 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 GValue

Source§

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

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

impl From<&String> for GValue

Source§

fn from(val: &String) -> Self

Converts to this type from the input type.
Source§

impl From<&Vertex> for GValue

Source§

fn from(val: &Vertex) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a str> for GValue

Source§

fn from(val: &'a str) -> Self

Converts to this type from the input type.
Source§

impl From<BTreeMap<String, GValue>> for GValue

Source§

fn from(val: BTreeMap<String, GValue>) -> Self

Converts to this type from the input type.
Source§

impl From<Bytecode> for GValue

Source§

fn from(val: Bytecode) -> GValue

Converts to this type from the input type.
Source§

impl From<Cardinality> for GValue

Source§

fn from(val: Cardinality) -> GValue

Converts to this type from the input type.
Source§

impl From<DateTime<Utc>> for GValue

Source§

fn from(val: DateTime<Utc>) -> Self

Converts to this type from the input type.
Source§

impl From<Edge> for GValue

Source§

fn from(val: Edge) -> Self

Converts to this type from the input type.
Source§

impl<A, B> From<Either2<A, B>> for GValue
where A: Into<GValue>, B: Into<GValue>,

Source§

fn from(val: Either2<A, B>) -> Self

Converts to this type from the input type.
Source§

impl From<GKey> for GValue

Source§

fn from(val: GKey) -> Self

Converts to this type from the input type.
Source§

impl From<GValue> for Vec<GValue>

Source§

fn from(val: GValue) -> Self

Converts to this type from the input type.
Source§

impl From<GValue> for VecDeque<GValue>

Source§

fn from(val: GValue) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<GKey, GValue>> for GValue

Source§

fn from(val: HashMap<GKey, GValue>) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<String, GValue>> for GValue

Source§

fn from(val: HashMap<String, GValue>) -> Self

Converts to this type from the input type.
Source§

impl From<LabelType> for GValue

Source§

fn from(val: LabelType) -> GValue

Converts to this type from the input type.
Source§

impl From<Metric> for GValue

Source§

fn from(val: Metric) -> Self

Converts to this type from the input type.
Source§

impl From<Order> for GValue

Source§

fn from(val: Order) -> Self

Converts to this type from the input type.
Source§

impl From<Path> for GValue

Source§

fn from(val: Path) -> Self

Converts to this type from the input type.
Source§

impl From<Predicate> for GValue

Source§

fn from(val: Predicate) -> GValue

Converts to this type from the input type.
Source§

impl From<Property> for GValue

Source§

fn from(val: Property) -> Self

Converts to this type from the input type.
Source§

impl From<Scope> for GValue

Source§

fn from(val: Scope) -> Self

Converts to this type from the input type.
Source§

impl From<String> for GValue

Source§

fn from(val: String) -> Self

Converts to this type from the input type.
Source§

impl From<T> for GValue

Source§

fn from(val: T) -> GValue

Converts to this type from the input type.
Source§

impl From<TextP> for GValue

Source§

fn from(val: TextP) -> GValue

Converts to this type from the input type.
Source§

impl From<Token> for GValue

Source§

fn from(val: Token) -> Self

Converts to this type from the input type.
Source§

impl From<TraversalExplanation> for GValue

Source§

fn from(val: TraversalExplanation) -> Self

Converts to this type from the input type.
Source§

impl From<TraversalMetrics> for GValue

Source§

fn from(val: TraversalMetrics) -> Self

Converts to this type from the input type.
Source§

impl From<Traverser> for GValue

Source§

fn from(val: Traverser) -> Self

Converts to this type from the input type.
Source§

impl From<Uuid> for GValue

Source§

fn from(val: Uuid) -> GValue

Converts to this type from the input type.
Source§

impl From<Vec<GValue>> for GValue

Source§

fn from(val: Vec<GValue>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u8>> for GValue

Source§

fn from(val: Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl From<Vertex> for GValue

Source§

fn from(val: Vertex) -> Self

Converts to this type from the input type.
Source§

impl From<VertexProperty> for GValue

Source§

fn from(val: VertexProperty) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for GValue

Source§

fn from(val: bool) -> GValue

Converts to this type from the input type.
Source§

impl From<f32> for GValue

Source§

fn from(val: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for GValue

Source§

fn from(val: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for GValue

Source§

fn from(val: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for GValue

Source§

fn from(val: i64) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for GValue

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for GValue

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TryFrom<&GValue> for HashSet<DateTime<Utc>>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for HashSet<String>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for HashSet<Uuid>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for HashSet<bool>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for HashSet<i32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for HashSet<i64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<DateTime<Utc>>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<String>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<Uuid>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<bool>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<f32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<f64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<i32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<i64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for BTreeMap<String, GValue>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for DateTime<Utc>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashMap<GKey, GValue>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashMap<String, GValue>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashSet<DateTime<Utc>>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashSet<String>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashSet<Uuid>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashSet<bool>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashSet<i32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashSet<i64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<DateTime<Utc>>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<String>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<Uuid>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<bool>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<f32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<f64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<i32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<i64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for String

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Uuid

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<DateTime<Utc>>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<String>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<Uuid>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<bool>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<f32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<f64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<i32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<i64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for bool

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for f32

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for f64

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for i32

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for i64

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl StructuralPartialEq for GValue

Auto Trait Implementations§

§

impl Freeze for GValue

§

impl RefUnwindSafe for GValue

§

impl Send for GValue

§

impl Sync for GValue

§

impl Unpin for GValue

§

impl UnwindSafe for GValue

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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 T
where T: Clone,

Source§

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

Source§

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

Source§

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.