agner_sup/uniform/
child_spec.rs

1use crate::common::{GenChildSpec, ShutdownSequence};
2
3pub type UniformChildSpec<B, A, M> = GenChildSpec<B, A, M, Ext>;
4
5impl UniformChildSpec<(), (), ()> {
6    pub fn uniform() -> Self {
7        Self::from_ext(Default::default())
8    }
9}
10
11impl<B, A, M> UniformChildSpec<B, A, M> {
12    pub fn with_shutdown_sequence(mut self, shutdown_sequence: ShutdownSequence) -> Self {
13        self.ext_mut().shutdown_sequence = shutdown_sequence;
14        self
15    }
16    pub fn shutdown_sequence(&self) -> &ShutdownSequence {
17        &self.ext().shutdown_sequence
18    }
19}
20
21#[derive(Debug, Clone, Default)]
22pub struct Ext {
23    shutdown_sequence: ShutdownSequence,
24}