pub struct InterventionDeliveryPolicy(/* private fields */);Expand description
The terms an intervention is offered to a host under.
A named wrapper rather than the ledger’s own policy in the item’s shape, because the two vocabularies answer to different people: the ledger’s terms are an operator’s tuning, and this is what a supervisor chose when they asked. Keeping the wrapper also means an intervention’s defaults can differ from a system-wide default without either of them moving.
Implementations§
Source§impl InterventionDeliveryPolicy
impl InterventionDeliveryPolicy
pub const fn new(policy: HostDeliveryPolicy) -> Self
Sourcepub fn pull() -> Self
pub fn pull() -> Self
The terms an intervention gets when the asker chose none.
Pull-and-lease, because an agent that is working is already talking to the engine and asking it for its questions costs nothing; activation is for a host that has stopped asking.
Sourcepub fn following_replacement(self) -> Self
pub fn following_replacement(self) -> Self
The same terms, with the question following a replaced agent.
pub const fn host_policy(&self) -> &HostDeliveryPolicy
pub fn into_host_policy(self) -> HostDeliveryPolicy
pub const fn follow_replacement(&self) -> FollowReplacement
Trait Implementations§
Source§impl Clone for InterventionDeliveryPolicy
impl Clone for InterventionDeliveryPolicy
Source§impl Debug for InterventionDeliveryPolicy
impl Debug for InterventionDeliveryPolicy
Source§impl Default for InterventionDeliveryPolicy
impl Default for InterventionDeliveryPolicy
Source§impl<'de> Deserialize<'de> for InterventionDeliveryPolicy
impl<'de> Deserialize<'de> for InterventionDeliveryPolicy
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 InterventionDeliveryPolicy
impl StructuralPartialEq for InterventionDeliveryPolicy
Auto Trait Implementations§
impl Freeze for InterventionDeliveryPolicy
impl RefUnwindSafe for InterventionDeliveryPolicy
impl Send for InterventionDeliveryPolicy
impl Sync for InterventionDeliveryPolicy
impl Unpin for InterventionDeliveryPolicy
impl UnsafeUnpin for InterventionDeliveryPolicy
impl UnwindSafe for InterventionDeliveryPolicy
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