pub struct FilterCtx<'a> { /* private fields */ }Expand description
Context used while traversing a complete filter chain.
A context tracks the current layer and the write activity accumulated while
traversing it. with_next advances to the inner layer,
while with_buffer exposes the buffers adjacent to the
current layer.
Implementations§
Source§impl FilterCtx<'_>
impl FilterCtx<'_>
Sourcepub fn with_next<F, R>(&mut self, f: F) -> Rwhere
F: FnOnce(&mut Self) -> R,
pub fn with_next<F, R>(&mut self, f: F) -> Rwhere
F: FnOnce(&mut Self) -> R,
Invokes f with the context advanced to the next inner filter.
The previous layer is restored after f returns.
Sourcepub fn with_buffer<F, R>(&mut self, f: F) -> R
pub fn with_buffer<F, R>(&mut self, f: F) -> R
Invokes f with the buffers adjacent to the current filter.
Sourcepub fn read_dst_size(&self) -> usize
pub fn read_dst_size(&self) -> usize
Returns the size of the application-facing read buffer.
Sourcepub fn write_dst_size(&mut self) -> usize
pub fn write_dst_size(&mut self) -> usize
Returns the size of the transport-facing write buffer.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for FilterCtx<'a>
impl<'a> !Send for FilterCtx<'a>
impl<'a> !Sync for FilterCtx<'a>
impl<'a> !UnwindSafe for FilterCtx<'a>
impl<'a> Freeze for FilterCtx<'a>
impl<'a> Unpin for FilterCtx<'a>
impl<'a> UnsafeUnpin for FilterCtx<'a>
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