pub struct InputDeviceRegistration<'a> { /* private fields */ }Expand description
Fully described raw registration whose callback invariants were established by an audited upper layer.
Implementations§
Source§impl<'a> InputDeviceRegistration<'a>
impl<'a> InputDeviceRegistration<'a>
Sourcepub unsafe fn new(
name: &'a CStr,
display_name: &'a CStr,
device_type: InputDeviceType,
inputs: &'a [InputDeviceInput<'a>],
callback_context: *mut c_void,
active_callback: Option<ScsInputActiveCallback>,
event_callback: ScsInputEventCallback,
) -> SdkResult<Self>
pub unsafe fn new( name: &'a CStr, display_name: &'a CStr, device_type: InputDeviceType, inputs: &'a [InputDeviceInput<'a>], callback_context: *mut c_void, active_callback: Option<ScsInputActiveCallback>, event_callback: ScsInputEventCallback, ) -> SdkResult<Self>
Creates a device registration for one initialization-scoped SDK call.
§Errors
Returns SdkError::InvalidParameter when the input slice is empty,
exceeds InputIndex::MAX_COUNT, or cannot be represented by the raw
SDK count field.
§Safety
callback_context must remain valid for every callback until SCS has
automatically unregistered the device before scs_input_shutdown.
Both callbacks must contain panics, obey the game-main-thread contract,
and validate every foreign pointer before dereferencing it.
Auto Trait Implementations§
impl<'a> !Send for InputDeviceRegistration<'a>
impl<'a> !Sync for InputDeviceRegistration<'a>
impl<'a> Freeze for InputDeviceRegistration<'a>
impl<'a> RefUnwindSafe for InputDeviceRegistration<'a>
impl<'a> Unpin for InputDeviceRegistration<'a>
impl<'a> UnsafeUnpin for InputDeviceRegistration<'a>
impl<'a> UnwindSafe for InputDeviceRegistration<'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