pub struct IndependenceRule { /* private fields */ }Expand description
A demand that one role’s work be judged by somebody other than whoever did it.
The rule is about roles; whether it holds is about participants, and the analysis is what compares the two. A design can therefore state the requirement long before anybody knows who will play it.
Implementations§
Source§impl IndependenceRule
impl IndependenceRule
Sourcepub fn new(
reviewer: SystemRoleId,
subject: SystemRoleId,
) -> Result<Self, DomainError>
pub fn new( reviewer: SystemRoleId, subject: SystemRoleId, ) -> Result<Self, DomainError>
Construct a rule between two distinct roles.
A role required to be independent of itself is not a strict rule; it is one that can never hold, and refusing it at construction keeps an unsatisfiable design from being written down at all.
pub const fn reviewer(&self) -> &SystemRoleId
pub const fn reviewed(&self) -> &SystemRoleId
Trait Implementations§
Source§impl Clone for IndependenceRule
impl Clone for IndependenceRule
Source§impl Debug for IndependenceRule
impl Debug for IndependenceRule
Source§impl<'de> Deserialize<'de> for IndependenceRule
Decoding goes through the constructor, so a rule that could never
hold cannot arrive from a document and sit in a design looking
satisfied.
impl<'de> Deserialize<'de> for IndependenceRule
Decoding goes through the constructor, so a rule that could never hold cannot arrive from a document and sit in a design looking satisfied.
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 IndependenceRule
Source§impl Hash for IndependenceRule
impl Hash for IndependenceRule
Source§impl Ord for IndependenceRule
impl Ord for IndependenceRule
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 IndependenceRule
impl PartialEq for IndependenceRule
Source§impl PartialOrd for IndependenceRule
impl PartialOrd for IndependenceRule
Source§impl Serialize for IndependenceRule
impl Serialize for IndependenceRule
impl StructuralPartialEq for IndependenceRule
Auto Trait Implementations§
impl Freeze for IndependenceRule
impl RefUnwindSafe for IndependenceRule
impl Send for IndependenceRule
impl Sync for IndependenceRule
impl Unpin for IndependenceRule
impl UnsafeUnpin for IndependenceRule
impl UnwindSafe for IndependenceRule
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