pub(super) struct OutboundBatcher {
pending_batch: EnvelopeBatch,
flush_scheduled: bool,
}Expand description
buffers control-plane envelopes behind one host flush timer
the first batched envelope schedules BATCH_FLUSH_TIMER_ID
later batched envelopes join the same frame until the timer fires or the batch
reaches MAX_OUTBOUND_BATCH_LEN
Fields§
§pending_batch: EnvelopeBatch§flush_scheduled: boolImplementations§
Source§impl OutboundBatcher
impl OutboundBatcher
pub(super) fn new() -> Self
pub(super) fn enqueue( &mut self, envelope: Envelope, mode: FlushMode, ) -> Vec<Command>
pub(super) fn extend(&mut self, envelopes: EnvelopeBatch)
pub(super) fn flush(&mut self, cancel_timer: bool) -> Vec<Command>
pub(super) fn clear(&mut self)
pub(super) fn discard_pending(&mut self) -> Vec<Command>
Trait Implementations§
Source§impl Clone for OutboundBatcher
impl Clone for OutboundBatcher
Source§fn clone(&self) -> OutboundBatcher
fn clone(&self) -> OutboundBatcher
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OutboundBatcher
impl Debug for OutboundBatcher
Source§impl Default for OutboundBatcher
impl Default for OutboundBatcher
Source§fn default() -> OutboundBatcher
fn default() -> OutboundBatcher
Returns the “default value” for a type. Read more
Source§impl PartialEq for OutboundBatcher
impl PartialEq for OutboundBatcher
impl Eq for OutboundBatcher
impl StructuralPartialEq for OutboundBatcher
Auto Trait Implementations§
impl Freeze for OutboundBatcher
impl RefUnwindSafe for OutboundBatcher
impl Send for OutboundBatcher
impl Sync for OutboundBatcher
impl Unpin for OutboundBatcher
impl UnsafeUnpin for OutboundBatcher
impl UnwindSafe for OutboundBatcher
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