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
impl GValue
pub fn from_bytes(variant: usize, bytes: Vec<u8>) -> GValue
pub fn to_variant(&self) -> u8
pub fn is_null(&self) -> bool
pub fn bytes(&self) -> Vec<u8> ⓘ
pub fn take<T>(self) -> GremlinResult<T>where
T: FromGValue,
pub fn get<'a, T>(&'a self) -> GremlinResult<&'a T>where
T: BorrowFromGValue,
pub fn is_cardinality(&self) -> bool
Trait Implementations§
Source§impl From<Cardinality> for GValue
impl From<Cardinality> for GValue
Source§fn from(val: Cardinality) -> GValue
fn from(val: Cardinality) -> GValue
Converts to this type from the input type.
Source§impl From<TraversalExplanation> for GValue
impl From<TraversalExplanation> for GValue
Source§fn from(val: TraversalExplanation) -> Self
fn from(val: TraversalExplanation) -> Self
Converts to this type from the input type.
Source§impl From<TraversalMetrics> for GValue
impl From<TraversalMetrics> for GValue
Source§fn from(val: TraversalMetrics) -> Self
fn from(val: TraversalMetrics) -> Self
Converts to this type from the input type.
Source§impl From<VertexProperty> for GValue
impl From<VertexProperty> for GValue
Source§fn from(val: VertexProperty) -> Self
fn from(val: VertexProperty) -> Self
Converts to this type from the input type.
Source§impl PartialOrd for GValue
impl PartialOrd for GValue
Source§impl TryFrom<&GValue> for HashSet<DateTime<Utc>>
impl TryFrom<&GValue> for HashSet<DateTime<Utc>>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<&GValue> for HashSet<String>
impl TryFrom<&GValue> for HashSet<String>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<&GValue> for HashSet<Uuid>
impl TryFrom<&GValue> for HashSet<Uuid>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<&GValue> for HashSet<bool>
impl TryFrom<&GValue> for HashSet<bool>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<&GValue> for HashSet<i32>
impl TryFrom<&GValue> for HashSet<i32>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<&GValue> for HashSet<i64>
impl TryFrom<&GValue> for HashSet<i64>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<&GValue> for Vec<DateTime<Utc>>
impl TryFrom<&GValue> for Vec<DateTime<Utc>>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<&GValue> for Vec<String>
impl TryFrom<&GValue> for Vec<String>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<&GValue> for Vec<Uuid>
impl TryFrom<&GValue> for Vec<Uuid>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<&GValue> for Vec<bool>
impl TryFrom<&GValue> for Vec<bool>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<&GValue> for Vec<f32>
impl TryFrom<&GValue> for Vec<f32>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<&GValue> for Vec<f64>
impl TryFrom<&GValue> for Vec<f64>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<&GValue> for Vec<i32>
impl TryFrom<&GValue> for Vec<i32>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<&GValue> for Vec<i64>
impl TryFrom<&GValue> for Vec<i64>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: &GValue) -> GremlinResult<Self>
fn try_from(value: &GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for BTreeMap<String, GValue>
impl TryFrom<GValue> for BTreeMap<String, GValue>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for DateTime<Utc>
impl TryFrom<GValue> for DateTime<Utc>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for HashMap<GKey, GValue>
impl TryFrom<GValue> for HashMap<GKey, GValue>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for HashMap<String, GValue>
impl TryFrom<GValue> for HashMap<String, GValue>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for HashSet<DateTime<Utc>>
impl TryFrom<GValue> for HashSet<DateTime<Utc>>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for HashSet<String>
impl TryFrom<GValue> for HashSet<String>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for HashSet<Uuid>
impl TryFrom<GValue> for HashSet<Uuid>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for HashSet<bool>
impl TryFrom<GValue> for HashSet<bool>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for HashSet<i32>
impl TryFrom<GValue> for HashSet<i32>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for HashSet<i64>
impl TryFrom<GValue> for HashSet<i64>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Option<DateTime<Utc>>
impl TryFrom<GValue> for Option<DateTime<Utc>>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Option<String>
impl TryFrom<GValue> for Option<String>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Option<Uuid>
impl TryFrom<GValue> for Option<Uuid>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Option<bool>
impl TryFrom<GValue> for Option<bool>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Option<f32>
impl TryFrom<GValue> for Option<f32>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Option<f64>
impl TryFrom<GValue> for Option<f64>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Option<i32>
impl TryFrom<GValue> for Option<i32>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Option<i64>
impl TryFrom<GValue> for Option<i64>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for String
impl TryFrom<GValue> for String
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Uuid
impl TryFrom<GValue> for Uuid
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Vec<DateTime<Utc>>
impl TryFrom<GValue> for Vec<DateTime<Utc>>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Vec<String>
impl TryFrom<GValue> for Vec<String>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Vec<Uuid>
impl TryFrom<GValue> for Vec<Uuid>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Vec<bool>
impl TryFrom<GValue> for Vec<bool>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Vec<f32>
impl TryFrom<GValue> for Vec<f32>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Vec<f64>
impl TryFrom<GValue> for Vec<f64>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Vec<i32>
impl TryFrom<GValue> for Vec<i32>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for Vec<i64>
impl TryFrom<GValue> for Vec<i64>
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for bool
impl TryFrom<GValue> for bool
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for f32
impl TryFrom<GValue> for f32
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for f64
impl TryFrom<GValue> for f64
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for i32
impl TryFrom<GValue> for i32
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
Source§impl TryFrom<GValue> for i64
impl TryFrom<GValue> for i64
Source§type Error = GremlinError
type Error = GremlinError
The type returned in the event of a conversion error.
Source§fn try_from(value: GValue) -> GremlinResult<Self>
fn try_from(value: GValue) -> GremlinResult<Self>
Performs the conversion.
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more