[][src]Trait redis_graph::WithProperties

pub trait WithProperties {
    pub fn get_property_value(&self, key: &str) -> Option<&Value>;

    pub fn get_property<T: FromRedisValue>(
        &self,
        key: &str
    ) -> RedisResult<Option<T>> { ... }
pub fn get_property_option<T: FromRedisValue>(&self, key: &str) -> Option<T> { ... } }

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

pub fn get_property_value(&self, key: &str) -> Option<&Value>[src]

Returns a raw Redis value at key.

Loading content...

Provided methods

pub fn get_property<T: FromRedisValue>(
    &self,
    key: &str
) -> RedisResult<Option<T>>
[src]

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.

pub fn get_property_option<T: FromRedisValue>(&self, key: &str) -> Option<T>[src]

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.

Loading content...

Implementors

impl WithProperties for NodeValue[src]

Allows property extraction on NodeValues.

impl WithProperties for RelationValue[src]

Allows property extraction on RelationValues.

Loading content...