pub trait FilterLayer: Debug + 'static {
const BUFFERS: bool = true;
// Required methods
fn process_read_buf(&self, buf: &ReadBuf<'_>) -> IoResult<usize>;
fn process_write_buf(&self, buf: &WriteBuf<'_>) -> IoResult<()>;
// Provided methods
fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<ReadStatus> { ... }
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<WriteStatus> { ... }
fn query(&self, id: TypeId) -> Option<Box<dyn Any>> { ... }
fn shutdown(&self, buf: &WriteBuf<'_>) -> IoResult<Poll<()>> { ... }
}
Provided Associated Constants§
Required Methods§
sourcefn process_read_buf(&self, buf: &ReadBuf<'_>) -> IoResult<usize>
fn process_read_buf(&self, buf: &ReadBuf<'_>) -> IoResult<usize>
Process read buffer
Inner filter must process buffer before current. Returns number of new bytes.
sourcefn process_write_buf(&self, buf: &WriteBuf<'_>) -> IoResult<()>
fn process_write_buf(&self, buf: &WriteBuf<'_>) -> IoResult<()>
Process write buffer
Provided Methods§
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
Object Safety§
This trait is not object safe.