pub struct PromotionPolicy {
pub idle_after: Duration,
pub sweep_interval: Option<Duration>,
}Expand description
Tunables for when buffered writes get promoted to CAS.
Fields§
§idle_after: DurationDrain buffers with no writes for at least this long. The check runs opportunistically on every mutating call; agents that go quiet without closing aren’t left holding the buffer.
sweep_interval: Option<Duration>How often the clock-driven safety-sweep thread wakes up to
drain idle buffers. None disables the timer entirely (useful
for tests that want deterministic event-driven promotion).
Trait Implementations§
Source§impl Clone for PromotionPolicy
impl Clone for PromotionPolicy
Source§fn clone(&self) -> PromotionPolicy
fn clone(&self) -> PromotionPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PromotionPolicy
Source§impl Debug for PromotionPolicy
impl Debug for PromotionPolicy
Auto Trait Implementations§
impl Freeze for PromotionPolicy
impl RefUnwindSafe for PromotionPolicy
impl Send for PromotionPolicy
impl Sync for PromotionPolicy
impl Unpin for PromotionPolicy
impl UnsafeUnpin for PromotionPolicy
impl UnwindSafe for PromotionPolicy
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