pub trait Filterable {
Show 15 methods
// Required methods
fn type_name(&self) -> FilterableType;
fn id(&self) -> &u128;
fn uuid(&self) -> String;
fn label(&self) -> &str;
fn from_node(&self) -> u128;
fn from_node_uuid(&self) -> String;
fn to_node(&self) -> u128;
fn to_node_uuid(&self) -> String;
fn properties(self) -> Option<HashMap<String, Value>>;
fn vector_data(&self) -> &[f64];
fn score(&self) -> f64;
fn properties_mut(&mut self) -> &mut Option<HashMap<String, Value>>;
fn properties_ref(&self) -> &Option<HashMap<String, Value>>;
fn check_property(&self, key: &str) -> Result<&Value, GraphError>;
fn find_property<'a>(
&'a self,
key: &str,
secondary_properties: &'a HashMap<String, ReturnValue>,
property: &'a mut ReturnValue,
) -> Option<&'a ReturnValue>;
}
Expand description
Trait for types that can be filtered based on their properties. Implemented by both Node and Edge types.
Required Methods§
fn type_name(&self) -> FilterableType
fn id(&self) -> &u128
fn uuid(&self) -> String
fn label(&self) -> &str
fn from_node(&self) -> u128
fn from_node_uuid(&self) -> String
fn to_node(&self) -> u128
fn to_node_uuid(&self) -> String
fn properties(self) -> Option<HashMap<String, Value>>
fn vector_data(&self) -> &[f64]
fn score(&self) -> f64
fn properties_mut(&mut self) -> &mut Option<HashMap<String, Value>>
fn properties_ref(&self) -> &Option<HashMap<String, Value>>
fn check_property(&self, key: &str) -> Result<&Value, GraphError>
fn find_property<'a>( &'a self, key: &str, secondary_properties: &'a HashMap<String, ReturnValue>, property: &'a mut ReturnValue, ) -> Option<&'a ReturnValue>
Implementors§
impl Filterable for HVector
Filterable implementation for HVector
see helix_db/src/protocol/filterable.rs
NOTE: This could be moved to the protocol module with the node and edges in `helix_db/protocol/items.rs``