#[non_exhaustive]pub enum ServerPacket {
Show 48 variants
Login(Login),
Login2(Login2),
Backup,
Ping(Ping),
PingResult(PingResult),
Ack,
Error(Error),
CommandReply(CommandReply),
PlayerNew(PlayerNew),
PlayerLeave(PlayerLeave),
PlayerUpdate(PlayerUpdate),
PlayerFire(PlayerFire),
PlayerRespawn(PlayerRespawn),
PlayerFlag(PlayerFlag),
PlayerHit(PlayerHit),
PlayerKill(PlayerKill),
PlayerUpgrade(PlayerUpgrade),
PlayerType(PlayerType),
PlayerPowerup(PlayerPowerup),
PlayerLevel(PlayerLevel),
PlayerReteam(PlayerReteam),
GameFlag(GameFlag),
GameSpectate(GameSpectate),
GamePlayersAlive(GamePlayersAlive),
GameFirewall(GameFirewall),
EventRepel(EventRepel),
EventBoost(EventBoost),
EventBounce(EventBounce),
EventStealth(EventStealth),
EventLeaveHorizon(EventLeaveHorizon),
MobUpdate(MobUpdate),
MobUpdate2(MobUpdate2),
MobUpdateStationary(MobUpdateStationary),
MobDespawn(MobDespawn),
MobDespawnCoords(MobDespawnCoords),
ScoreUpdate(ScoreUpdate),
ScoreBoard(ScoreBoard),
ScoreDetailedFFA(ScoreDetailedFFA),
ScoreDetailedCTF(ScoreDetailedCTF),
ScoreDetailedBTR(ScoreDetailedBTR),
ChatTeam(ChatTeam),
ChatPublic(ChatPublic),
ChatSay(ChatSay),
ChatWhisper(ChatWhisper),
ChatVoteMutePassed(ChatVoteMutePassed),
ChatVoteMuted,
ServerMessage(ServerMessage),
ServerCustom(ServerCustom),
}Expand description
All possible server packets.
This is an enum of all possible packet message types. Some packets do not contain any data and thus do not have any data within their enum variants.
The From trait has been implemented for all the structs that
correspond to the variants of this enum. This means that instead of directly
constructing an instance of ServerPacket, into() can be called
instead.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Login(Login)
Login2(Login2)
Backup
Ping(Ping)
PingResult(PingResult)
Ack
Error(Error)
CommandReply(CommandReply)
PlayerNew(PlayerNew)
PlayerLeave(PlayerLeave)
PlayerUpdate(PlayerUpdate)
PlayerFire(PlayerFire)
PlayerRespawn(PlayerRespawn)
PlayerFlag(PlayerFlag)
PlayerHit(PlayerHit)
PlayerKill(PlayerKill)
PlayerUpgrade(PlayerUpgrade)
PlayerType(PlayerType)
PlayerPowerup(PlayerPowerup)
PlayerLevel(PlayerLevel)
PlayerReteam(PlayerReteam)
GameFlag(GameFlag)
GameSpectate(GameSpectate)
GamePlayersAlive(GamePlayersAlive)
GameFirewall(GameFirewall)
EventRepel(EventRepel)
EventBoost(EventBoost)
EventBounce(EventBounce)
EventStealth(EventStealth)
EventLeaveHorizon(EventLeaveHorizon)
MobUpdate(MobUpdate)
MobUpdate2(MobUpdate2)
MobUpdateStationary(MobUpdateStationary)
MobDespawn(MobDespawn)
MobDespawnCoords(MobDespawnCoords)
ScoreUpdate(ScoreUpdate)
ScoreBoard(ScoreBoard)
ScoreDetailedFFA(ScoreDetailedFFA)
ScoreDetailedCTF(ScoreDetailedCTF)
ScoreDetailedBTR(ScoreDetailedBTR)
ChatTeam(ChatTeam)
ChatPublic(ChatPublic)
ChatSay(ChatSay)
ChatWhisper(ChatWhisper)
ChatVoteMutePassed(ChatVoteMutePassed)
ChatVoteMuted
ServerMessage(ServerMessage)
ServerCustom(ServerCustom)
Trait Implementations§
Source§impl Clone for ServerPacket
impl Clone for ServerPacket
Source§fn clone(&self) -> ServerPacket
fn clone(&self) -> ServerPacket
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerPacket
impl Debug for ServerPacket
Source§impl<'de> DeserializeV5<'de> for ServerPacket
impl<'de> DeserializeV5<'de> for ServerPacket
fn deserialize(de: &mut AirmashDeserializerV5<'de>) -> Result<Self>
Source§impl From<Ack> for ServerPacket
impl From<Ack> for ServerPacket
Source§impl From<Backup> for ServerPacket
impl From<Backup> for ServerPacket
Source§impl From<ChatPublic> for ServerPacket
impl From<ChatPublic> for ServerPacket
Source§fn from(v: ChatPublic) -> Self
fn from(v: ChatPublic) -> Self
Converts to this type from the input type.
Source§impl From<ChatSay> for ServerPacket
impl From<ChatSay> for ServerPacket
Source§impl From<ChatTeam> for ServerPacket
impl From<ChatTeam> for ServerPacket
Source§impl From<ChatVoteMutePassed> for ServerPacket
impl From<ChatVoteMutePassed> for ServerPacket
Source§fn from(v: ChatVoteMutePassed) -> Self
fn from(v: ChatVoteMutePassed) -> Self
Converts to this type from the input type.
Source§impl From<ChatVoteMuted> for ServerPacket
impl From<ChatVoteMuted> for ServerPacket
Source§fn from(_: ChatVoteMuted) -> Self
fn from(_: ChatVoteMuted) -> Self
Converts to this type from the input type.
Source§impl From<ChatWhisper> for ServerPacket
impl From<ChatWhisper> for ServerPacket
Source§fn from(v: ChatWhisper) -> Self
fn from(v: ChatWhisper) -> Self
Converts to this type from the input type.
Source§impl From<CommandReply> for ServerPacket
impl From<CommandReply> for ServerPacket
Source§fn from(v: CommandReply) -> Self
fn from(v: CommandReply) -> Self
Converts to this type from the input type.
Source§impl From<Error> for ServerPacket
impl From<Error> for ServerPacket
Source§impl From<EventBoost> for ServerPacket
impl From<EventBoost> for ServerPacket
Source§fn from(v: EventBoost) -> Self
fn from(v: EventBoost) -> Self
Converts to this type from the input type.
Source§impl From<EventBounce> for ServerPacket
impl From<EventBounce> for ServerPacket
Source§fn from(v: EventBounce) -> Self
fn from(v: EventBounce) -> Self
Converts to this type from the input type.
Source§impl From<EventLeaveHorizon> for ServerPacket
impl From<EventLeaveHorizon> for ServerPacket
Source§fn from(v: EventLeaveHorizon) -> Self
fn from(v: EventLeaveHorizon) -> Self
Converts to this type from the input type.
Source§impl From<EventRepel> for ServerPacket
impl From<EventRepel> for ServerPacket
Source§fn from(v: EventRepel) -> Self
fn from(v: EventRepel) -> Self
Converts to this type from the input type.
Source§impl From<EventStealth> for ServerPacket
impl From<EventStealth> for ServerPacket
Source§fn from(v: EventStealth) -> Self
fn from(v: EventStealth) -> Self
Converts to this type from the input type.
Source§impl From<GameFirewall> for ServerPacket
impl From<GameFirewall> for ServerPacket
Source§fn from(v: GameFirewall) -> Self
fn from(v: GameFirewall) -> Self
Converts to this type from the input type.
Source§impl From<GameFlag> for ServerPacket
impl From<GameFlag> for ServerPacket
Source§impl From<GamePlayersAlive> for ServerPacket
impl From<GamePlayersAlive> for ServerPacket
Source§fn from(v: GamePlayersAlive) -> Self
fn from(v: GamePlayersAlive) -> Self
Converts to this type from the input type.
Source§impl From<GameSpectate> for ServerPacket
impl From<GameSpectate> for ServerPacket
Source§fn from(v: GameSpectate) -> Self
fn from(v: GameSpectate) -> Self
Converts to this type from the input type.
Source§impl From<Login> for ServerPacket
impl From<Login> for ServerPacket
Source§impl From<Login2> for ServerPacket
impl From<Login2> for ServerPacket
Source§impl From<MobDespawn> for ServerPacket
impl From<MobDespawn> for ServerPacket
Source§fn from(v: MobDespawn) -> Self
fn from(v: MobDespawn) -> Self
Converts to this type from the input type.
Source§impl From<MobDespawnCoords> for ServerPacket
impl From<MobDespawnCoords> for ServerPacket
Source§fn from(v: MobDespawnCoords) -> Self
fn from(v: MobDespawnCoords) -> Self
Converts to this type from the input type.
Source§impl From<MobUpdate> for ServerPacket
impl From<MobUpdate> for ServerPacket
Source§impl From<MobUpdate2> for ServerPacket
impl From<MobUpdate2> for ServerPacket
Source§fn from(v: MobUpdate2) -> Self
fn from(v: MobUpdate2) -> Self
Converts to this type from the input type.
Source§impl From<MobUpdateStationary> for ServerPacket
impl From<MobUpdateStationary> for ServerPacket
Source§fn from(v: MobUpdateStationary) -> Self
fn from(v: MobUpdateStationary) -> Self
Converts to this type from the input type.
Source§impl From<Ping> for ServerPacket
impl From<Ping> for ServerPacket
Source§impl From<PingResult> for ServerPacket
impl From<PingResult> for ServerPacket
Source§fn from(v: PingResult) -> Self
fn from(v: PingResult) -> Self
Converts to this type from the input type.
Source§impl From<PlayerFire> for ServerPacket
impl From<PlayerFire> for ServerPacket
Source§fn from(v: PlayerFire) -> Self
fn from(v: PlayerFire) -> Self
Converts to this type from the input type.
Source§impl From<PlayerFlag> for ServerPacket
impl From<PlayerFlag> for ServerPacket
Source§fn from(v: PlayerFlag) -> Self
fn from(v: PlayerFlag) -> Self
Converts to this type from the input type.
Source§impl From<PlayerHit> for ServerPacket
impl From<PlayerHit> for ServerPacket
Source§impl From<PlayerKill> for ServerPacket
impl From<PlayerKill> for ServerPacket
Source§fn from(v: PlayerKill) -> Self
fn from(v: PlayerKill) -> Self
Converts to this type from the input type.
Source§impl From<PlayerLeave> for ServerPacket
impl From<PlayerLeave> for ServerPacket
Source§fn from(v: PlayerLeave) -> Self
fn from(v: PlayerLeave) -> Self
Converts to this type from the input type.
Source§impl From<PlayerLevel> for ServerPacket
impl From<PlayerLevel> for ServerPacket
Source§fn from(v: PlayerLevel) -> Self
fn from(v: PlayerLevel) -> Self
Converts to this type from the input type.
Source§impl From<PlayerNew> for ServerPacket
impl From<PlayerNew> for ServerPacket
Source§impl From<PlayerPowerup> for ServerPacket
impl From<PlayerPowerup> for ServerPacket
Source§fn from(v: PlayerPowerup) -> Self
fn from(v: PlayerPowerup) -> Self
Converts to this type from the input type.
Source§impl From<PlayerRespawn> for ServerPacket
impl From<PlayerRespawn> for ServerPacket
Source§fn from(v: PlayerRespawn) -> Self
fn from(v: PlayerRespawn) -> Self
Converts to this type from the input type.
Source§impl From<PlayerReteam> for ServerPacket
impl From<PlayerReteam> for ServerPacket
Source§fn from(v: PlayerReteam) -> Self
fn from(v: PlayerReteam) -> Self
Converts to this type from the input type.
Source§impl From<PlayerType> for ServerPacket
impl From<PlayerType> for ServerPacket
Source§fn from(v: PlayerType) -> Self
fn from(v: PlayerType) -> Self
Converts to this type from the input type.
Source§impl From<PlayerUpdate> for ServerPacket
impl From<PlayerUpdate> for ServerPacket
Source§fn from(v: PlayerUpdate) -> Self
fn from(v: PlayerUpdate) -> Self
Converts to this type from the input type.
Source§impl From<PlayerUpgrade> for ServerPacket
impl From<PlayerUpgrade> for ServerPacket
Source§fn from(v: PlayerUpgrade) -> Self
fn from(v: PlayerUpgrade) -> Self
Converts to this type from the input type.
Source§impl From<ScoreBoard> for ServerPacket
impl From<ScoreBoard> for ServerPacket
Source§fn from(v: ScoreBoard) -> Self
fn from(v: ScoreBoard) -> Self
Converts to this type from the input type.
Source§impl From<ScoreDetailedBTR> for ServerPacket
impl From<ScoreDetailedBTR> for ServerPacket
Source§fn from(v: ScoreDetailedBTR) -> Self
fn from(v: ScoreDetailedBTR) -> Self
Converts to this type from the input type.
Source§impl From<ScoreDetailedCTF> for ServerPacket
impl From<ScoreDetailedCTF> for ServerPacket
Source§fn from(v: ScoreDetailedCTF) -> Self
fn from(v: ScoreDetailedCTF) -> Self
Converts to this type from the input type.
Source§impl From<ScoreDetailedFFA> for ServerPacket
impl From<ScoreDetailedFFA> for ServerPacket
Source§fn from(v: ScoreDetailedFFA) -> Self
fn from(v: ScoreDetailedFFA) -> Self
Converts to this type from the input type.
Source§impl From<ScoreUpdate> for ServerPacket
impl From<ScoreUpdate> for ServerPacket
Source§fn from(v: ScoreUpdate) -> Self
fn from(v: ScoreUpdate) -> Self
Converts to this type from the input type.
Source§impl From<ServerCustom> for ServerPacket
impl From<ServerCustom> for ServerPacket
Source§fn from(v: ServerCustom) -> Self
fn from(v: ServerCustom) -> Self
Converts to this type from the input type.
Source§impl From<ServerMessage> for ServerPacket
impl From<ServerMessage> for ServerPacket
Source§fn from(v: ServerMessage) -> Self
fn from(v: ServerMessage) -> Self
Converts to this type from the input type.
Source§impl SerializeV5 for ServerPacket
impl SerializeV5 for ServerPacket
fn serialize(&self, ser: &mut AirmashSerializerV5<'_>) -> Result
Auto Trait Implementations§
impl Freeze for ServerPacket
impl RefUnwindSafe for ServerPacket
impl Send for ServerPacket
impl Sync for ServerPacket
impl Unpin for ServerPacket
impl UnwindSafe for ServerPacket
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