Skip to main content

FilterLayer

Trait FilterLayer 

Source
pub trait FilterLayer: Debug + 'static {
    // Required methods
    fn process_read_buf(&self, buf: &FilterBuf<'_>) -> IoResult<()>;
    fn process_write_buf(&self, buf: &FilterBuf<'_>) -> IoResult<()>;

    // Provided methods
    fn query(&self, id: TypeId) -> Option<Box<dyn Any>> { ... }
    fn shutdown(&self, buf: &FilterBuf<'_>) -> IoResult<Poll<()>> { ... }
}

Required Methods§

Source

fn process_read_buf(&self, buf: &FilterBuf<'_>) -> IoResult<()>

Processes incoming read-buffer data.

Source

fn process_write_buf(&self, buf: &FilterBuf<'_>) -> IoResult<()>

Processes outgoing write-buffer data.

Provided Methods§

Source

fn query(&self, id: TypeId) -> Option<Box<dyn Any>>

Accesses internal filter information.

Source

fn shutdown(&self, buf: &FilterBuf<'_>) -> IoResult<Poll<()>>

Performs a graceful shutdown of the filter.

Implementors§