pub trait PollOpCode {
    // Required methods
    fn pre_submit(self: Pin<&mut Self>) -> Result<Decision>;
    fn on_event(self: Pin<&mut Self>, event: &Event) -> Poll<Result<usize>>;
}
Expand description

Abstraction of operations.

Required Methods§

source

fn pre_submit(self: Pin<&mut Self>) -> Result<Decision>

Perform the operation before submit, and return Decision to indicate whether submitting the operation to polling is required.

source

fn on_event(self: Pin<&mut Self>, event: &Event) -> Poll<Result<usize>>

Perform the operation after received corresponding event. If this operation is blocking, the return value should be Poll::Ready.

Implementors§