pub struct TelemetryApiVersion(/* private fields */);Expand description
Version of the ABI negotiated through scs_telemetry_init.
The game tries supported API versions from newest to oldest. A plugin must
accept only layouts it has explicitly audited and return unsupported for
every other value so the game can continue its normal fallback sequence.
This is intentionally a newtype rather than a closed enum. Future SCS versions can be represented and logged before the wrapper has added a safe adapter for their initialization structure.
Implementations§
Source§impl TelemetryApiVersion
impl TelemetryApiVersion
Sourcepub const fn new(major: u32, minor: u32) -> Self
pub const fn new(major: u32, minor: u32) -> Self
Creates a packed SCS version from its two components.
Sourcepub const fn from_raw(raw: u32) -> Self
pub const fn from_raw(raw: u32) -> Self
Wraps the packed version supplied by the game without claiming support.
Trait Implementations§
Source§impl Clone for TelemetryApiVersion
impl Clone for TelemetryApiVersion
Source§fn clone(&self) -> TelemetryApiVersion
fn clone(&self) -> TelemetryApiVersion
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 moreimpl Copy for TelemetryApiVersion
Source§impl Debug for TelemetryApiVersion
impl Debug for TelemetryApiVersion
Source§impl Display for TelemetryApiVersion
impl Display for TelemetryApiVersion
impl Eq for TelemetryApiVersion
Source§impl Hash for TelemetryApiVersion
impl Hash for TelemetryApiVersion
Source§impl Ord for TelemetryApiVersion
impl Ord for TelemetryApiVersion
Source§fn cmp(&self, other: &TelemetryApiVersion) -> Ordering
fn cmp(&self, other: &TelemetryApiVersion) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TelemetryApiVersion
impl PartialEq for TelemetryApiVersion
Source§impl PartialOrd for TelemetryApiVersion
impl PartialOrd for TelemetryApiVersion
impl StructuralPartialEq for TelemetryApiVersion
Auto Trait Implementations§
impl Freeze for TelemetryApiVersion
impl RefUnwindSafe for TelemetryApiVersion
impl Send for TelemetryApiVersion
impl Sync for TelemetryApiVersion
impl Unpin for TelemetryApiVersion
impl UnsafeUnpin for TelemetryApiVersion
impl UnwindSafe for TelemetryApiVersion
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