pub struct CreditConfig {
pub credit_max: u32,
pub policy: CreditPolicy,
pub detach_after_ms: Option<u32>,
}Expand description
Credit configuration (router-enforced credits).
The credit limit is an approximate in-flight depth bound per consumer. It is computed as a
tail - head distance in the destination queue and may be stale.
Fields§
§credit_max: u32Maximum in-flight depth allowed per consumer.
Depth is estimated as tail - head of the consumer queue.
Values of 0 are treated as 1.
policy: CreditPolicyCredit enforcement behavior when consumers exceed credit_max.
detach_after_ms: Option<u32>Optional detach threshold. Only meaningful with CreditPolicy::Detach.
If set, consumers that remain over credit_max for longer than this duration are
detached (temporarily ignored).
Only available with the std feature.
Trait Implementations§
Source§impl Clone for CreditConfig
impl Clone for CreditConfig
Source§fn clone(&self) -> CreditConfig
fn clone(&self) -> CreditConfig
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 CreditConfig
impl Debug for CreditConfig
Source§impl PartialEq for CreditConfig
impl PartialEq for CreditConfig
impl Copy for CreditConfig
impl Eq for CreditConfig
impl StructuralPartialEq for CreditConfig
Auto Trait Implementations§
impl Freeze for CreditConfig
impl RefUnwindSafe for CreditConfig
impl Send for CreditConfig
impl Sync for CreditConfig
impl Unpin for CreditConfig
impl UnwindSafe for CreditConfig
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