pub fn advance<'a, U>(
        &mut self,
        scope: &'a Scope<'_>,
    ) -> Result<Option<Updates<'a, U>>, ClientError<C::Error>>
    where
        U: Schema,
    {
        let updates = match self.channel.recv::<ServerMessage<(), U>>(scope) {
            Ok(Some(ServerMessageUnpacked::Updates {
                server_step,
                updates,
            })) => {
                self.next_update_step = server_step + 1;
                Some(Updates {
                    server_step,
                    updates,
                })
            }
            Ok(Some(_)) => return Err(ClientError::UnexpectedMessage),
            Ok(None) => None,
            Err(err) => return Err(err.into()),
        };

        self.current_step += 1;
        Ok(updates)
    }
/// Advances client-side simulation by one step.
Advances client-side simulation by one step.
Advances client - side simulation by one step .
pub fn advance<'a, U>(
        &mut self,
        scope: &'a Scope<'_>,
    ) -> Result<Option<Updates<'a, U>>, ClientError<C::Error>>
    where
        U: Schema,
    {
        let updates = match self.channel.recv::<ServerMessage<(), U>>(scope) {
            Ok(Some(ServerMessageUnpacked::Updates {
                server_step,
                updates,
            })) => {
                self.next_update_step = server_step + 1;
                Some(Updates {
                    server_step,
                    updates,
                })
            }
            Ok(Some(_)) => return Err(ClientError::UnexpectedMessage),
            Ok(None) => None,
            Err(err) => return Err(err.into()),
        };
        self.current_step += 1;
        Ok(updates)
    }
pub fn advance < ' a , U > ( & mut self , scope : & ' a Scope < ' _ > , ) -> Result < Option < Updates < ' a , U > > , ClientError < C :: Error > > where U : Schema , { let updates = match self . channel . recv :: < ServerMessage < ( ) , U > > ( scope ) { Ok ( Some ( ServerMessageUnpacked :: Updates { server_step , updates , } ) ) => { self . next_update_step = server_step + 1 ; Some ( Updates { server_step , updates , } ) } Ok ( Some ( _ ) ) => return Err ( ClientError :: UnexpectedMessage ) , Ok ( None ) => None , Err ( err ) => return Err ( err . into ( ) ) , } ; self . current_step += 1 ; Ok ( updates ) }
Advances client-side simulation by one step.
Advances client - side simulation by one step .
&mut self
scope
&'a Scope<'_>