pub struct StoredNode {
pub id: String,
pub label: String,
pub node_type: String,
pub label_id: LabelId,
pub flags: u8,
pub out_edge_count: u32,
pub in_edge_count: u32,
pub page_id: u32,
pub slot: u16,
pub table_ref: Option<TableRef>,
pub vector_ref: Option<(String, u64)>,
}Expand description
A graph node stored on disk
Fields§
§id: String§label: String§node_type: StringCanonical category label string (e.g. "host", "order"). Resolved
from [label_id] at decode time via the legacy seed mapping.
Caller-visible string; the registry-stored [label_id] is the
source-of-truth identifier.
label_id: LabelIdAuthoritative label identifier resolved through LabelRegistry.
flags: u8§out_edge_count: u32§in_edge_count: u32§page_id: u32Page ID where this node is stored
slot: u16Slot index within the page
table_ref: Option<TableRef>Optional reference to a table row (for unified queries)
vector_ref: Option<(String, u64)>Optional reference to a vector embedding (collection name, vector_id)
Implementations§
Source§impl StoredNode
impl StoredNode
Sourcepub fn encode(&self) -> Vec<u8> ⓘ
pub fn encode(&self) -> Vec<u8> ⓘ
Encode node to bytes in v2 format (label_id replaces node_type).
Sourcepub fn decode(data: &[u8], page_id: u32, slot: u16) -> Option<StoredNode>
pub fn decode(data: &[u8], page_id: u32, slot: u16) -> Option<StoredNode>
Decode node from bytes (v2 format). For v1 records use [decode_v1].
Sourcepub fn decode_v1(data: &[u8], page_id: u32, slot: u16) -> Option<StoredNode>
pub fn decode_v1(data: &[u8], page_id: u32, slot: u16) -> Option<StoredNode>
Decode a v1 (legacy) node record. The caller must supply a
LabelRegistry seeded via LabelRegistry::with_legacy_seed so
the legacy node_type discriminant maps to the correct reserved
LabelId.
Sourcepub fn encoded_size(&self) -> usize
pub fn encoded_size(&self) -> usize
Calculate encoded size
Sourcepub fn link_to_row(&mut self, table_id: u16, row_id: u64)
pub fn link_to_row(&mut self, table_id: u16, row_id: u64)
Link this node to a table row
Sourcepub fn unlink_from_row(&mut self)
pub fn unlink_from_row(&mut self)
Unlink from table row
Sourcepub fn link_to_vector(&mut self, collection: String, vector_id: u64)
pub fn link_to_vector(&mut self, collection: String, vector_id: u64)
Link this node to a vector embedding
Sourcepub fn unlink_from_vector(&mut self)
pub fn unlink_from_vector(&mut self)
Unlink from vector embedding
Trait Implementations§
Source§impl Clone for StoredNode
impl Clone for StoredNode
Source§fn clone(&self) -> StoredNode
fn clone(&self) -> StoredNode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StoredNode
impl Debug for StoredNode
Source§impl From<&StoredNode> for MatchedNode
impl From<&StoredNode> for MatchedNode
Source§fn from(node: &StoredNode) -> MatchedNode
fn from(node: &StoredNode) -> MatchedNode
Auto Trait Implementations§
impl Forget for StoredNode
impl Freeze for StoredNode
impl Move for StoredNode
impl RefUnwindSafe for StoredNode
impl Send for StoredNodewhere
RawVecInner: Send,
impl Sync for StoredNodewhere
RawVecInner: Sync,
impl Unpin for StoredNode
impl UnsafeUnpin for StoredNode
impl UnwindSafe for StoredNodewhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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> ⓘ
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> ⓘ
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>
T in a tonic::Request