pub enum EnqueueOutcome {
Enqueued(HostDeliveryRecord),
AlreadyQueued(HostDeliveryRecord),
}Expand description
What the ledger did with an offered delivery.
Idempotent by identity: the same item offered to the same destination twice is one delivery, and the second offer hands back what is already there rather than a second copy of it. That is what lets a projector replay the feed after a restart without doubling every hand-off it already made.
Variants§
Enqueued(HostDeliveryRecord)
New: the ledger is holding it now.
AlreadyQueued(HostDeliveryRecord)
Already held, in whatever state it had reached.
Implementations§
Source§impl EnqueueOutcome
impl EnqueueOutcome
pub const fn record(&self) -> &HostDeliveryRecord
pub const fn is_new(&self) -> bool
pub fn into_record(self) -> HostDeliveryRecord
Trait Implementations§
Source§impl Clone for EnqueueOutcome
impl Clone for EnqueueOutcome
Source§impl Debug for EnqueueOutcome
impl Debug for EnqueueOutcome
impl Eq for EnqueueOutcome
Source§impl PartialEq for EnqueueOutcome
impl PartialEq for EnqueueOutcome
impl StructuralPartialEq for EnqueueOutcome
Auto Trait Implementations§
impl Freeze for EnqueueOutcome
impl RefUnwindSafe for EnqueueOutcome
impl Send for EnqueueOutcome
impl Sync for EnqueueOutcome
impl Unpin for EnqueueOutcome
impl UnsafeUnpin for EnqueueOutcome
impl UnwindSafe for EnqueueOutcome
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