pub struct DynamicSupervisorState {
pub child_failure_state: HashMap<String, ChildFailureState>,
pub restart_log: Vec<RestartLog>,
pub options: DynamicSupervisorOptions,
pub active_children: HashMap<String, ActiveChild>,
}Fields§
§child_failure_state: HashMap<String, ChildFailureState>§restart_log: Vec<RestartLog>§options: DynamicSupervisorOptions§active_children: HashMap<String, ActiveChild>Trait Implementations§
Source§impl Clone for DynamicSupervisorState
impl Clone for DynamicSupervisorState
Source§fn clone(&self) -> DynamicSupervisorState
fn clone(&self) -> DynamicSupervisorState
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DynamicSupervisorState
impl Debug for DynamicSupervisorState
Source§impl SupervisorCore for DynamicSupervisorState
impl SupervisorCore for DynamicSupervisorState
type Message = DynamicSupervisorMsg
type Options = DynamicSupervisorOptions
type Strategy = ()
fn child_failure_state(&mut self) -> &mut HashMap<String, ChildFailureState>
fn restart_log(&mut self) -> &mut Vec<RestartLog>
fn options(&self) -> &DynamicSupervisorOptions
fn restart_msg( &self, child_spec: &ChildSpec, _strategy: (), _myself: ActorRef<Self::Message>, ) -> Self::Message
Source§fn prepare_child_failure(
&mut self,
child_spec: &ChildSpec,
) -> Result<(), ActorProcessingErr>
fn prepare_child_failure( &mut self, child_spec: &ChildSpec, ) -> Result<(), ActorProcessingErr>
Increments the failure count for a given child.
Resets the child’s
Resets the child’s
restart_count to 0 if the time since last fail >= child’s reset_after duration.Source§fn handle_child_exit(
&mut self,
child_spec: &ChildSpec,
abnormal: bool,
) -> Result<bool, ActorProcessingErr>
fn handle_child_exit( &mut self, child_spec: &ChildSpec, abnormal: bool, ) -> Result<bool, ActorProcessingErr>
Called when a child terminates or fails. Read more
Source§fn handle_child_restart(
&mut self,
child_spec: &ChildSpec,
abnormal: bool,
myself: ActorRef<Self::Message>,
reason: &ExitReason,
) -> Result<(), ActorProcessingErr>
fn handle_child_restart( &mut self, child_spec: &ChildSpec, abnormal: bool, myself: ActorRef<Self::Message>, reason: &ExitReason, ) -> Result<(), ActorProcessingErr>
Called when a child exits abnormally or normally. Read more
Source§fn track_global_restart(
&mut self,
child_id: &str,
) -> Result<(), ActorProcessingErr>
fn track_global_restart( &mut self, child_id: &str, ) -> Result<(), ActorProcessingErr>
Updates meltdown log and checks meltdown thresholds. Read more
Source§fn schedule_restart(
&mut self,
child_spec: &ChildSpec,
strategy: Self::Strategy,
myself: ActorRef<Self::Message>,
) -> Result<(), ActorProcessingErr>
fn schedule_restart( &mut self, child_spec: &ChildSpec, strategy: Self::Strategy, myself: ActorRef<Self::Message>, ) -> Result<(), ActorProcessingErr>
Schedule a future spawn for a child, respecting any child-level
backoff_fn.Auto Trait Implementations§
impl Freeze for DynamicSupervisorState
impl !RefUnwindSafe for DynamicSupervisorState
impl Send for DynamicSupervisorState
impl Sync for DynamicSupervisorState
impl Unpin for DynamicSupervisorState
impl !UnwindSafe for DynamicSupervisorState
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage