zest-core 0.1.0

Application contract and async runtime for the zest GUI framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! [`Slot`]: one running subscription's identity and pending future.

use super::SubscriptionGen;
use crate::application::BoxFuture;

/// One active subscription: its stable `id`, the generator that produces
/// its futures, and the in-flight future awaiting its next message.
pub struct Slot<M> {
    pub(crate) id: u64,
    pub(crate) spawn: Option<SubscriptionGen<M>>,
    pub(crate) pending: Option<BoxFuture<M>>,
}