pub struct FixedController { /* private fields */ }Expand description
Controller that always emits the same configured Decision.
Useful as an explicit opt-out from adaptive control while still wanting a hard cap, and as a regression baseline when comparing adaptive algorithms under the simulator.
Implementations§
Trait Implementations§
Source§impl Clone for FixedController
impl Clone for FixedController
Source§fn clone(&self) -> FixedController
fn clone(&self) -> FixedController
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 Controller for FixedController
impl Controller for FixedController
Source§fn on_tick(&mut self, _now: Instant) -> Decision
fn on_tick(&mut self, _now: Instant) -> Decision
Produce the current decision. Called periodically by the enforcement
layer. The controller must return an absolute limit (not a delta).
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Short, stable identifier used in logs and metrics (e.g. “noop”,
“fixed”, “ratio”).
Source§fn snapshot(&self) -> ControllerSnapshot
fn snapshot(&self) -> ControllerSnapshot
Snapshot of the controller’s observable state for diagnostics
and progress display. Default returns an empty snapshot, which
is appropriate for controllers that have no meaningful internal
state to surface.
Source§impl Debug for FixedController
impl Debug for FixedController
impl Copy for FixedController
Auto Trait Implementations§
impl Freeze for FixedController
impl RefUnwindSafe for FixedController
impl Send for FixedController
impl Sync for FixedController
impl Unpin for FixedController
impl UnsafeUnpin for FixedController
impl UnwindSafe for FixedController
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