pub struct TrailingConfig {
pub arm_ratio: f64,
pub giveback_frac: f64,
pub ttl: Duration,
pub max_entries: usize,
}Expand description
Tunables for the stateful guidance layer in PositionTracker.
Fields§
§arm_ratio: f64Peak gain (ratio of notional) a position must reach before the trailing give-back rule arms. Peaks below this are too small to act on.
giveback_frac: f64Fraction of the peak gain that, once surrendered, triggers a Reduce
to lock in what’s left. 0.5 ⇒ “gave back half the peak”.
ttl: DurationEvict positions not seen within this window (presumed closed/stale).
max_entries: usizeHard cap on tracked positions, so a misbehaving producer can’t grow the map without bound.
Trait Implementations§
Source§impl Clone for TrailingConfig
impl Clone for TrailingConfig
Source§fn clone(&self) -> TrailingConfig
fn clone(&self) -> TrailingConfig
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 moreSource§impl Debug for TrailingConfig
impl Debug for TrailingConfig
Source§impl Default for TrailingConfig
impl Default for TrailingConfig
impl Copy for TrailingConfig
Auto Trait Implementations§
impl Freeze for TrailingConfig
impl RefUnwindSafe for TrailingConfig
impl Send for TrailingConfig
impl Sync for TrailingConfig
impl Unpin for TrailingConfig
impl UnsafeUnpin for TrailingConfig
impl UnwindSafe for TrailingConfig
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