pub struct CompressedIndex { /* private fields */ }Expand description
Compressed index using multiple encoding strategies
Implementations§
Source§impl CompressedIndex
impl CompressedIndex
pub fn new() -> Self
Sourcepub fn add_to_label_index(&self, label: &str, node_id: u64)
pub fn add_to_label_index(&self, label: &str, node_id: u64)
Add node to label index
Sourcepub fn get_nodes_by_label(&self, label: &str) -> Vec<u64>
pub fn get_nodes_by_label(&self, label: &str) -> Vec<u64>
Get all nodes with a specific label
Sourcepub fn has_label(&self, label: &str, node_id: u64) -> bool
pub fn has_label(&self, label: &str, node_id: u64) -> bool
Check if node has label (fast bitmap lookup)
Sourcepub fn count_label(&self, label: &str) -> u64
pub fn count_label(&self, label: &str) -> u64
Count nodes with label
Sourcepub fn intersect_labels(&self, labels: &[&str]) -> Vec<u64>
pub fn intersect_labels(&self, labels: &[&str]) -> Vec<u64>
Intersect multiple labels (efficient bitmap AND)
Sourcepub fn union_labels(&self, labels: &[&str]) -> Vec<u64>
pub fn union_labels(&self, labels: &[&str]) -> Vec<u64>
Union multiple labels (efficient bitmap OR)
Sourcepub fn encode_string(&self, s: &str) -> u32
pub fn encode_string(&self, s: &str) -> u32
Encode string using dictionary
Sourcepub fn decode_string(&self, id: u32) -> Option<String>
pub fn decode_string(&self, id: u32) -> Option<String>
Decode string from dictionary
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompressedIndex
impl !RefUnwindSafe for CompressedIndex
impl Send for CompressedIndex
impl Sync for CompressedIndex
impl Unpin for CompressedIndex
impl !UnwindSafe for CompressedIndex
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> 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