pub struct OneForOneStrategy {
pub max_retries: Option<u32>,
pub within: Option<Duration>,
pub decider: Arc<dyn Fn(&str) -> Directive + Sync + Send>,
}Expand description
Builder for OneForOne — the default.
Fields§
§max_retries: Option<u32>§within: Option<Duration>§decider: Arc<dyn Fn(&str) -> Directive + Sync + Send>Implementations§
Source§impl OneForOneStrategy
impl OneForOneStrategy
pub fn new() -> OneForOneStrategy
pub fn with_max_retries(self, n: u32) -> OneForOneStrategy
pub fn with_within(self, d: Duration) -> OneForOneStrategy
pub fn with_decider( self, f: impl Fn(&str) -> Directive + Send + Sync + 'static, ) -> OneForOneStrategy
Trait Implementations§
Source§impl Default for OneForOneStrategy
impl Default for OneForOneStrategy
Source§fn default() -> OneForOneStrategy
fn default() -> OneForOneStrategy
Returns the “default value” for a type. Read more
Source§impl From<OneForOneStrategy> for SupervisorStrategy
impl From<OneForOneStrategy> for SupervisorStrategy
Source§fn from(o: OneForOneStrategy) -> SupervisorStrategy
fn from(o: OneForOneStrategy) -> SupervisorStrategy
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OneForOneStrategy
impl !RefUnwindSafe for OneForOneStrategy
impl Send for OneForOneStrategy
impl Sync for OneForOneStrategy
impl Unpin for OneForOneStrategy
impl UnsafeUnpin for OneForOneStrategy
impl !UnwindSafe for OneForOneStrategy
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