pub struct MessageBuffer { /* private fields */ }Expand description
Node-wide bounded receive buffer shared by all delivery profiles.
Implementations§
Source§impl MessageBuffer
impl MessageBuffer
pub fn new( max_buffer_bytes: usize, warning_threshold: f32, limited_threshold: f32, ) -> Self
pub fn push( &mut self, profile: MessageProfile, payload: Vec<u8>, ) -> Result<(), BufferError>
pub fn pop(&mut self) -> Option<BufferedMessage>
pub fn max_buffer_bytes(&self) -> usize
pub fn used_bytes(&self) -> usize
pub fn backpressure_level(&self) -> BackpressureLevel
pub fn bytes_for(&self, profile: MessageProfile) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MessageBuffer
impl RefUnwindSafe for MessageBuffer
impl Send for MessageBuffer
impl Sync for MessageBuffer
impl Unpin for MessageBuffer
impl UnsafeUnpin for MessageBuffer
impl UnwindSafe for MessageBuffer
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