pub struct StoredEdge {
pub source_id: String,
pub target_id: String,
pub edge_type: String,
pub label_id: LabelId,
pub weight: f32,
pub page_id: u32,
pub slot: u16,
}Expand description
A graph edge stored on disk
Fields§
§source_id: String§target_id: String§edge_type: StringCanonical edge label string. Derived from [label_id] at decode time.
label_id: LabelIdAuthoritative label identifier resolved through LabelRegistry.
weight: f32§page_id: u32Page ID where this edge is stored
slot: u16Slot index within the page
Implementations§
Source§impl StoredEdge
impl StoredEdge
Sourcepub fn decode(data: &[u8], page_id: u32, slot: u16) -> Option<Self>
pub fn decode(data: &[u8], page_id: u32, slot: u16) -> Option<Self>
Decode edge from bytes (v2 format). For v1 records use [decode_v1].
Sourcepub fn decode_v1(data: &[u8], page_id: u32, slot: u16) -> Option<Self>
pub fn decode_v1(data: &[u8], page_id: u32, slot: u16) -> Option<Self>
Decode a v1 (legacy) edge record. The 1-byte enum discriminant maps
to the legacy reserved LabelId range via
LabelRegistry::legacy_edge_label_id.
Sourcepub fn encoded_size(&self) -> usize
pub fn encoded_size(&self) -> usize
Calculate encoded size (v2)
Trait Implementations§
Source§impl Clone for StoredEdge
impl Clone for StoredEdge
Source§fn clone(&self) -> StoredEdge
fn clone(&self) -> StoredEdge
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StoredEdge
impl RefUnwindSafe for StoredEdge
impl Send for StoredEdge
impl Sync for StoredEdge
impl Unpin for StoredEdge
impl UnsafeUnpin for StoredEdge
impl UnwindSafe for StoredEdge
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