codec: expose backpressure_boundary in Framed API (#5124)

This commit is contained in:
crusader-mike
2022-10-29 14:59:22 +00:00
committed by GitHub
parent 1ab80ba580
commit cbbf81b922
4 changed files with 37 additions and 12 deletions
+10
View File
@@ -123,6 +123,16 @@ impl<T, E> FramedWrite<T, E> {
pub fn write_buffer_mut(&mut self) -> &mut BytesMut {
&mut self.inner.state.buffer
}
/// Returns backpressure boundary
pub fn backpressure_boundary(&self) -> usize {
self.inner.state.backpressure_boundary
}
/// Updates backpressure boundary
pub fn set_backpressure_boundary(&mut self, boundary: usize) {
self.inner.state.backpressure_boundary = boundary;
}
}
// This impl just defers to the underlying FramedImpl