Struct redis_graph::RelationValue
source · pub struct RelationValue {
pub id: u64,
pub rel_type: String,
pub src_node: u64,
pub dest_node: u64,
pub properties: HashMap<String, Value>,
}
Expand description
Represents a Redis graph relation between two nodes. Like a node it can potentially contain one or multiple named fields.
Fields§
§id: u64
§rel_type: String
§src_node: u64
§dest_node: u64
§properties: HashMap<String, Value>
Trait Implementations§
source§impl Clone for RelationValue
impl Clone for RelationValue
source§fn clone(&self) -> RelationValue
fn clone(&self) -> RelationValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RelationValue
impl Debug for RelationValue
source§impl Default for RelationValue
impl Default for RelationValue
source§fn default() -> RelationValue
fn default() -> RelationValue
Returns the “default value” for a type. Read more
source§impl FromRedisValue for RelationValue
impl FromRedisValue for RelationValue
source§fn from_redis_value(v: &Value) -> RedisResult<Self>
fn from_redis_value(v: &Value) -> RedisResult<Self>
Given a redis
Value
this attempts to convert it into the given
destination type. If that fails because it’s not compatible an
appropriate error is generated.source§fn from_redis_values(items: &[Value]) -> Result<Vec<Self, Global>, RedisError>
fn from_redis_values(items: &[Value]) -> Result<Vec<Self, Global>, RedisError>
Similar to
from_redis_value
but constructs a vector of objects
from another vector of values. This primarily exists internally
to customize the behavior for vectors of tuples.source§impl WithProperties for RelationValue
impl WithProperties for RelationValue
Allows property extraction on RelationValues.
source§fn get_property<T: FromRedisValue>(&self, key: &str) -> RedisResult<Option<T>>
fn get_property<T: FromRedisValue>(&self, key: &str) -> RedisResult<Option<T>>
Extracts a property Redis value at key into an Option of the desired type. Will
return None in case the key did not exists. Will return an error in case the
value at key failed to be parsed into T.
source§fn get_property_option<T: FromRedisValue>(&self, key: &str) -> Option<T>
fn get_property_option<T: FromRedisValue>(&self, key: &str) -> Option<T>
Extracts a property Redis value at key into an Option of the desired type. Will
return None in case of the key did not exist or the value at key failed to be
parsed into T.
Auto Trait Implementations§
impl RefUnwindSafe for RelationValue
impl Send for RelationValue
impl Sync for RelationValue
impl Unpin for RelationValue
impl UnwindSafe for RelationValue
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