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> { ... } }

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>[src]

Returns a raw Redis value at key.

Loading content...

Provided methods

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.

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...