pub struct EdgeIndex { /* private fields */ }Expand description
Edge index key: (source_id, edge_label) → Vec<target_id>.
Optimized for adjacency list queries; the edge label is the canonical
string form (e.g. "connects_to") — use the registry to resolve back to
a LabelId when needed.
Implementations§
Source§impl EdgeIndex
impl EdgeIndex
pub fn new(shard_count: usize) -> EdgeIndex
pub fn add_edge( &self, source: &str, target: &str, edge_label: &str, weight: f32, )
pub fn remove_edge(&self, source: &str, target: &str, edge_label: &str)
pub fn outgoing(&self, source: &str) -> Vec<(String, String, f32)>
pub fn incoming(&self, target: &str) -> Vec<(String, String, f32)>
pub fn outgoing_of_type( &self, source: &str, edge_label: &str, ) -> Vec<(String, f32)>
Auto Trait Implementations§
impl Freeze for EdgeIndex
impl RefUnwindSafe for EdgeIndex
impl Send for EdgeIndex
impl Sync for EdgeIndex
impl Unpin for EdgeIndex
impl UnsafeUnpin for EdgeIndex
impl UnwindSafe for EdgeIndex
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