pub struct Vid(/* private fields */);Expand description
Internal Vertex ID (64 bits) — pure auto-increment.
VIDs are dense, sequential identifiers assigned on vertex creation; they
no longer embed label information (label lookups go via the
VidLabelsIndex). For O(1) array indexing during query execution, use
DenseIdx via VidRemapper.
Implementations§
Source§impl Vid
impl Vid
Sourcepub const EPHEMERAL_BIT: u64
pub const EPHEMERAL_BIT: u64
Top bit reserved for ephemeral (transient, in-query) identities
allocated by host.allocate_transient_id() (M5g / proposal §4.13.1).
Storage write paths must reject any id with this bit set.
Sourcepub fn is_invalid(&self) -> bool
pub fn is_invalid(&self) -> bool
Check if this id is the invalid sentinel.
Sourcepub fn ephemeral(transient_id: u64) -> Self
pub fn ephemeral(transient_id: u64) -> Self
Construct an ephemeral id from a transient_id (bottom 63 bits).
Returns INVALID if transient_id overflows the 63-bit range.
Sourcepub fn is_ephemeral(&self) -> bool
pub fn is_ephemeral(&self) -> bool
True if this id’s high bit is set, i.e. it was minted by
host.allocate_transient_id() and is not backed by storage.
INVALID (all bits set) also satisfies this; callers that care
about the distinction should check is_invalid() first.
Sourcepub fn transient_id(&self) -> Option<u64>
pub fn transient_id(&self) -> Option<u64>
Bottom 63 bits when self is ephemeral, else None.
Trait Implementations§
impl Copy for Vid
Source§impl<'de> Deserialize<'de> for Vid
impl<'de> Deserialize<'de> for Vid
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Vid
Source§impl Ord for Vid
impl Ord for Vid
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Vid
impl PartialOrd for Vid
impl StructuralPartialEq for Vid
Auto Trait Implementations§
impl Freeze for Vid
impl RefUnwindSafe for Vid
impl Send for Vid
impl Sync for Vid
impl Unpin for Vid
impl UnsafeUnpin for Vid
impl UnwindSafe for Vid
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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 more