Trait redis_graph::WithProperties [−][src]
pub trait WithProperties {
fn get_property_value(&self, key: &str) -> Option<&Value>;
fn get_property<T: FromRedisValue>(
&self,
key: &str
) -> RedisResult<Option<T>> { ... }
fn get_property_option<T: FromRedisValue>(&self, key: &str) -> Option<T> { ... }
}Expand description
Enhances object like graph values (Node, Relation) that contain a map of properties with extraction function that allow parsing of the inner Redis values into requested types.
Required methods
fn get_property_value(&self, key: &str) -> Option<&Value>
fn get_property_value(&self, key: &str) -> Option<&Value>
Returns a raw Redis value at key.
Provided methods
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.
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.
Implementors
Allows property extraction on NodeValues.
Allows property extraction on RelationValues.
