pub struct TickSyncResponse {
pub sequence: u64,
pub client_sent_at: Duration,
pub server_received_at: Duration,
pub server_sent_at: Duration,
pub server_tick: u64,
}Expand description
Authoritative server response used to construct a TickSyncSample.
Fields§
§sequence: u64Echoed client probe sequence.
client_sent_at: DurationEchoed client monotonic send time.
server_received_at: DurationServer monotonic time when the probe was received.
server_sent_at: DurationServer monotonic time when this response was sent.
server_tick: u64Authoritative simulation Tick at server_sent_at.
Implementations§
Source§impl TickSyncResponse
impl TickSyncResponse
Sourcepub fn sample(
self,
request: TickSyncRequest,
client_received_at: Duration,
local_tick: f64,
) -> NetcodeResult<TickSyncSample>
pub fn sample( self, request: TickSyncRequest, client_received_at: Duration, local_tick: f64, ) -> NetcodeResult<TickSyncSample>
Converts the four probe timestamps into an estimator sample.
Trait Implementations§
Source§impl Clone for TickSyncResponse
impl Clone for TickSyncResponse
Source§fn clone(&self) -> TickSyncResponse
fn clone(&self) -> TickSyncResponse
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 TickSyncResponse
Source§impl Debug for TickSyncResponse
impl Debug for TickSyncResponse
Source§impl<'de> Deserialize<'de> for TickSyncResponse
impl<'de> Deserialize<'de> for TickSyncResponse
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
impl Eq for TickSyncResponse
Source§impl PartialEq for TickSyncResponse
impl PartialEq for TickSyncResponse
Source§impl Serialize for TickSyncResponse
impl Serialize for TickSyncResponse
impl StructuralPartialEq for TickSyncResponse
Auto Trait Implementations§
impl Freeze for TickSyncResponse
impl RefUnwindSafe for TickSyncResponse
impl Send for TickSyncResponse
impl Sync for TickSyncResponse
impl Unpin for TickSyncResponse
impl UnsafeUnpin for TickSyncResponse
impl UnwindSafe for TickSyncResponse
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