pub struct ShutdownTree<N> { /* private fields */ }Expand description
Dependency topology compiled into ordered shutdown phases.
Each (dependent, dependency) edge means the dependent must stop before
the dependency. Independent nodes share a phase in declaration order.
Implementations§
Source§impl<N: Copy + Eq> ShutdownTree<N>
impl<N: Copy + Eq> ShutdownTree<N>
Sourcepub fn new(
nodes: impl IntoIterator<Item = N>,
edges: impl IntoIterator<Item = (N, N)>,
) -> Result<Self, ShutdownTreeError<N>>
pub fn new( nodes: impl IntoIterator<Item = N>, edges: impl IntoIterator<Item = (N, N)>, ) -> Result<Self, ShutdownTreeError<N>>
Validate a closed acyclic topology and derive shutdown layers.
§Errors
Returns duplicate/unknown child evidence or Cycle.
pub fn into_plan(self) -> ShutdownPlan<N>
Auto Trait Implementations§
impl<N> Freeze for ShutdownTree<N>
impl<N> RefUnwindSafe for ShutdownTree<N>where
N: RefUnwindSafe,
impl<N> Send for ShutdownTree<N>where
N: Send,
impl<N> Sync for ShutdownTree<N>where
N: Sync,
impl<N> Unpin for ShutdownTree<N>where
N: Unpin,
impl<N> UnsafeUnpin for ShutdownTree<N>
impl<N> UnwindSafe for ShutdownTree<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