pub struct CollaborationLink { /* private fields */ }Expand description
One arrow of the topology: who works with whom, and in what way.
Implementations§
Source§impl CollaborationLink
impl CollaborationLink
Sourcepub fn new(
from: ParticipantId,
to: ParticipantId,
kind: CollaborationKind,
channel: Option<ChannelName>,
handoff: bool,
) -> Result<Self, DomainError>
pub fn new( from: ParticipantId, to: ParticipantId, kind: CollaborationKind, channel: Option<ChannelName>, handoff: bool, ) -> Result<Self, DomainError>
Construct a link between two distinct participants.
A participant collaborating with itself is refused here rather than reported as a finding: it says nothing about the system, and a diagram would draw a loop nobody meant.
pub const fn from(&self) -> &ParticipantId
pub const fn to(&self) -> &ParticipantId
pub const fn kind(&self) -> CollaborationKind
pub const fn channel(&self) -> Option<&ChannelName>
Sourcepub const fn is_handoff(&self) -> bool
pub const fn is_handoff(&self) -> bool
Whether the work itself changes hands along this link.
Trait Implementations§
Source§impl Clone for CollaborationLink
impl Clone for CollaborationLink
Source§impl Debug for CollaborationLink
impl Debug for CollaborationLink
Source§impl<'de> Deserialize<'de> for CollaborationLink
Decoding goes through the constructor, so a stored or transmitted
link joining a participant to itself is refused where it arrives
rather than drawn as a loop nobody meant.
impl<'de> Deserialize<'de> for CollaborationLink
Decoding goes through the constructor, so a stored or transmitted link joining a participant to itself is refused where it arrives rather than drawn as a loop nobody meant.
The wire shape lives inside the function because it is this function’s business and nothing else’s.
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CollaborationLink
Source§impl Hash for CollaborationLink
impl Hash for CollaborationLink
Source§impl Ord for CollaborationLink
impl Ord for CollaborationLink
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 CollaborationLink
impl PartialEq for CollaborationLink
Source§impl PartialOrd for CollaborationLink
impl PartialOrd for CollaborationLink
Source§impl Serialize for CollaborationLink
impl Serialize for CollaborationLink
impl StructuralPartialEq for CollaborationLink
Auto Trait Implementations§
impl Freeze for CollaborationLink
impl RefUnwindSafe for CollaborationLink
impl Send for CollaborationLink
impl Sync for CollaborationLink
impl Unpin for CollaborationLink
impl UnsafeUnpin for CollaborationLink
impl UnwindSafe for CollaborationLink
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