pub enum AckOutcome {
Acknowledged(HostDeliveryRecord),
AlreadyAcknowledged(HostDeliveryRecord),
Conflict {
existing: Box<HostDeliveryObservation>,
},
LeaseNotOwned,
}Expand description
What the ledger did with a host’s report about a delivery.
The four answers are deliberately different things. A repeat of the same report is the same fact arriving twice and costs nothing; a different report about a delivery already acknowledged is two hosts disagreeing and must not be flattened into the later one; and a lease that is not the current one is a host that was replaced while it was away, whose answer arrives too late to be worth anything.
Variants§
Acknowledged(HostDeliveryRecord)
Recorded.
AlreadyAcknowledged(HostDeliveryRecord)
The same report, already recorded.
Conflict
A different report about a delivery that is already acknowledged.
Fields
§
existing: Box<HostDeliveryObservation>LeaseNotOwned
The lease offered is not the one that holds this delivery.
Implementations§
Source§impl AckOutcome
impl AckOutcome
Sourcepub const fn record(&self) -> Option<&HostDeliveryRecord>
pub const fn record(&self) -> Option<&HostDeliveryRecord>
The record, when the call reached one.
pub const fn is_recorded(&self) -> bool
Trait Implementations§
Source§impl Clone for AckOutcome
impl Clone for AckOutcome
Source§impl Debug for AckOutcome
impl Debug for AckOutcome
impl Eq for AckOutcome
Source§impl PartialEq for AckOutcome
impl PartialEq for AckOutcome
impl StructuralPartialEq for AckOutcome
Auto Trait Implementations§
impl Freeze for AckOutcome
impl RefUnwindSafe for AckOutcome
impl Send for AckOutcome
impl Sync for AckOutcome
impl Unpin for AckOutcome
impl UnsafeUnpin for AckOutcome
impl UnwindSafe for AckOutcome
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