Struct ExtrasVersion
pub struct ExtrasVersion {
pub api_version: u32,
pub max_info_version: u32,
}Expand description
Helper for version checks.
Fields§
§api_version: u32Version of the API.
Gets incremented whenever a function signature or behavior changes in a breaking way.
max_info_version: u32Highest known version of the ExtrasSubscriberInfo struct.
Also determines the size of the subscriber info buffer in the init call.
The buffer is only guaranteed to have enough space for known ExtrasSubscriberInfo versions.
Implementations§
§impl ExtrasVersion
impl ExtrasVersion
pub const SUB_INFO_RANGE: RangeInclusive<u32>
pub const SUB_INFO_RANGE: RangeInclusive<u32>
Range of supported ExtrasSubscriberInfo versions.
pub const MIN_SUB_INFO: u32
pub const MIN_SUB_INFO: u32
Minimum supported ExtrasSubscriberInfo version.
pub const MAX_SUB_INFO: u32
pub const MAX_SUB_INFO: u32
Maximum supported ExtrasSubscriberInfo version.
pub const MESSAGE_CALLBACK: u32 = 2
pub const MESSAGE_CALLBACK: u32 = 2
Minimum ExtrasSubscriberInfo version for message callback.
pub const MESSAGE_CALLBACK2: u32 = 3
pub const MESSAGE_CALLBACK2: u32 = 3
Minimum ExtrasSubscriberInfo version for message callback 2.
pub const fn new(api_version: u32, max_info_version: u32) -> ExtrasVersion
pub const fn new(api_version: u32, max_info_version: u32) -> ExtrasVersion
Creates new version information.
pub const fn is_compatible(&self) -> bool
pub const fn is_compatible(&self) -> bool
Checks compatibility with the Unofficial Extras addon.
pub fn get_version_to_use(&self) -> Option<u32>
pub fn get_version_to_use(&self) -> Option<u32>
Checks for compatibility and returns the highest supported ExtrasSubscriberInfo version supported by Unofficial Extras & the bindings.
pub const fn supports_squad_chat_message(&self) -> bool
pub const fn supports_squad_chat_message(&self) -> bool
Whether the Unofficial Extras addon supports squad chat message callback.
pub const fn supports_chat_message2(&self) -> bool
pub const fn supports_chat_message2(&self) -> bool
Whether the Unofficial Extras addon supports chat message callback 2.
Trait Implementations§
§impl Clone for ExtrasVersion
impl Clone for ExtrasVersion
§fn clone(&self) -> ExtrasVersion
fn clone(&self) -> ExtrasVersion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more