Enum veloren_common_net::msg::server::ServerGeneral
source · pub enum ServerGeneral {
Show 41 variants
CharacterDataLoadResult(Result<UpdateCharacterMetadata, String>),
CharacterListUpdate(Vec<CharacterItem>),
CharacterActionError(String),
CharacterCreated(CharacterId),
CharacterEdited(CharacterId),
CharacterSuccess,
SpectatorSuccess(Vec3<f32>),
GroupUpdate(ChangeNotification<Uid>),
Invite {
inviter: Uid,
timeout: Duration,
kind: InviteKind,
},
InvitePending(Uid),
GroupInventoryUpdate(FrontendItem, Uid),
InviteComplete {
target: Uid,
answer: InviteAnswer,
kind: InviteKind,
},
ExitInGameSuccess,
InventoryUpdate(Inventory, Vec<InventoryUpdateEvent>),
SetViewDistance(u32),
Outcomes(Vec<Outcome>),
Knockback(Vec3<f32>),
TerrainChunkUpdate {
key: Vec2<i32>,
chunk: Result<SerializedTerrainChunk, ()>,
},
LodZoneUpdate {
key: Vec2<i32>,
zone: Zone,
},
TerrainBlockUpdates(CompressedData<HashMap<Vec3<i32>, Block>>),
PlayerListUpdate(PlayerListUpdate),
ChatMsg(ChatMsg),
ChatMode(ChatMode),
SetPlayerEntity(Uid),
TimeOfDay(TimeOfDay, Calendar, Time, TimeScale),
EntitySync(EntitySyncPackage),
CompSync(CompSyncPackage<EcsCompPacket>, u64),
CreateEntity(EntityPackage<EcsCompPacket>),
DeleteEntity(Uid),
Disconnect(DisconnectReason),
Notification(Notification),
UpdatePendingTrade(TradeId, PendingTrade, Option<SitePrices>),
FinishedTrade(TradeResult),
SiteEconomy(EconomyInfo),
MapMarker(MapMarkerUpdate),
WeatherUpdate(SharedWeatherGrid),
LocalWindUpdate(Vec2<f32>),
SpectatePosition(Vec3<f32>),
PluginData(Vec<u8>),
UpdateRecipes,
SetPlayerRole(Option<AdminRole>),
}
Expand description
Messages sent from the server to the client
Variants§
CharacterDataLoadResult(Result<UpdateCharacterMetadata, String>)
Result of loading character data
CharacterListUpdate(Vec<CharacterItem>)
A list of characters belonging to the a authenticated player was sent
CharacterActionError(String)
An error occurred while creating or deleting a character
CharacterCreated(CharacterId)
A new character was created
CharacterEdited(CharacterId)
CharacterSuccess
SpectatorSuccess(Vec3<f32>)
GroupUpdate(ChangeNotification<Uid>)
Invite
Indicate to the client that they are invited to join a group
InvitePending(Uid)
Indicate to the client that their sent invite was not invalid and is currently pending
GroupInventoryUpdate(FrontendItem, Uid)
Update the HUD of the clients in the group
InviteComplete
Note: this could potentially include all the failure cases such as
inviting yourself in which case the InvitePending
message could be
removed and the client could consider their invite pending until
they receive this message Indicate to the client the result of their
invite
ExitInGameSuccess
Trigger cleanup for when the client goes back to the Registered
state
from an ingame state
InventoryUpdate(Inventory, Vec<InventoryUpdateEvent>)
SetViewDistance(u32)
NOTE: The client can infer that entity view distance will be at most the terrain view distance that we send here (and if lower it won’t be modified). So we just need to send the terrain VD back to the client if corrections are made.
Outcomes(Vec<Outcome>)
Knockback(Vec3<f32>)
TerrainChunkUpdate
LodZoneUpdate
TerrainBlockUpdates(CompressedData<HashMap<Vec3<i32>, Block>>)
PlayerListUpdate(PlayerListUpdate)
ChatMsg(ChatMsg)
A message to go into the client chat box. The client is responsible for formatting the message and turning it into a speech bubble.
ChatMode(ChatMode)
SetPlayerEntity(Uid)
TimeOfDay(TimeOfDay, Calendar, Time, TimeScale)
EntitySync(EntitySyncPackage)
CompSync(CompSyncPackage<EcsCompPacket>, u64)
CreateEntity(EntityPackage<EcsCompPacket>)
DeleteEntity(Uid)
Disconnect(DisconnectReason)
Notification(Notification)
Send a popup notification such as “Waypoint Saved”
UpdatePendingTrade(TradeId, PendingTrade, Option<SitePrices>)
FinishedTrade(TradeResult)
SiteEconomy(EconomyInfo)
Economic information about sites
MapMarker(MapMarkerUpdate)
WeatherUpdate(SharedWeatherGrid)
LocalWindUpdate(Vec2<f32>)
SpectatePosition(Vec3<f32>)
Suggest the client to spectate a position. Called after client has requested teleport etc.
PluginData(Vec<u8>)
Plugin data requested from the server
UpdateRecipes
Update the list of available recipes. Usually called after a new recipe is acquired
SetPlayerRole(Option<AdminRole>)
Implementations§
source§impl ServerGeneral
impl ServerGeneral
Trait Implementations§
source§impl Clone for ServerGeneral
impl Clone for ServerGeneral
source§fn clone(&self) -> ServerGeneral
fn clone(&self) -> ServerGeneral
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ServerGeneral
impl Debug for ServerGeneral
source§impl<'de> Deserialize<'de> for ServerGeneral
impl<'de> Deserialize<'de> for ServerGeneral
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<GenericChatMsg<String>> for ServerGeneral
impl From<GenericChatMsg<String>> for ServerGeneral
source§impl From<ServerGeneral> for ServerMsg
impl From<ServerGeneral> for ServerMsg
source§fn from(o: ServerGeneral) -> ServerMsg
fn from(o: ServerGeneral) -> ServerMsg
Auto Trait Implementations§
impl Freeze for ServerGeneral
impl RefUnwindSafe for ServerGeneral
impl Send for ServerGeneral
impl Sync for ServerGeneral
impl Unpin for ServerGeneral
impl UnwindSafe for ServerGeneral
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
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)
clone_to_uninit
)§impl<C, M> ConvertSaveload<M> for C
impl<C, M> ConvertSaveload<M> for C
§type Error = Infallible
type Error = Infallible
§fn convert_into<F>(
&self,
_: F,
) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
fn convert_into<F>( &self, _: F, ) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
Data
) using
entity to marker mapping function§fn convert_from<F>(
data: <C as ConvertSaveload<M>>::Data,
_: F,
) -> Result<C, <C as ConvertSaveload<M>>::Error>
fn convert_from<F>( data: <C as ConvertSaveload<M>>::Data, _: F, ) -> Result<C, <C as ConvertSaveload<M>>::Error>
Data
) using
entity to marker mapping function§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>
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>
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