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§
Sourcefn properties(&self) -> &IndexMap<i64, GraphValue>
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
Sourcefn into_property_values<T: FromGraphValue>(self) -> RedisResult<T>
fn into_property_values<T: FromGraphValue>(self) -> RedisResult<T>
Same as property_values() but consumes the object taking ownership of the Graphvalues
Provided Methods§
Sourcefn get_property_by_label_id<T: FromGraphValue>(
&self,
label_id: i64,
) -> RedisResult<Option<T>>
fn get_property_by_label_id<T: FromGraphValue>( &self, label_id: i64, ) -> RedisResult<Option<T>>
get property by property label id
Sourcefn get_property_by_index<T: FromGraphValue>(&self, idx: usize) -> RedisResult<T>
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
Sourcefn property_values<T: FromGraphValue>(&self) -> RedisResult<T>
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.