pub enum ServerMessage<Ext = NoExtension> {
Error(ErrorResponse),
Handshake(ServerHandshake),
AuthenticationAccepted(AuthenticationAccepted),
Pong(Pong),
BloopAccepted(BloopAccepted),
AudioData(AudioData),
PreloadMatch(PreloadMatch),
PreloadMismatch(PreloadMismatch),
Custom(Ext),
}Expand description
Messages sent from the server to the client.
Variants§
Error(ErrorResponse)
See ErrorResponse.
Handshake(ServerHandshake)
See ServerHandshake.
AuthenticationAccepted(AuthenticationAccepted)
Pong(Pong)
See Pong.
BloopAccepted(BloopAccepted)
See BloopAccepted.
AudioData(AudioData)
See AudioData.
PreloadMatch(PreloadMatch)
See PreloadMatch.
PreloadMismatch(PreloadMismatch)
See PreloadMismatch.
Custom(Ext)
An extension message.
Trait Implementations§
Source§impl<Ext> Clone for ServerMessage<Ext>where
Ext: Clone,
impl<Ext> Clone for ServerMessage<Ext>where
Ext: Clone,
Source§fn clone(&self) -> ServerMessage<Ext>
fn clone(&self) -> ServerMessage<Ext>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Ext> Debug for ServerMessage<Ext>where
Ext: Debug,
impl<Ext> Debug for ServerMessage<Ext>where
Ext: Debug,
Source§impl<Ext> From<AudioData> for ServerMessage<Ext>
impl<Ext> From<AudioData> for ServerMessage<Ext>
Source§fn from(message: AudioData) -> ServerMessage<Ext>
fn from(message: AudioData) -> ServerMessage<Ext>
Converts to this type from the input type.
Source§impl<Ext> From<AuthenticationAccepted> for ServerMessage<Ext>
impl<Ext> From<AuthenticationAccepted> for ServerMessage<Ext>
Source§fn from(message: AuthenticationAccepted) -> ServerMessage<Ext>
fn from(message: AuthenticationAccepted) -> ServerMessage<Ext>
Converts to this type from the input type.
Source§impl<Ext> From<BloopAccepted> for ServerMessage<Ext>
impl<Ext> From<BloopAccepted> for ServerMessage<Ext>
Source§fn from(message: BloopAccepted) -> ServerMessage<Ext>
fn from(message: BloopAccepted) -> ServerMessage<Ext>
Converts to this type from the input type.
Source§impl<Ext> From<ErrorResponse> for ServerMessage<Ext>
impl<Ext> From<ErrorResponse> for ServerMessage<Ext>
Source§fn from(message: ErrorResponse) -> ServerMessage<Ext>
fn from(message: ErrorResponse) -> ServerMessage<Ext>
Converts to this type from the input type.
Source§impl<Ext> From<Pong> for ServerMessage<Ext>
impl<Ext> From<Pong> for ServerMessage<Ext>
Source§fn from(message: Pong) -> ServerMessage<Ext>
fn from(message: Pong) -> ServerMessage<Ext>
Converts to this type from the input type.
Source§impl<Ext> From<PreloadMatch> for ServerMessage<Ext>
impl<Ext> From<PreloadMatch> for ServerMessage<Ext>
Source§fn from(message: PreloadMatch) -> ServerMessage<Ext>
fn from(message: PreloadMatch) -> ServerMessage<Ext>
Converts to this type from the input type.
Source§impl<Ext> From<PreloadMismatch> for ServerMessage<Ext>
impl<Ext> From<PreloadMismatch> for ServerMessage<Ext>
Source§fn from(message: PreloadMismatch) -> ServerMessage<Ext>
fn from(message: PreloadMismatch) -> ServerMessage<Ext>
Converts to this type from the input type.
Source§impl<Ext> From<ServerHandshake> for ServerMessage<Ext>
impl<Ext> From<ServerHandshake> for ServerMessage<Ext>
Source§fn from(message: ServerHandshake) -> ServerMessage<Ext>
fn from(message: ServerHandshake) -> ServerMessage<Ext>
Converts to this type from the input type.
Source§impl<Ext> MessageSet for ServerMessage<Ext>where
Ext: MessageSet,
impl<Ext> MessageSet for ServerMessage<Ext>where
Ext: MessageSet,
Source§fn encode(self) -> Result<RawMessage, EncodeError>
fn encode(self) -> Result<RawMessage, EncodeError>
Encodes the message into a raw frame. Read more
Source§fn decode(message: &RawMessage) -> Result<ServerMessage<Ext>, MessageSetError>
fn decode(message: &RawMessage) -> Result<ServerMessage<Ext>, MessageSetError>
Decodes a message from a raw frame. Read more
Source§impl<Ext> PartialEq for ServerMessage<Ext>where
Ext: PartialEq,
impl<Ext> PartialEq for ServerMessage<Ext>where
Ext: PartialEq,
impl<Ext> StructuralPartialEq for ServerMessage<Ext>where
Ext: PartialEq,
Auto Trait Implementations§
impl<Ext> Freeze for ServerMessage<Ext>where
Ext: Freeze,
impl<Ext> RefUnwindSafe for ServerMessage<Ext>where
Ext: RefUnwindSafe,
impl<Ext> Send for ServerMessage<Ext>where
Ext: Send,
impl<Ext> Sync for ServerMessage<Ext>where
Ext: Sync,
impl<Ext> Unpin for ServerMessage<Ext>where
Ext: Unpin,
impl<Ext> UnsafeUnpin for ServerMessage<Ext>where
Ext: UnsafeUnpin,
impl<Ext> UnwindSafe for ServerMessage<Ext>where
Ext: UnwindSafe,
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§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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