pub struct FlowControlConfig {
pub max_messages_per_second: u32,
pub tokens_per_refill: u32,
pub refill_interval: Duration,
pub max_queue_size: usize,
pub sync_cooldown: Duration,
pub max_memory_per_peer: usize,
}Expand description
Configuration for flow control
Fields§
§max_messages_per_second: u32Maximum messages per second per peer (token bucket capacity)
tokens_per_refill: u32Token refill rate (tokens per refill interval)
refill_interval: DurationToken refill interval
max_queue_size: usizeMaximum queue size per peer
sync_cooldown: DurationSync cooldown period (minimum time between syncs for same doc)
max_memory_per_peer: usizeMaximum memory per peer for sync state (bytes)
Trait Implementations§
Source§impl Clone for FlowControlConfig
impl Clone for FlowControlConfig
Source§fn clone(&self) -> FlowControlConfig
fn clone(&self) -> FlowControlConfig
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 FlowControlConfig
impl Debug for FlowControlConfig
Source§impl Default for FlowControlConfig
impl Default for FlowControlConfig
Source§fn default() -> FlowControlConfig
fn default() -> FlowControlConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FlowControlConfig
impl RefUnwindSafe for FlowControlConfig
impl Send for FlowControlConfig
impl Sync for FlowControlConfig
impl Unpin for FlowControlConfig
impl UnsafeUnpin for FlowControlConfig
impl UnwindSafe for FlowControlConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more