pub struct EdgeId { /* private fields */ }Expand description
Collision-free identity for a stored edge or a synthesized reversal.
Generation zero is the original Helix edge. Positive generations identify synthesized reversals without modifying or reserving user-controlled IDs.
Implementations§
Source§impl EdgeId
impl EdgeId
Sourcepub fn synthesized_reverse(
id: impl Into<String>,
generation: u64,
) -> Option<EdgeId>
pub fn synthesized_reverse( id: impl Into<String>, generation: u64, ) -> Option<EdgeId>
Construct a synthesized-reverse identity at a non-zero generation.
Sourcepub fn reversed(&self) -> Option<EdgeId>
pub fn reversed(&self) -> Option<EdgeId>
Derive the next structural reversal when its generation is representable.
Sourcepub const fn reverse_generation(&self) -> u64
pub const fn reverse_generation(&self) -> u64
Zero for stored edges; positive for synthesized reversals.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EdgeId
impl<'de> Deserialize<'de> for EdgeId
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EdgeId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EdgeId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EdgeId
Source§impl Ord for EdgeId
impl Ord for EdgeId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for EdgeId
impl PartialOrd for EdgeId
Source§impl Serialize for EdgeId
impl Serialize for EdgeId
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for EdgeId
Auto Trait Implementations§
impl Freeze for EdgeId
impl RefUnwindSafe for EdgeId
impl Send for EdgeId
impl Sync for EdgeId
impl Unpin for EdgeId
impl UnsafeUnpin for EdgeId
impl UnwindSafe for EdgeId
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
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
Compare self to
key and return true if they are equal.