SDL_hid_device_info

Struct SDL_hid_device_info 

Source
#[repr(C)]
pub struct SDL_hid_device_info {
Show 15 fields pub path: *mut c_char, pub vendor_id: c_ushort, pub product_id: c_ushort, pub serial_number: *mut c_wchar_t, pub release_number: c_ushort, pub manufacturer_string: *mut c_wchar_t, pub product_string: *mut c_wchar_t, pub usage_page: c_ushort, pub usage: c_ushort, pub interface_number: c_int, pub interface_class: c_int, pub interface_subclass: c_int, pub interface_protocol: c_int, pub bus_type: SDL_hid_bus_type, pub next: *mut SDL_hid_device_info,
}
Expand description

Information about a connected HID device

§Availability

This struct is available since SDL 3.2.0.

Fields§

§path: *mut c_char

Platform-specific device path

§vendor_id: c_ushort

Device Vendor ID

§product_id: c_ushort

Device Product ID

§serial_number: *mut c_wchar_t

Serial Number

§release_number: c_ushort

Device Release Number in binary-coded decimal, also known as Device Version Number

§manufacturer_string: *mut c_wchar_t

Manufacturer String

§product_string: *mut c_wchar_t

Product string

§usage_page: c_ushort

Usage Page for this Device/Interface (Windows/Mac/hidraw only)

§usage: c_ushort

Usage for this Device/Interface (Windows/Mac/hidraw only)

§interface_number: c_int

The USB interface which this logical device represents.

Valid only if the device is a USB HID device. Set to -1 in all other cases.

§interface_class: c_int

Additional information about the USB interface. Valid on libusb and Android implementations.

§interface_subclass: c_int§interface_protocol: c_int§bus_type: SDL_hid_bus_type

Underlying bus type

§next: *mut SDL_hid_device_info

Pointer to the next device

Trait Implementations§

Source§

impl Debug for SDL_hid_device_info

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SDL_hid_device_info

Source§

fn default() -> Self

Initialize all fields to zero

Auto Trait Implementations§

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.