Skip to main content

SchedulerStreamBackend

Trait SchedulerStreamBackend 

Source
pub trait SchedulerStreamBackend {
    type Task: Debug;
    type Stream: Debug;
    type Factory: StreamFactory<Stream = Self::Stream>;

    // Required methods
    fn enqueue(task: Self::Task, stream: &mut Self::Stream);
    fn flush(stream: &mut Self::Stream);
    fn factory(&mut self) -> &mut Self::Factory;
}
Expand description

Defines a trait for a scheduler stream backend, specifying the types and behavior for task scheduling.

Required Associated Types§

Source

type Task: Debug

Type representing a task.

Source

type Stream: Debug

Type representing a stream.

Source

type Factory: StreamFactory<Stream = Self::Stream>

Type for the stream factory, which creates streams of type Self::Stream.

Required Methods§

Source

fn enqueue(task: Self::Task, stream: &mut Self::Stream)

Enqueues a task onto a given stream for execution.

Source

fn flush(stream: &mut Self::Stream)

Flush the inner stream queue to ensure ordering between different streams.

Source

fn factory(&mut self) -> &mut Self::Factory

Returns a mutable reference to the stream factory.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§