#[non_exhaustive]pub enum ReplayPolicy<'a> {
Guard(&'a dyn ReplayGuard),
NotConsequential,
}Expand description
How a consumer applies SPEC §7.2 item 11 in
consume_inbound.
The choice is required rather than defaulted, for the reason
PayloadPolicy is: a consumer should decide
knowingly whether the task it implements is consequential, not discover
after an incident that it never kept a record.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Guard(&'a dyn ReplayGuard)
Apply item 11 using this guard. The correct setting for any consequential specification.
NotConsequential
Do not keep a duplicate-execution record.
Conformant only where the task is not consequential (§2), or where the Trust Task specification “explicitly declares repeated execution safe and intended” — the narrow disapplication item 11 allows, which is a property of the operation and not of the consumer’s convenience.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ReplayPolicy<'a>
impl<'a> !UnwindSafe for ReplayPolicy<'a>
impl<'a> Freeze for ReplayPolicy<'a>
impl<'a> Send for ReplayPolicy<'a>
impl<'a> Sync for ReplayPolicy<'a>
impl<'a> Unpin for ReplayPolicy<'a>
impl<'a> UnsafeUnpin for ReplayPolicy<'a>
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