pub struct Lookup {
pub guilds: HashMap<String, OtherGuild>,
/* private fields */
}
Expand description
Contains the results of ViewGuild
& ViewPlayer
commands. You can access
the player info via functions and the guild data directly
Fields§
§guilds: HashMap<String, OtherGuild>
Guild that the character has looked at
Implementations§
Source§impl Lookup
impl Lookup
Sourcepub fn lookup_pid(&self, pid: PlayerId) -> Option<&OtherPlayer>
pub fn lookup_pid(&self, pid: PlayerId) -> Option<&OtherPlayer>
Checks to see if we have queried a player with that player id
Sourcepub fn lookup_name(&self, name: &str) -> Option<&OtherPlayer>
pub fn lookup_name(&self, name: &str) -> Option<&OtherPlayer>
Checks to see if we have queried a player with the given name
Sourcepub fn remove_pid(&mut self, pid: PlayerId) -> Option<OtherPlayer>
pub fn remove_pid(&mut self, pid: PlayerId) -> Option<OtherPlayer>
Removes the information about another player based on their id
Sourcepub fn remove_name(&mut self, name: &str) -> Option<OtherPlayer>
pub fn remove_name(&mut self, name: &str) -> Option<OtherPlayer>
Removes the information about another player based on their name
Sourcepub fn reset_lookups(&mut self)
pub fn reset_lookups(&mut self)
Clears out all players, that have previously been queried
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Lookup
impl<'de> Deserialize<'de> for Lookup
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
Auto Trait Implementations§
impl Freeze for Lookup
impl RefUnwindSafe for Lookup
impl Send for Lookup
impl Sync for Lookup
impl Unpin for Lookup
impl UnwindSafe for Lookup
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