Enum common::ClientAction
source · [−]pub enum ClientAction {
KeepAlive,
Hello,
MoveLeft,
MoveRight,
MoveUp,
MoveDown,
}
Expand description
Client-side actions that are sent to the server.
Variants
KeepAlive
No-op to send to avoid getting marked as disconnected because of the timeout.
Hello
The first message to send to the server. The server will respond to this with a ServerAction::Welcome.
MoveLeft
Attempt to move to the left by one tile.
MoveRight
Attempt to move to the right by one tile.
MoveUp
Attempt to move to the up by one tile.
MoveDown
Attempt to move to the down by one tile.
Trait Implementations
sourceimpl Clone for ClientAction
impl Clone for ClientAction
sourcefn clone(&self) -> ClientAction
fn clone(&self) -> ClientAction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ClientAction
impl Debug for ClientAction
sourceimpl<'de> Deserialize<'de> for ClientAction
impl<'de> Deserialize<'de> for ClientAction
sourcefn 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
sourceimpl Serialize for ClientAction
impl Serialize for ClientAction
Auto Trait Implementations
impl RefUnwindSafe for ClientAction
impl Send for ClientAction
impl Sync for ClientAction
impl Unpin for ClientAction
impl UnwindSafe for ClientAction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more