pub struct InputApi<'a> { /* private fields */ }Expand description
Typed view over input initialization parameters supplied by SCS.
Implementations§
Source§impl<'a> InputApi<'a>
impl<'a> InputApi<'a>
pub const SUPPORTED_VERSIONS: &'static [InputApiVersion]
pub const fn supports_version(version: InputApiVersion) -> bool
Sourcepub unsafe fn from_raw(
version: InputApiVersion,
params: *const ScsInputInitParams,
) -> SdkResult<Self>
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.
pub const fn version(&self) -> InputApiVersion
pub fn game_name(&self) -> &'a CStr
pub fn game_id(&self) -> &'a CStr
pub const fn game_version(&self) -> InputGameVersion
pub const fn session(&self) -> InputSession
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> 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