pub struct KnownPlayer {
uuid: Uuid,
last_known_name: String,
expires_at_millis: i64,
}Expand description
One cached player identity.
Fields§
§uuid: Uuid§last_known_name: String§expires_at_millis: i64Implementations§
Source§impl KnownPlayer
impl KnownPlayer
Sourcepub fn new(uuid: Uuid, last_known_name: impl Into<String>) -> Self
pub fn new(uuid: Uuid, last_known_name: impl Into<String>) -> Self
Creates a cached player identity.
Steel persists the expiration instant directly in UTC instead of vanilla’s locale-formatted date, while retaining its one-month lifetime.
pub(crate) fn with_expiration( uuid: Uuid, last_known_name: impl Into<String>, expires_at_millis: i64, ) -> Self
Sourcepub fn last_known_name(&self) -> &str
pub fn last_known_name(&self) -> &str
Returns the player’s last observed profile name.
pub(crate) const fn expires_at_millis(&self) -> i64
Trait Implementations§
Source§impl Clone for KnownPlayer
impl Clone for KnownPlayer
Source§fn clone(&self) -> KnownPlayer
fn clone(&self) -> KnownPlayer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 KnownPlayer
impl Debug for KnownPlayer
impl Eq for KnownPlayer
Source§impl PartialEq for KnownPlayer
impl PartialEq for KnownPlayer
impl StructuralPartialEq for KnownPlayer
Auto Trait Implementations§
impl Freeze for KnownPlayer
impl RefUnwindSafe for KnownPlayer
impl Send for KnownPlayer
impl Sync for KnownPlayer
impl Unpin for KnownPlayer
impl UnsafeUnpin for KnownPlayer
impl UnwindSafe for KnownPlayer
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<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<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
Compares
self with key and returns 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<>>