Enum heph::supervisor::SupervisorStrategy
source · [−]#[non_exhaustive]
pub enum SupervisorStrategy<Arg> {
Restart(Arg),
Stop,
}
Expand description
The strategy to use when handling an error from an actor.
See the module documentation for deciding on whether to restart an or not.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Restart(Arg)
Restart the actor with the provided argument Arg
.
Stop
Stop the actor.
Trait Implementations
sourceimpl<Arg: Clone> Clone for SupervisorStrategy<Arg>
impl<Arg: Clone> Clone for SupervisorStrategy<Arg>
sourcefn clone(&self) -> SupervisorStrategy<Arg>
fn clone(&self) -> SupervisorStrategy<Arg>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<Arg: Debug> Debug for SupervisorStrategy<Arg>
impl<Arg: Debug> Debug for SupervisorStrategy<Arg>
sourceimpl<Arg: PartialEq> PartialEq<SupervisorStrategy<Arg>> for SupervisorStrategy<Arg>
impl<Arg: PartialEq> PartialEq<SupervisorStrategy<Arg>> for SupervisorStrategy<Arg>
sourcefn eq(&self, other: &SupervisorStrategy<Arg>) -> bool
fn eq(&self, other: &SupervisorStrategy<Arg>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SupervisorStrategy<Arg>) -> bool
fn ne(&self, other: &SupervisorStrategy<Arg>) -> bool
This method tests for !=
.
impl<Arg: Copy> Copy for SupervisorStrategy<Arg>
impl<Arg: Eq> Eq for SupervisorStrategy<Arg>
impl<Arg> StructuralEq for SupervisorStrategy<Arg>
impl<Arg> StructuralPartialEq for SupervisorStrategy<Arg>
Auto Trait Implementations
impl<Arg> RefUnwindSafe for SupervisorStrategy<Arg> where
Arg: RefUnwindSafe,
impl<Arg> Send for SupervisorStrategy<Arg> where
Arg: Send,
impl<Arg> Sync for SupervisorStrategy<Arg> where
Arg: Sync,
impl<Arg> Unpin for SupervisorStrategy<Arg> where
Arg: Unpin,
impl<Arg> UnwindSafe for SupervisorStrategy<Arg> where
Arg: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more