Enum veloren_common_net::msg::server::ServerMsg
source · pub enum ServerMsg {
Info(ServerInfo),
Init(Box<ServerInit>),
RegisterAnswer(ServerRegisterAnswer),
General(ServerGeneral),
Ping(PingMsg),
}
Expand description
This struct contains all messages the server might send (on different streams though)
Variants§
Info(ServerInfo)
Basic info about server, send ONCE, clients need it to Register
Init(Box<ServerInit>)
Initial data package, send BEFORE Register ONCE. Not Register relevant
RegisterAnswer(ServerRegisterAnswer)
Result to ClientMsg::Register
. send ONCE
General(ServerGeneral)
Msg that can be send ALWAYS as soon as client is registered, e.g. Chat
Ping(PingMsg)
Implementations§
source§impl ServerMsg
impl ServerMsg
pub fn verify( &self, c_type: ClientType, registered: bool, presence: Option<PresenceKind>, ) -> bool
Trait Implementations§
source§impl From<Result<(), RegisterError>> for ServerMsg
impl From<Result<(), RegisterError>> for ServerMsg
source§fn from(o: ServerRegisterAnswer) -> ServerMsg
fn from(o: ServerRegisterAnswer) -> ServerMsg
Converts to this type from the input type.
source§impl From<ServerGeneral> for ServerMsg
impl From<ServerGeneral> for ServerMsg
source§fn from(o: ServerGeneral) -> ServerMsg
fn from(o: ServerGeneral) -> ServerMsg
Converts to this type from the input type.
source§impl From<ServerInfo> for ServerMsg
impl From<ServerInfo> for ServerMsg
source§fn from(o: ServerInfo) -> ServerMsg
fn from(o: ServerInfo) -> ServerMsg
Converts to this type from the input type.
source§impl From<ServerInit> for ServerMsg
impl From<ServerInit> for ServerMsg
source§fn from(o: ServerInit) -> ServerMsg
fn from(o: ServerInit) -> ServerMsg
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ServerMsg
impl RefUnwindSafe for ServerMsg
impl Send for ServerMsg
impl Sync for ServerMsg
impl Unpin for ServerMsg
impl UnwindSafe for ServerMsg
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