pub struct LoopConfig {
pub frequency_hz: f64,
pub dt_clamp_multiplier: f64,
pub max_iterations: Option<usize>,
}Expand description
控制循环配置
Fields§
§frequency_hz: f64控制频率(Hz)
例如:100.0 表示 100Hz(10ms 周期)
dt_clamp_multiplier: f64dt 钳位倍数
当实际 dt 超过标称周期的此倍数时,将触发 on_time_jump() 并钳位 dt。
例如:2.0 表示 dt 最大为 2 * (1 / frequency_hz)
max_iterations: Option<usize>最大迭代次数(None 表示无限循环)
用于测试或定时运行。
Trait Implementations§
Source§impl Clone for LoopConfig
impl Clone for LoopConfig
Source§fn clone(&self) -> LoopConfig
fn clone(&self) -> LoopConfig
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 LoopConfig
impl Debug for LoopConfig
Auto Trait Implementations§
impl Freeze for LoopConfig
impl RefUnwindSafe for LoopConfig
impl Send for LoopConfig
impl Sync for LoopConfig
impl Unpin for LoopConfig
impl UnwindSafe for LoopConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more