pub struct Relationship {
pub id: i64,
pub label_id: i64,
pub src: i64,
pub dest: i64,
pub properties: IndexMap<i64, GraphValue>,
}Expand description
Relationship Type
Fields§
§id: i64Redisgraph internal relationship id
label_id: i64Id of the relationships label that can be mapped to db.relationshipTypes()
src: i64Source Node Id
dest: i64Destination Node
properties: IndexMap<i64, GraphValue>Map of property ids to property values can be mapped by db.propertyKeys()
Implementations§
Trait Implementations§
Source§impl Clone for Relationship
impl Clone for Relationship
Source§fn clone(&self) -> Relationship
fn clone(&self) -> Relationship
Returns a duplicate 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 Relationship
impl Debug for Relationship
Source§impl FromGraphValue for Relationship
impl FromGraphValue for Relationship
Source§fn from_graph_value(value: GraphValue) -> RedisResult<Self>
fn from_graph_value(value: GraphValue) -> RedisResult<Self>
Converts the GraphValue to the implementing Type
Source§impl FromRedisValue for Relationship
impl FromRedisValue for Relationship
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>, RedisError>
fn from_redis_values(items: &[Value]) -> Result<Vec<Self>, 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 PartialEq for Relationship
impl PartialEq for Relationship
Source§impl PropertyAccess for Relationship
impl PropertyAccess for Relationship
Source§fn properties(&self) -> &IndexMap<i64, GraphValue>
fn properties(&self) -> &IndexMap<i64, GraphValue>
Returns a reference to the IndexMap containing the properties in order of definition and with the property key ids
Source§fn into_property_values<T: FromGraphValue>(self) -> RedisResult<T>
fn into_property_values<T: FromGraphValue>(self) -> RedisResult<T>
Same as
property_values() but consumes the object taking ownership of the GraphvaluesSource§fn get_property_by_label_id<T: FromGraphValue>(
&self,
label_id: i64,
) -> RedisResult<Option<T>>
fn get_property_by_label_id<T: FromGraphValue>( &self, label_id: i64, ) -> RedisResult<Option<T>>
get property by property label id
Source§fn get_property_by_index<T: FromGraphValue>(&self, idx: usize) -> RedisResult<T>
fn get_property_by_index<T: FromGraphValue>(&self, idx: usize) -> RedisResult<T>
gets a property by its order of definition
Note when relying on property order make sure every CREATE has the same order of these properties
Source§fn property_values<T: FromGraphValue>(&self) -> RedisResult<T>
fn property_values<T: FromGraphValue>(&self) -> RedisResult<T>
get property values in the order they were defined
impl StructuralPartialEq for Relationship
Auto Trait Implementations§
impl Freeze for Relationship
impl RefUnwindSafe for Relationship
impl Send for Relationship
impl Sync for Relationship
impl Unpin for Relationship
impl UnwindSafe for Relationship
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