pub struct LabelIndex { /* private fields */ }Expand description
Label index for nodes (maps labels to node IDs)
Implementations§
Source§impl LabelIndex
impl LabelIndex
Sourcepub fn remove_node(&self, node: &Node)
pub fn remove_node(&self, node: &Node)
Remove a node from the index
Sourcepub fn get_nodes_by_label(&self, label: &str) -> Vec<NodeId> ⓘ
pub fn get_nodes_by_label(&self, label: &str) -> Vec<NodeId> ⓘ
Get all nodes with a specific label
Sourcepub fn all_labels(&self) -> Vec<String>
pub fn all_labels(&self) -> Vec<String>
Get all labels in the index
Sourcepub fn count_by_label(&self, label: &str) -> usize
pub fn count_by_label(&self, label: &str) -> usize
Count nodes with a specific label
Trait Implementations§
Source§impl Clone for LabelIndex
impl Clone for LabelIndex
Source§fn clone(&self) -> LabelIndex
fn clone(&self) -> LabelIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LabelIndex
impl Debug for LabelIndex
Auto Trait Implementations§
impl Freeze for LabelIndex
impl !RefUnwindSafe for LabelIndex
impl Send for LabelIndex
impl Sync for LabelIndex
impl Unpin for LabelIndex
impl !UnwindSafe for LabelIndex
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request