pub struct LinkId(/* private fields */);Expand description
Unique identifier for a link
This consists of the two clocks that are linked, and a unique identifier for the link itself. A link has no direction in nature, so the order of the clocks does not matter. The third element, the unique identifier, is used to distinguish between multiple links between the same two clocks.
Implementations§
Source§impl LinkId
impl LinkId
Sourcepub fn first_clock(self) -> ClockId
pub fn first_clock(self) -> ClockId
Get the first clock in the link.
Sourcepub fn second_clock(self) -> ClockId
pub fn second_clock(self) -> ClockId
Get the second clock in the link.
Sourcepub fn contains_clock(self, clock: ClockId) -> bool
pub fn contains_clock(self, clock: ClockId) -> bool
Check if the given clock is part of a link.
Sourcepub fn forward(self) -> DirectedLinkId
pub fn forward(self) -> DirectedLinkId
Get a directed link identifier for the link in the forward direction.
This is the direction from the first to the second clock.
Sourcepub fn reverse(self) -> DirectedLinkId
pub fn reverse(self) -> DirectedLinkId
Get a directed link identifier for the link in the reverse direction.
This is the direction from the second to the first clock.
Trait Implementations§
impl Copy for LinkId
impl Eq for LinkId
Source§impl Ord for LinkId
impl Ord for LinkId
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for LinkId
impl PartialOrd for LinkId
impl StructuralPartialEq for LinkId
Auto Trait Implementations§
impl Freeze for LinkId
impl RefUnwindSafe for LinkId
impl Send for LinkId
impl Sync for LinkId
impl Unpin for LinkId
impl UnsafeUnpin for LinkId
impl UnwindSafe for LinkId
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