pub struct SporadicState {
pub budget_remaining_us: u32,
pub budget_capacity_us: u32,
pub period_us: u32,
pub last_refill_ms: u64,
}Expand description
Phase 110.E — user-space sporadic-server runtime state.
Tracks remaining budget_us for the current period and the wall-
clock instant of the last refill. The executor consults this state
during dispatch: when budget_remaining_us reaches 0 the SC is
suppressed until the next period boundary, at which point a refill
resets the counter.
Refill cadence is polled — each spin_once checks whether the
elapsed time since the last refill exceeds period_us and tops
the budget back up. Less precise than an ISR-driven refill (Phase
110.E’s per-platform timer hook is what gets that) but correct as
an upper-bound bandwidth limiter.
Fields§
§budget_remaining_us: u32§budget_capacity_us: u32§period_us: u32§last_refill_ms: u64Implementations§
Trait Implementations§
Source§impl Clone for SporadicState
impl Clone for SporadicState
Source§fn clone(&self) -> SporadicState
fn clone(&self) -> SporadicState
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 SporadicState
impl Debug for SporadicState
impl Copy for SporadicState
Auto Trait Implementations§
impl Freeze for SporadicState
impl RefUnwindSafe for SporadicState
impl Send for SporadicState
impl Sync for SporadicState
impl Unpin for SporadicState
impl UnsafeUnpin for SporadicState
impl UnwindSafe for SporadicState
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