pub struct DirectedLinkId(/* private fields */);Expand description
An identifier for a link with a specific direction.
Implementations§
Source§impl DirectedLinkId
impl DirectedLinkId
Sourcepub fn new(link_id: LinkId, direction: Direction) -> DirectedLinkId
pub fn new(link_id: LinkId, direction: Direction) -> DirectedLinkId
Create a new directed link identifier.
Sourcepub fn reverse(self) -> DirectedLinkId
pub fn reverse(self) -> DirectedLinkId
Reverse the directed link to the other way.
Sourcepub fn from_clock(self) -> ClockId
pub fn from_clock(self) -> ClockId
Return the clock that is the source of the directed link.
Sourcepub fn to_clock(self) -> ClockId
pub fn to_clock(self) -> ClockId
Return the clock that is the destination of the directed link.
Sourcepub fn is_reverse_of(self, other: DirectedLinkId) -> bool
pub fn is_reverse_of(self, other: DirectedLinkId) -> bool
Returns true if the two directed links are the same link but in opposite directions.
Trait Implementations§
Source§impl Clone for DirectedLinkId
impl Clone for DirectedLinkId
impl Copy for DirectedLinkId
Source§impl Debug for DirectedLinkId
impl Debug for DirectedLinkId
impl Eq for DirectedLinkId
Source§impl Hash for DirectedLinkId
impl Hash for DirectedLinkId
Source§impl Ord for DirectedLinkId
impl Ord for DirectedLinkId
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 PartialEq for DirectedLinkId
impl PartialEq for DirectedLinkId
Source§impl PartialOrd for DirectedLinkId
impl PartialOrd for DirectedLinkId
impl StructuralPartialEq for DirectedLinkId
Auto Trait Implementations§
impl Freeze for DirectedLinkId
impl RefUnwindSafe for DirectedLinkId
impl Send for DirectedLinkId
impl Sync for DirectedLinkId
impl Unpin for DirectedLinkId
impl UnsafeUnpin for DirectedLinkId
impl UnwindSafe for DirectedLinkId
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