pub struct Eid(/* private fields */);Expand description
Internal Edge ID (64 bits) — pure auto-increment.
EIDs are dense, sequential identifiers assigned on edge creation; they no longer embed type information (edge-type lookups go via the edge tables).
Implementations§
Source§impl Eid
impl Eid
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 Eid
Source§impl<'de> Deserialize<'de> for Eid
impl<'de> Deserialize<'de> for Eid
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 Eid
Source§impl Ord for Eid
impl Ord for Eid
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 Eid
impl PartialOrd for Eid
impl StructuralPartialEq for Eid
Auto Trait Implementations§
impl Freeze for Eid
impl RefUnwindSafe for Eid
impl Send for Eid
impl Sync for Eid
impl Unpin for Eid
impl UnsafeUnpin for Eid
impl UnwindSafe for Eid
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