pub(crate) struct State {
pub(crate) members: HashMap<String, Member>,
pub(crate) factories: HashMap<String, Arc<dyn Fn() -> Pin<Box<dyn Future<Output = ()> + Send>> + Send + Sync>>,
pub(crate) tokens: HashMap<String, CancellationToken>,
pub(crate) generations: HashMap<String, u64>,
pub(crate) aborts: HashMap<(String, u64), AbortHandle>,
}Fields§
§members: HashMap<String, Member>§factories: HashMap<String, Arc<dyn Fn() -> Pin<Box<dyn Future<Output = ()> + Send>> + Send + Sync>>§tokens: HashMap<String, CancellationToken>§generations: HashMap<String, u64>§aborts: HashMap<(String, u64), AbortHandle>One handle per run, not one slot per name. A stop then a spawn in the same window must abort the run it stopped, not the new one.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for State
impl !UnwindSafe for State
impl Freeze for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
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