pub struct ShutdownPlan<N> { /* private fields */ }Expand description
Validated ordered shutdown phases.
Implementations§
Source§impl<N: Copy + Eq> ShutdownPlan<N>
impl<N: Copy + Eq> ShutdownPlan<N>
Sourcepub fn new(
phases: impl IntoIterator<Item = Vec<N>>,
) -> Result<Self, ShutdownPlanError<N>>
pub fn new( phases: impl IntoIterator<Item = Vec<N>>, ) -> Result<Self, ShutdownPlanError<N>>
Validate non-empty phases and globally unique child IDs.
§Errors
Returns the offending phase or duplicate child ID.
pub fn phases(&self) -> &[Vec<N>]
Trait Implementations§
Source§impl<N: Clone> Clone for ShutdownPlan<N>
impl<N: Clone> Clone for ShutdownPlan<N>
Source§fn clone(&self) -> ShutdownPlan<N>
fn clone(&self) -> ShutdownPlan<N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<N: Debug> Debug for ShutdownPlan<N>
impl<N: Debug> Debug for ShutdownPlan<N>
Source§impl<N: PartialEq> PartialEq for ShutdownPlan<N>
impl<N: PartialEq> PartialEq for ShutdownPlan<N>
impl<N: Eq> Eq for ShutdownPlan<N>
impl<N> StructuralPartialEq for ShutdownPlan<N>
Auto Trait Implementations§
impl<N> Freeze for ShutdownPlan<N>
impl<N> RefUnwindSafe for ShutdownPlan<N>where
N: RefUnwindSafe,
impl<N> Send for ShutdownPlan<N>where
N: Send,
impl<N> Sync for ShutdownPlan<N>where
N: Sync,
impl<N> Unpin for ShutdownPlan<N>where
N: Unpin,
impl<N> UnsafeUnpin for ShutdownPlan<N>
impl<N> UnwindSafe for ShutdownPlan<N>where
N: UnwindSafe,
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