#[non_exhaustive]pub struct TickSyncConfig {
pub tick_rate: u32,
pub input_delay_ticks: u64,
pub smoothing: f64,
pub max_round_trip_time: Duration,
pub max_offset_correction_ticks: f64,
}Expand description
Client-side Tick estimation limits.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tick_rate: u32Authoritative server simulation frequency.
input_delay_ticks: u64Future input delay added after the estimated current server Tick.
smoothing: f64Exponential smoothing weight applied to each accepted sample in 0.0..=1.0.
max_round_trip_time: DurationLargest network round-trip duration accepted as a useful sample.
max_offset_correction_ticks: f64Largest Tick-offset correction accepted from one sample before smoothing.
Implementations§
Source§impl TickSyncConfig
impl TickSyncConfig
Sourcepub fn validate(&self) -> NetcodeResult<()>
pub fn validate(&self) -> NetcodeResult<()>
Validates Tick rate, duration, and smoothing bounds.
Trait Implementations§
Source§impl Clone for TickSyncConfig
impl Clone for TickSyncConfig
Source§fn clone(&self) -> TickSyncConfig
fn clone(&self) -> TickSyncConfig
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 moreimpl Copy for TickSyncConfig
Source§impl Debug for TickSyncConfig
impl Debug for TickSyncConfig
Source§impl Default for TickSyncConfig
impl Default for TickSyncConfig
Source§impl<'de> Deserialize<'de> for TickSyncConfigwhere
TickSyncConfig: Default,
impl<'de> Deserialize<'de> for TickSyncConfigwhere
TickSyncConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TickSyncConfig
impl PartialEq for TickSyncConfig
Source§impl Serialize for TickSyncConfig
impl Serialize for TickSyncConfig
impl StructuralPartialEq for TickSyncConfig
Auto Trait Implementations§
impl Freeze for TickSyncConfig
impl RefUnwindSafe for TickSyncConfig
impl Send for TickSyncConfig
impl Sync for TickSyncConfig
impl Unpin for TickSyncConfig
impl UnsafeUnpin for TickSyncConfig
impl UnwindSafe for TickSyncConfig
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