Skip to main content

InputApi

Struct InputApi 

Source
pub struct InputApi<'a> { /* private fields */ }
Expand description

Typed view over input initialization parameters supplied by SCS.

Implementations§

Source§

impl<'a> InputApi<'a>

Source

pub const SUPPORTED_VERSIONS: &'static [InputApiVersion]

Source

pub const fn supports_version(version: InputApiVersion) -> bool

Source

pub unsafe fn from_raw( version: InputApiVersion, params: *const ScsInputInitParams, ) -> SdkResult<Self>

Creates a typed view over the input initialization parameters.

§Errors

Returns SdkError::Unsupported for any input API version other than the audited 1.00 layout, or SdkError::InvalidParameter when params is null.

§Safety

For input API 1.00, params must point to the live matching structure supplied by SCS for the duration of this main-thread initialization.

Source

pub const fn version(&self) -> InputApiVersion

Source

pub fn game_name(&self) -> &'a CStr

Source

pub fn game_id(&self) -> &'a CStr

Source

pub const fn game_version(&self) -> InputGameVersion

Source

pub const fn session(&self) -> InputSession

Source

pub fn with_init_call<R>( &self, operation: impl for<'scope> FnOnce(&InputInitCall<'scope>) -> R, ) -> R

Auto Trait Implementations§

§

impl<'a> !Send for InputApi<'a>

§

impl<'a> !Sync for InputApi<'a>

§

impl<'a> Freeze for InputApi<'a>

§

impl<'a> RefUnwindSafe for InputApi<'a>

§

impl<'a> Unpin for InputApi<'a>

§

impl<'a> UnsafeUnpin for InputApi<'a>

§

impl<'a> UnwindSafe for InputApi<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.