pub struct Layer<F, L = Base>(/* private fields */);Expand description
One processing layer wrapped around an existing filter chain.
Values of this type are created by Io::add_filter.
F is the outer, newly added layer and L is the previously installed
inner chain.
Trait Implementations§
Source§impl<F, L> Filter for Layer<F, L>where
F: FilterLayer,
L: Filter,
impl<F, L> Filter for Layer<F, L>where
F: FilterLayer,
L: Filter,
Source§fn query(&self, id: TypeId) -> Option<Box<dyn Any>>
fn query(&self, id: TypeId) -> Option<Box<dyn Any>>
Returns type-indexed information exposed by this chain.
Source§fn shutdown(&self, ctx: &mut FilterCtx<'_>) -> Result<Poll<()>>
fn shutdown(&self, ctx: &mut FilterCtx<'_>) -> Result<Poll<()>>
Performs graceful shutdown from the outermost layer toward the
transport.
Source§fn process_read_buf(&self, ctx: &mut FilterCtx<'_>) -> Result<()>
fn process_read_buf(&self, ctx: &mut FilterCtx<'_>) -> Result<()>
Processes incoming data from the transport toward the application.
Source§fn process_write_buf(&self, ctx: &mut FilterCtx<'_>) -> Result<()>
fn process_write_buf(&self, ctx: &mut FilterCtx<'_>) -> Result<()>
Processes outgoing data from the application toward the transport.
Auto Trait Implementations§
impl<F, L = Base> !Freeze for Layer<F, L>
impl<F, L = Base> !RefUnwindSafe for Layer<F, L>
impl<F, L = Base> !Sync for Layer<F, L>
impl<F, L> Send for Layer<F, L>
impl<F, L> Unpin for Layer<F, L>
impl<F, L> UnsafeUnpin for Layer<F, L>where
F: UnsafeUnpin,
L: UnsafeUnpin,
impl<F, L> UnwindSafe for Layer<F, L>where
F: UnwindSafe,
L: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more