pub trait Filter: 'static {
// Required methods
fn query(&self, id: TypeId) -> Option<Box<dyn Any>>;
fn process_read_buf(
&self,
ctx: FilterCtx<'_>,
nbytes: usize,
) -> Result<FilterReadStatus>;
fn process_write_buf(&self, ctx: FilterCtx<'_>) -> Result<()>;
fn shutdown(&self, ctx: FilterCtx<'_>) -> Result<Poll<()>>;
fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<Readiness>;
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<Readiness>;
}
Required Methods§
fn query(&self, id: TypeId) -> Option<Box<dyn Any>>
fn process_read_buf( &self, ctx: FilterCtx<'_>, nbytes: usize, ) -> Result<FilterReadStatus>
Sourcefn process_write_buf(&self, ctx: FilterCtx<'_>) -> Result<()>
fn process_write_buf(&self, ctx: FilterCtx<'_>) -> Result<()>
Process write buffer
Sourcefn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<Readiness>
fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<Readiness>
Check readiness for read operations
Sourcefn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<Readiness>
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<Readiness>
Check readiness for write operations