Enum veloren_common_net::msg::client::ClientMsg
source · pub enum ClientMsg {
Type(ClientType),
Register(ClientRegister),
General(ClientGeneral),
Ping(PingMsg),
}
Expand description
This struct contains all messages the client might send (on different streams though). It’s used to verify the correctness of the state in debug_assertions
Variants§
Type(ClientType)
Send on the first connection ONCE to identify client intention for server
Register(ClientRegister)
Send ONCE to register/auth to the server
General(ClientGeneral)
Msg that can be send ALWAYS as soon as we are registered, e.g. Chat
Ping(PingMsg)
Implementations§
source§impl ClientMsg
impl ClientMsg
pub fn verify( &self, c_type: ClientType, registered: bool, presence: Option<PresenceKind>, ) -> bool
Trait Implementations§
source§impl From<ClientGeneral> for ClientMsg
impl From<ClientGeneral> for ClientMsg
source§fn from(other: ClientGeneral) -> ClientMsg
fn from(other: ClientGeneral) -> ClientMsg
Converts to this type from the input type.
source§impl From<ClientRegister> for ClientMsg
impl From<ClientRegister> for ClientMsg
source§fn from(other: ClientRegister) -> ClientMsg
fn from(other: ClientRegister) -> ClientMsg
Converts to this type from the input type.
source§impl From<ClientType> for ClientMsg
impl From<ClientType> for ClientMsg
source§fn from(other: ClientType) -> ClientMsg
fn from(other: ClientType) -> ClientMsg
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ClientMsg
impl RefUnwindSafe for ClientMsg
impl Send for ClientMsg
impl Sync for ClientMsg
impl Unpin for ClientMsg
impl UnwindSafe for ClientMsg
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more