#[repr(C, packed(1))]pub union Ds4ReportEx {
pub report: Ds4ReportExData,
pub report_buffer: [u8; 63],
}Expand description
An extended report for DualShock 4, including motion and touch data.
This is used for more advanced scenarios where you need to simulate more than basic inputs,
such as gyroscope, accelerometer, or touchpad data. It is sent via the update method
on a TargetHandle<DualShock4>.
Fields§
§report: Ds4ReportExData§report_buffer: [u8; 63]Methods from Deref<Target = Ds4ReportExData>§
Sourcepub fn as_report(&self) -> &Ds4Report
pub fn as_report(&self) -> &Ds4Report
Returns an immutable reference to the standard Ds4Report portion of this extended report.
This is safe because Ds4ReportExData is #[repr(C)] and starts with the exact
same fields as Ds4Report.
Sourcepub fn as_report_mut(&mut self) -> &mut Ds4Report
pub fn as_report_mut(&mut self) -> &mut Ds4Report
Returns a mutable reference to the standard Ds4Report portion of this extended report.
This allows using helpers like set_dpad on the extended report.
Trait Implementations§
Source§impl Clone for Ds4ReportEx
impl Clone for Ds4ReportEx
Source§impl Default for Ds4ReportEx
impl Default for Ds4ReportEx
Source§impl Deref for Ds4ReportEx
impl Deref for Ds4ReportEx
Source§impl DerefMut for Ds4ReportEx
impl DerefMut for Ds4ReportEx
impl Copy for Ds4ReportEx
Auto Trait Implementations§
impl Freeze for Ds4ReportEx
impl RefUnwindSafe for Ds4ReportEx
impl Send for Ds4ReportEx
impl Sync for Ds4ReportEx
impl Unpin for Ds4ReportEx
impl UnwindSafe for Ds4ReportEx
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