pub struct Node {
pub id: i64,
pub label_ids: Vec<i64>,
pub properties: IndexMap<i64, GraphValue>,
}Expand description
Node Type
Fields§
§id: i64Redisgraph internal node id
label_ids: Vec<i64>Ids of the nodes labels that can be mapped to db.labels()
properties: IndexMap<i64, GraphValue>Map of property ids to property values can be mapped to db.propertyKeys()
Implementations§
Trait Implementations§
Source§impl FromGraphValue for Node
impl FromGraphValue for Node
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 Node
impl FromRedisValue for Node
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 PropertyAccess for Node
impl PropertyAccess for Node
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 Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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