pub trait Filter: 'static {
// Required methods
fn query(&self, id: TypeId) -> Option<Box<dyn Any>>;
fn process_read_buf(&self, ctx: &mut FilterCtx<'_>) -> Result<()>;
fn process_write_buf(&self, ctx: &mut FilterCtx<'_>) -> Result<()>;
fn shutdown(&self, ctx: &mut 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§
Sourcefn process_read_buf(&self, ctx: &mut FilterCtx<'_>) -> Result<()>
fn process_read_buf(&self, ctx: &mut FilterCtx<'_>) -> Result<()>
Processes incoming read-buffer data.
Sourcefn process_write_buf(&self, ctx: &mut FilterCtx<'_>) -> Result<()>
fn process_write_buf(&self, ctx: &mut FilterCtx<'_>) -> Result<()>
Processes outgoing write-buffer data.
Sourcefn shutdown(&self, ctx: &mut FilterCtx<'_>) -> Result<Poll<()>>
fn shutdown(&self, ctx: &mut FilterCtx<'_>) -> Result<Poll<()>>
Performs a graceful shutdown of the filter.
Sourcefn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<Readiness>
fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<Readiness>
Checks whether read operations may proceed.
Sourcefn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<Readiness>
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<Readiness>
Checks whether write operations may proceed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".