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;
// Provided method
fn requires_isolation(_stream: &Self::Stream) -> bool { ... }
}Expand description
Defines a trait for a scheduler stream backend, specifying the types and behavior for task scheduling.
Required Associated Types§
Sourcetype Factory: StreamFactory<Stream = Self::Stream>
type Factory: StreamFactory<Stream = Self::Stream>
Type for the stream factory, which creates streams of type Self::Stream.
Required Methods§
Sourcefn enqueue(task: Self::Task, stream: &mut Self::Stream)
fn enqueue(task: Self::Task, stream: &mut Self::Stream)
Enqueues a task onto a given stream for execution.
Provided Methods§
Sourcefn requires_isolation(_stream: &Self::Stream) -> bool
fn requires_isolation(_stream: &Self::Stream) -> bool
Whether this stream currently requires its own tasks to execute on
itself — no interleaving of its tasks onto another stream, and no other
stream’s tasks onto it. While any stream involved in an execution
requires isolation, the scheduler falls back to the sequential path.
A graph capture engages this for its whole prepare → record window.
Defaults to false.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".