pub enum CeremonyInterventionTarget {
Table,
Roles(InterventionRoleIds),
AgentExecution(DeliveryRecipient),
}Variants§
Table
Roles(InterventionRoleIds)
AgentExecution(DeliveryRecipient)
One named agent execution of one named process generation.
The exact shape, and the only one that can be wrong about who answered: a seat is filled by whoever holds it, but a process generation is a particular run, and an intervention addressed to it dies with it unless the asker said to follow.
Implementations§
Source§impl CeremonyInterventionTarget
impl CeremonyInterventionTarget
pub const fn table() -> Self
pub fn roles( role_ids: impl IntoIterator<Item = RoleId>, ) -> Result<Self, DomainError>
pub const fn agent_execution(recipient: DeliveryRecipient) -> Self
pub fn accepts(&self, role_id: &RoleId) -> bool
pub fn role_ids(&self) -> Option<&BTreeSet<RoleId>>
pub const fn is_table(&self) -> bool
Sourcepub const fn exact_recipient(&self) -> Option<&DeliveryRecipient>
pub const fn exact_recipient(&self) -> Option<&DeliveryRecipient>
The one recipient this target names, when it names exactly one.
Sourcepub fn admits_recipient(&self, recipient: &DeliveryRecipient) -> bool
pub fn admits_recipient(&self, recipient: &DeliveryRecipient) -> bool
Whether a recipient offering an answer is the one addressed.
An exact target checks the process generation as well as the execution, because a replaced agent answering for its predecessor is precisely the confusion this target exists to prevent. A seat or the table checks only that the role is one the item was put to.
Trait Implementations§
Source§impl Clone for CeremonyInterventionTarget
impl Clone for CeremonyInterventionTarget
Source§impl Debug for CeremonyInterventionTarget
impl Debug for CeremonyInterventionTarget
Source§impl<'de> Deserialize<'de> for CeremonyInterventionTarget
impl<'de> Deserialize<'de> for CeremonyInterventionTarget
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CeremonyInterventionTarget
impl StructuralPartialEq for CeremonyInterventionTarget
Auto Trait Implementations§
impl Freeze for CeremonyInterventionTarget
impl RefUnwindSafe for CeremonyInterventionTarget
impl Send for CeremonyInterventionTarget
impl Sync for CeremonyInterventionTarget
impl Unpin for CeremonyInterventionTarget
impl UnsafeUnpin for CeremonyInterventionTarget
impl UnwindSafe for CeremonyInterventionTarget
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