Struct redis_graph::NodeValue
source · pub struct NodeValue {
pub id: u64,
pub labels: Vec<String>,
pub properties: HashMap<String, Value>,
}
Expand description
Represents a Redis graph node which is an object like structure with potentially multiple named fields.
Fields§
§id: u64
§labels: Vec<String>
§properties: HashMap<String, Value>
Trait Implementations§
source§impl FromRedisValue for NodeValue
impl FromRedisValue for NodeValue
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 NodeValue
impl WithProperties for NodeValue
Allows property extraction on NodeValues.
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 NodeValue
impl Send for NodeValue
impl Sync for NodeValue
impl Unpin for NodeValue
impl UnwindSafe for NodeValue
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