pub trait Scheduler: Clone + Send + 'static {
// Required methods
fn run_topology(
&self,
topology: &mut Topology,
main_channel: &Sender<FlowgraphMessage>
) -> Slab<Option<Sender<BlockMessage>>>;
fn spawn<T: Send + 'static>(
&self,
future: impl Future<Output = T> + Send + 'static
) -> Task<T> ⓘ;
fn spawn_blocking<T: Send + 'static>(
&self,
future: impl Future<Output = T> + Send + 'static
) -> Task<T> ⓘ;
}
Expand description
Scheduler trait
This has to be implemented for every scheduler.
Required Methods§
sourcefn run_topology(
&self,
topology: &mut Topology,
main_channel: &Sender<FlowgraphMessage>
) -> Slab<Option<Sender<BlockMessage>>>
fn run_topology( &self, topology: &mut Topology, main_channel: &Sender<FlowgraphMessage> ) -> Slab<Option<Sender<BlockMessage>>>
Object Safety§
This trait is not object safe.