pub enum RecoveryPolicy {
Automatic,
Manual,
Never,
}Expand description
Whether an interrupted agent may be restarted without asking.
The question this answers is not “can we?” but “is it safe to do the work twice?”. An agent that reads and reports is harmless to re-run. One that opened a pull request is not, and re-running it would open a second.
Variants§
Automatic
Restart automatically, up to the attempt limit.
Manual
Record the interruption and wait for a human to ask.
Never
Never restart. The itinerary is interrupted and stays that way.
Implementations§
Source§impl RecoveryPolicy
impl RecoveryPolicy
Sourcepub fn is_automatic(&self) -> bool
pub fn is_automatic(&self) -> bool
Returns true when the Tower may restart this agent on its own.
Trait Implementations§
Source§impl Clone for RecoveryPolicy
impl Clone for RecoveryPolicy
impl Copy for RecoveryPolicy
Source§impl Debug for RecoveryPolicy
impl Debug for RecoveryPolicy
Source§impl Default for RecoveryPolicy
impl Default for RecoveryPolicy
Source§impl<'de> Deserialize<'de> for RecoveryPolicy
impl<'de> Deserialize<'de> for RecoveryPolicy
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 RecoveryPolicy
Source§impl PartialEq for RecoveryPolicy
impl PartialEq for RecoveryPolicy
Source§impl Serialize for RecoveryPolicy
impl Serialize for RecoveryPolicy
impl StructuralPartialEq for RecoveryPolicy
Auto Trait Implementations§
impl Freeze for RecoveryPolicy
impl RefUnwindSafe for RecoveryPolicy
impl Send for RecoveryPolicy
impl Sync for RecoveryPolicy
impl Unpin for RecoveryPolicy
impl UnsafeUnpin for RecoveryPolicy
impl UnwindSafe for RecoveryPolicy
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