pub trait PollWork:
Clone
+ Send
+ Sync
+ 'static {
type State: Send + 'static;
// Required methods
fn init(&self) -> impl Future<Output = Self::State> + Send;
fn poll(
&self,
task_id: u64,
state: &mut Self::State,
) -> impl Future<Output = PollResult> + Send;
// Provided method
fn cleanup(&self, _state: Self::State) -> impl Future<Output = ()> + Send { ... }
}Expand description
Worker lifecycle for the poll side of an async-task benchmark.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.