pub struct GameProfile {
id: Uuid,
name: String,
properties: ProfileProperties,
}Expand description
A player UUID with name and signed properties such as skin textures
Construction validates the vanilla network limits
Fields§
§id: Uuid§name: String§properties: ProfilePropertiesImplementations§
Source§impl GameProfile
impl GameProfile
pub fn new( id: Uuid, name: String, properties: Vec<ProfileProperty>, ) -> Result<Self>
pub const fn id(&self) -> Uuid
pub fn name(&self) -> &str
pub fn properties(&self) -> &[ProfileProperty]
Sourcepub fn write_properties(&self, writer: &mut impl Write) -> Result<()>
pub fn write_properties(&self, writer: &mut impl Write) -> Result<()>
Writes the properties in their network form Used by packets that send the name and properties separately from the id
Trait Implementations§
Source§impl Clone for GameProfile
impl Clone for GameProfile
Source§impl Debug for GameProfile
impl Debug for GameProfile
Source§impl<'de> Deserialize<'de> for GameProfile
impl<'de> Deserialize<'de> for GameProfile
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for GameProfile
Source§impl From<GameProfile> for ResolvableProfile
impl From<GameProfile> for ResolvableProfile
Source§fn from(profile: GameProfile) -> Self
fn from(profile: GameProfile) -> Self
Converts to this type from the input type.
Source§impl PartialEq for GameProfile
impl PartialEq for GameProfile
Source§impl ReadFrom for GameProfile
impl ReadFrom for GameProfile
impl StructuralPartialEq for GameProfile
Auto Trait Implementations§
impl Freeze for GameProfile
impl RefUnwindSafe for GameProfile
impl Send for GameProfile
impl Sync for GameProfile
impl Unpin for GameProfile
impl UnsafeUnpin for GameProfile
impl UnwindSafe for GameProfile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
Converts
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> ⓘ
Converts
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 moreWraps this value in an
Arc<SyncMutex<>>