pub struct AllowanceEnd { /* private fields */ }Expand description
Terminal End Event Message for a proposed or accepted Allowance.
Implementations§
Source§impl AllowanceEnd
impl AllowanceEnd
Sourcepub fn withdrawal(
event_id: EventId,
allowance_id: AllowanceId,
proposal_event_id: EventId,
) -> Result<Self>
pub fn withdrawal( event_id: EventId, allowance_id: AllowanceId, proposal_event_id: EventId, ) -> Result<Self>
Create a proposal withdrawal with a null Acceptance Event ID.
The End and Proposal Event IDs must be distinct.
Sourcepub fn accepted(
event_id: EventId,
allowance_id: AllowanceId,
proposal_event_id: EventId,
acceptance_event_id: EventId,
) -> Result<Self>
pub fn accepted( event_id: EventId, allowance_id: AllowanceId, proposal_event_id: EventId, acceptance_event_id: EventId, ) -> Result<Self>
Create an End for accepted authority with pairwise-distinct Event IDs.
Sourcepub fn kind(&self) -> PrivateMessageKind
pub fn kind(&self) -> PrivateMessageKind
Access the Private Message Kind.
Sourcepub fn allowance_id(&self) -> &AllowanceId
pub fn allowance_id(&self) -> &AllowanceId
Access the Allowance ID.
Sourcepub fn proposal_event_id(&self) -> &EventId
pub fn proposal_event_id(&self) -> &EventId
Access the referenced Proposal Event ID.
Sourcepub fn acceptance_event_id(&self) -> Option<&EventId>
pub fn acceptance_event_id(&self) -> Option<&EventId>
Access the Acceptance Event ID, or None for a proposal withdrawal.
Sourcepub fn validate_withdrawal_for_proposal(
&self,
proposal: &AllowanceProposal,
authenticated_sender_role: AllowanceRole,
) -> Result<()>
pub fn validate_withdrawal_for_proposal( &self, proposal: &AllowanceProposal, authenticated_sender_role: AllowanceRole, ) -> Result<()>
Validate a proposal withdrawal by the authenticated proposal sender.
Sourcepub fn validate_for_accepted_allowance(
&self,
proposal: &AllowanceProposal,
acceptance: &AllowanceAcceptance,
acceptance_authenticated_sender_role: AllowanceRole,
) -> Result<()>
pub fn validate_for_accepted_allowance( &self, proposal: &AllowanceProposal, acceptance: &AllowanceAcceptance, acceptance_authenticated_sender_role: AllowanceRole, ) -> Result<()>
Validate accepted authority and its causal End references.
The Acceptance sender must be the proposal recipient. Accepted authority may be ended by either party, so the caller remains responsible for establishing that the End arrived on the proposal’s exact authenticated Encrypted Link.