pub struct Movement {
pub(crate) movements_per_match: Vec<PerMatch>,
}Fields§
§movements_per_match: Vec<PerMatch>Implementations§
Source§impl Movement
impl Movement
Sourcepub fn new_empty() -> Self
pub fn new_empty() -> Self
Use this to create a new movement message, then add movements to it using with_movement or push_movement.
pub fn is_empty(&self) -> bool
pub(crate) fn coord_to_arr(coord: Coord) -> [usize; 2]
pub fn with_movement( self, matchup: (PlayerId, PlayerId), current_fight_round: u64, movement: SingleMovement, ) -> Self
pub fn push_movement( &mut self, matchup: (PlayerId, PlayerId), current_fight_round: u64, movement: SingleMovement, ) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Movement
impl RefUnwindSafe for Movement
impl Send for Movement
impl Sync for Movement
impl Unpin for Movement
impl UnwindSafe for Movement
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