pub struct TaskConfig {
pub restart_policy: RestartPolicy,
pub backoff_strategy: BackoffStrategy,
pub enabled: bool,
}Expand description
Runtime configuration for a supervised task that can be hot-reloaded
Fields§
§restart_policy: RestartPolicyRestart policy for the task
backoff_strategy: BackoffStrategyBackoff strategy between restart attempts
enabled: boolWhether the task is enabled (can be disabled without removing)
Implementations§
Source§impl TaskConfig
impl TaskConfig
Sourcepub fn from_task(task: &dyn SupervisedTask) -> Self
pub fn from_task(task: &dyn SupervisedTask) -> Self
Create a new TaskConfig from a SupervisedTask’s current configuration
Trait Implementations§
Source§impl Clone for TaskConfig
impl Clone for TaskConfig
Source§impl Debug for TaskConfig
impl Debug for TaskConfig
Auto Trait Implementations§
impl !RefUnwindSafe for TaskConfig
impl !UnwindSafe for TaskConfig
impl Freeze for TaskConfig
impl Send for TaskConfig
impl Sync for TaskConfig
impl Unpin for TaskConfig
impl UnsafeUnpin for TaskConfig
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