pub struct AttributeView<'a, N: Node> { /* private fields */ }
Expand description
Attribute view for efficient querying and filtering
Implementations§
Source§impl<'a, N: Node> AttributeView<'a, N>
impl<'a, N: Node> AttributeView<'a, N>
Sourcepub fn new(attributes: &'a HashMap<N, Attributes>) -> Self
pub fn new(attributes: &'a HashMap<N, Attributes>) -> Self
Create a new attribute view
Sourcepub fn nodes_in_numeric_range(&self, key: &str, min: f64, max: f64) -> Vec<&N>
pub fn nodes_in_numeric_range(&self, key: &str, min: f64, max: f64) -> Vec<&N>
Find nodes with numeric attributes in a range
Sourcepub fn nodes_matching_pattern(&self, key: &str, pattern: &str) -> Vec<&N>
pub fn nodes_matching_pattern(&self, key: &str, pattern: &str) -> Vec<&N>
Find nodes with string attributes matching a pattern
Sourcepub fn unique_values(&self, key: &str) -> Vec<&AttributeValue>
pub fn unique_values(&self, key: &str) -> Vec<&AttributeValue>
Get all unique values for a specific attribute key
Auto Trait Implementations§
impl<'a, N> Freeze for AttributeView<'a, N>
impl<'a, N> RefUnwindSafe for AttributeView<'a, N>where
N: RefUnwindSafe,
impl<'a, N> Send for AttributeView<'a, N>
impl<'a, N> Sync for AttributeView<'a, N>
impl<'a, N> Unpin for AttributeView<'a, N>
impl<'a, N> UnwindSafe for AttributeView<'a, N>where
N: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more