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 { ... }
}