pub trait Filter: 'static {
// Required methods
fn query(&self, id: TypeId) -> Option<Box<dyn Any>>;
fn process_read_buf(
&self,
io: &IoRef,
stack: &Stack,
idx: usize,
nbytes: usize,
) -> Result<FilterReadStatus>;
fn process_write_buf(
&self,
io: &IoRef,
stack: &Stack,
idx: usize,
) -> Result<()>;
fn shutdown(
&self,
io: &IoRef,
stack: &Stack,
idx: usize,
) -> Result<Poll<()>>;
fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<ReadStatus>;
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<WriteStatus>;
}
Required Methods§
fn query(&self, id: TypeId) -> Option<Box<dyn Any>>
fn process_read_buf( &self, io: &IoRef, stack: &Stack, idx: usize, nbytes: usize, ) -> Result<FilterReadStatus>
sourcefn process_write_buf(&self, io: &IoRef, stack: &Stack, idx: usize) -> Result<()>
fn process_write_buf(&self, io: &IoRef, stack: &Stack, idx: usize) -> Result<()>
Process write buffer
sourcefn shutdown(&self, io: &IoRef, stack: &Stack, idx: usize) -> Result<Poll<()>>
fn shutdown(&self, io: &IoRef, stack: &Stack, idx: usize) -> Result<Poll<()>>
Gracefully shutdown filter
sourcefn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<ReadStatus>
fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<ReadStatus>
Check readiness for read operations
sourcefn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<WriteStatus>
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<WriteStatus>
Check readiness for write operations