pub enum ServerMessage {
Error(ErrorResponse),
ServerHandshake {
accepted_version: u8,
features: ServerFeatures,
},
AuthenticationAccepted,
Pong,
BloopAccepted {
achievements: Vec<AchievementRecord>,
},
AudioData {
data: Vec<u8>,
},
PreloadMatch,
PreloadMismatch {
audio_manifest_hash: DataHash,
achievements: Vec<AchievementRecord>,
},
Custom(Message),
}Expand description
Enum of messages sent from the server to the client.
Variants§
Error(ErrorResponse)
Error response message.
ServerHandshake
Server handshake response with accepted protocol version and features.
AuthenticationAccepted
Authentication was accepted.
Pong
Pong response to client’s ping.
BloopAccepted
Response to a Bloop message containing achievement records.
Fields
§
achievements: Vec<AchievementRecord>AudioData
Audio data response carrying raw bytes.
PreloadMatch
Indicates preload data matched on the server.
PreloadMismatch
Indicates preload data mismatched, includes hash and achievements.
Custom(Message)
Custom server message.
Trait Implementations§
Source§impl Debug for ServerMessage
impl Debug for ServerMessage
Source§impl From<ServerMessage> for Message
impl From<ServerMessage> for Message
Source§fn from(server_message: ServerMessage) -> Message
fn from(server_message: ServerMessage) -> Message
Converts a ServerMessage enum into a raw Message suitable for
transmission.
Auto Trait Implementations§
impl Freeze for ServerMessage
impl RefUnwindSafe for ServerMessage
impl Send for ServerMessage
impl Sync for ServerMessage
impl Unpin for ServerMessage
impl UnwindSafe for ServerMessage
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