PropertyAccess

Trait PropertyAccess 

Source
pub trait PropertyAccess {
    // Required methods
    fn properties(&self) -> &IndexMap<i64, GraphValue>;
    fn into_property_values<T: FromGraphValue>(self) -> RedisResult<T>;

    // Provided methods
    fn get_property_by_label_id<T: FromGraphValue>(
        &self,
        label_id: i64,
    ) -> RedisResult<Option<T>> { ... }
    fn get_property_by_index<T: FromGraphValue>(
        &self,
        idx: usize,
    ) -> RedisResult<T> { ... }
    fn property_values<T: FromGraphValue>(&self) -> RedisResult<T> { ... }
}
Expand description

Trait for unifying access to Node and Relationship properties

Required Methods§

Source

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>

Same as property_values() but consumes the object taking ownership of the Graphvalues

Provided Methods§

Source

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>

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>

get property values in the order they were defined

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§