pub trait TaskStream {
type Payload;
// Required methods
fn try_poll(&mut self) -> PollTaskResult<Self::Payload>;
fn max_concurrency(&self) -> usize;
fn complete_task(&mut self, path: TaskNodePath) -> bool;
fn len(&self) -> usize;
// Provided method
fn max_concurrency_or_limit(&self, limit: usize) -> usize { ... }
}Required Associated Types§
Required Methods§
fn try_poll(&mut self) -> PollTaskResult<Self::Payload>
fn max_concurrency(&self) -> usize
fn complete_task(&mut self, path: TaskNodePath) -> bool
fn len(&self) -> usize
Provided Methods§
fn max_concurrency_or_limit(&self, limit: usize) -> usize
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".