pub struct RateClass {
pub content_hz: u16,
pub adapt_hz: u16,
pub max_stale_ms: u16,
}Expand description
The declared content, adaptation, and staleness timing envelope.
Fields§
§content_hz: u16Content refresh cadence in hertz.
adapt_hz: u16Adapter loop cadence in hertz.
max_stale_ms: u16Maximum stale data age accepted by the surface.
Implementations§
Source§impl RateClass
impl RateClass
Sourcepub fn safe_default() -> Self
pub fn safe_default() -> Self
Safe fallback for missing rate metadata.
Sourcepub fn from_optional_expr(expr: Option<&Expr>) -> Result<Self, RateError>
pub fn from_optional_expr(expr: Option<&Expr>) -> Result<Self, RateError>
Parses an optional rate map, using RateClass::safe_default when it
is absent.
Trait Implementations§
impl Copy for RateClass
impl Eq for RateClass
impl StructuralPartialEq for RateClass
Auto Trait Implementations§
impl Freeze for RateClass
impl RefUnwindSafe for RateClass
impl Send for RateClass
impl Sync for RateClass
impl Unpin for RateClass
impl UnsafeUnpin for RateClass
impl UnwindSafe for RateClass
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