Enum veloren_common::comp::presence::PresenceKind
source · pub enum PresenceKind {
Spectator,
LoadingCharacter(CharacterId),
Character(CharacterId),
Possessor,
}
Variants§
Implementations§
source§impl PresenceKind
impl PresenceKind
sourcepub fn controlling_char(&self) -> bool
pub fn controlling_char(&self) -> bool
Check if the presence represents a control of a character, and thus certain in-game messages from the client such as control inputs should be handled.
pub fn character_id(&self) -> Option<CharacterId>
Trait Implementations§
source§impl Clone for PresenceKind
impl Clone for PresenceKind
source§fn clone(&self) -> PresenceKind
fn clone(&self) -> PresenceKind
Returns a copy 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 PresenceKind
impl Debug for PresenceKind
source§impl<'de> Deserialize<'de> for PresenceKind
impl<'de> Deserialize<'de> for PresenceKind
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for PresenceKind
impl PartialEq for PresenceKind
source§fn eq(&self, other: &PresenceKind) -> bool
fn eq(&self, other: &PresenceKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PresenceKind
impl Serialize for PresenceKind
impl Copy for PresenceKind
impl Eq for PresenceKind
impl StructuralEq for PresenceKind
impl StructuralPartialEq for PresenceKind
Auto Trait Implementations§
impl RefUnwindSafe for PresenceKind
impl Send for PresenceKind
impl Sync for PresenceKind
impl Unpin for PresenceKind
impl UnwindSafe for PresenceKind
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
§impl<C, M> ConvertSaveload<M> for C
impl<C, M> ConvertSaveload<M> for C
§type Error = Infallible
type Error = Infallible
Error may occur during serialization or deserialization of component
§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>
Convert this data type into serializable form (
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>
Convert this data from a deserializable form (
Data
) using
entity to marker mapping function§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.