Struct battlebit_api::ServerData
source · pub struct ServerData { /* private fields */ }Expand description
Data of a single server
Implementations§
source§impl ServerData
impl ServerData
Auto-generated by derive_getters::Getters.
sourcepub fn player_count(&self) -> &u8
pub fn player_count(&self) -> &u8
SAFETY: Unless Battlebit upgrades their engine, this number should fit into a u8.
sourcepub fn queued_player_count(&self) -> &u16
pub fn queued_player_count(&self) -> &u16
SAFETY: The queued player count should realistically never reach 65_535.
sourcepub fn max_players(&self) -> &u8
pub fn max_players(&self) -> &u8
SAFETY: Unless Battlebit upgrades their engine, this number should fit into a u8.
sourcepub fn hz(&self) -> &u8
pub fn hz(&self) -> &u8
SAFETY: Unless Battlebit upgrades their engine, this number should fit into a u8.
sourcepub fn is_official(&self) -> &bool
pub fn is_official(&self) -> &bool
Get field is_official from instance of ServerData.
sourcepub fn has_password(&self) -> &bool
pub fn has_password(&self) -> &bool
Get field has_password from instance of ServerData.
sourcepub fn anti_cheat(&self) -> &AntiCheat
pub fn anti_cheat(&self) -> &AntiCheat
Get field anti_cheat from instance of ServerData.
source§impl ServerData
impl ServerData
sourcepub fn has_unknown(&self) -> bool
pub fn has_unknown(&self) -> bool
Small check if this ServerData has “Unknown” fields used. Mostly used by me to check if this API client is outdated.
Trait Implementations§
source§impl Debug for ServerData
impl Debug for ServerData
source§impl<'de> Deserialize<'de> for ServerData
impl<'de> Deserialize<'de> for ServerData
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 RefUnwindSafe for ServerData
impl Send for ServerData
impl Sync for ServerData
impl Unpin for ServerData
impl UnwindSafe for ServerData
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