#[non_exhaustive]pub struct ServerPlayersSample {
pub name: Option<String>,
pub id: Option<String>,
}Expand description
Contains basic information about one of the players in a server.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: Option<String>The player’s username
id: Option<String>The player’s UUID
Implementations§
Source§impl ServerPlayersSample
impl ServerPlayersSample
Sourcepub fn is_anonymous(&self) -> bool
pub fn is_anonymous(&self) -> bool
Returns whether the server has chosen to hide this player’s identity and is reporting placeholder information. This is generally caused by a player having the Allow Server Listings option set to false.
Trait Implementations§
Source§impl Clone for ServerPlayersSample
impl Clone for ServerPlayersSample
Source§fn clone(&self) -> ServerPlayersSample
fn clone(&self) -> ServerPlayersSample
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 ServerPlayersSample
impl Debug for ServerPlayersSample
Source§impl<'de> Deserialize<'de> for ServerPlayersSample
impl<'de> Deserialize<'de> for ServerPlayersSample
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 Hash for ServerPlayersSample
impl Hash for ServerPlayersSample
Source§impl PartialEq for ServerPlayersSample
impl PartialEq for ServerPlayersSample
Source§impl Serialize for ServerPlayersSample
impl Serialize for ServerPlayersSample
impl Eq for ServerPlayersSample
impl StructuralPartialEq for ServerPlayersSample
Auto Trait Implementations§
impl Freeze for ServerPlayersSample
impl RefUnwindSafe for ServerPlayersSample
impl Send for ServerPlayersSample
impl Sync for ServerPlayersSample
impl Unpin for ServerPlayersSample
impl UnwindSafe for ServerPlayersSample
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