Enum veloren_common::comp::chat::ChatType
source · pub enum ChatType<G> {
}
Expand description
List of chat types. Each one is colored differently and has its own icon.
This is a superset of SpeechBubbleType
, which is a superset of ChatMode
Variants§
Online(Uid)
A player came online
Offline(Uid)
A player went offline
CommandInfo
The result of chat commands
CommandError
A chat command failed
Kill(KillSource, Uid)
Inform players that someone died (Source, Victim) Source may be None (ex: fall damage)
GroupMeta(G)
Server notifications to a group, such as player join/leave
FactionMeta(String)
Server notifications to a faction, such as player join/leave
Tell(Uid, Uid)
One-on-one chat (from, to)
Say(Uid)
Chat with nearby players
Group(Uid, G)
Group chat
Faction(Uid, String)
Factional chat
Region(Uid)
Regional chat
World(Uid)
World chat
Npc(Uid)
Messages sent from NPCs (Not shown in chat but as speech bubbles)
NpcSay(Uid)
From NPCs but in the chat for clients in the near vicinity
NpcTell(Uid, Uid)
From NPCs but in the chat for a specific client. Shows a chat bubble. (from, to, localization variant)
Meta
Anything else
Implementations§
source§impl<G> ChatType<G>
impl<G> ChatType<G>
pub fn into_plain_msg(self, text: impl ToString) -> GenericChatMsg<G>
pub fn into_msg(self, content: Content) -> GenericChatMsg<G>
pub fn uid(&self) -> Option<Uid>
sourcepub fn is_private(&self) -> Option<bool>
pub fn is_private(&self) -> Option<bool>
None
means that the chat type is automated.
Trait Implementations§
source§impl<'de, G> Deserialize<'de> for ChatType<G>where
G: Deserialize<'de>,
impl<'de, G> Deserialize<'de> for ChatType<G>where
G: Deserialize<'de>,
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>,
Auto Trait Implementations§
impl<G> Freeze for ChatType<G>where
G: Freeze,
impl<G> RefUnwindSafe for ChatType<G>where
G: RefUnwindSafe,
impl<G> Send for ChatType<G>where
G: Send,
impl<G> Sync for ChatType<G>where
G: Sync,
impl<G> Unpin for ChatType<G>where
G: Unpin,
impl<G> UnwindSafe for ChatType<G>where
G: 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
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