Trait ntex::io::Filter [−][src]
pub trait Filter: 'static {
fn query(&self, id: TypeId) -> Option<Box<dyn Any + 'static, Global>>;
fn get_read_buf(&self) -> Option<BytesMut>;
fn get_write_buf(&self) -> Option<BytesMut>;
fn release_read_buf(
&self,
io: &IoRef,
src: BytesMut,
dst: &mut Option<BytesMut>,
nbytes: usize
) -> Result<usize, Error>;
fn release_write_buf(&self, buf: BytesMut) -> Result<(), Error>;
fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<ReadStatus>;
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<WriteStatus>;
fn poll_shutdown(&self) -> Poll<Result<(), Error>>;
}
Required methods
fn get_read_buf(&self) -> Option<BytesMut>
fn get_write_buf(&self) -> Option<BytesMut>
fn release_read_buf(
&self,
io: &IoRef,
src: BytesMut,
dst: &mut Option<BytesMut>,
nbytes: usize
) -> Result<usize, Error>
fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<ReadStatus>
fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<ReadStatus>
Check readiness for read operations
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<WriteStatus>
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<WriteStatus>
Check readiness for write operations