pub struct SampleGameState {
pub x: i32,
pub y: i32,
}
Fields§
§x: i32
§y: i32
Implementations§
Source§impl SampleGameState
impl SampleGameState
pub fn update(&mut self, step: &SeqMap<ParticipantId, Step<SampleStep>>)
pub fn to_octets(&self) -> Result<Vec<u8>, Error>
pub fn from_octets(payload: &[u8]) -> Result<(SampleGameState, usize), Error>
Trait Implementations§
Source§impl BufferDeserializer for SampleGameState
impl BufferDeserializer for SampleGameState
Source§fn deserialize(buf: &[u8]) -> Result<(SampleGameState, usize), Error>
fn deserialize(buf: &[u8]) -> Result<(SampleGameState, usize), Error>
Deserializes an instance of
Self
from the given octet buffer. Read moreSource§impl Clone for SampleGameState
impl Clone for SampleGameState
Source§fn clone(&self) -> SampleGameState
fn clone(&self) -> SampleGameState
Returns a copy 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 SampleGameState
impl Debug for SampleGameState
Source§impl Default for SampleGameState
impl Default for SampleGameState
Source§fn default() -> SampleGameState
fn default() -> SampleGameState
Returns the “default value” for a type. Read more
Source§impl Deserialize for SampleGameState
impl Deserialize for SampleGameState
fn deserialize( stream: &mut impl ReadOctetStream, ) -> Result<SampleGameState, Error>
Source§impl PartialEq for SampleGameState
impl PartialEq for SampleGameState
Source§impl Serialize for SampleGameState
impl Serialize for SampleGameState
impl Eq for SampleGameState
impl StructuralPartialEq for SampleGameState
Auto Trait Implementations§
impl Freeze for SampleGameState
impl RefUnwindSafe for SampleGameState
impl Send for SampleGameState
impl Sync for SampleGameState
impl Unpin for SampleGameState
impl UnwindSafe for SampleGameState
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