Struct web_sys::UsbDevice [−][src]
#[repr(transparent)]pub struct UsbDevice { /* fields omitted */ }
Expand description
The UsbDevice
class.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Implementations
Getter for the usbVersionMajor
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the usbVersionMinor
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the usbVersionSubminor
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the deviceClass
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the deviceSubclass
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the deviceProtocol
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the vendorId
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the productId
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the deviceVersionMajor
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the deviceVersionMinor
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the deviceVersionSubminor
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the manufacturerName
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the productName
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the serialNumber
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the configuration
field of this object.
This API requires the following crate features to be activated: UsbConfiguration
, UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the configurations
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Getter for the opened
field of this object.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
The claimInterface()
method.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
The clearHalt()
method.
This API requires the following crate features to be activated: UsbDevice
, UsbDirection
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
The close()
method.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
pub fn control_transfer_in(
&self,
setup: &UsbControlTransferParameters,
length: u16
) -> Promise
pub fn control_transfer_in(
&self,
setup: &UsbControlTransferParameters,
length: u16
) -> Promise
The controlTransferIn()
method.
This API requires the following crate features to be activated: UsbControlTransferParameters
, UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
The controlTransferOut()
method.
This API requires the following crate features to be activated: UsbControlTransferParameters
, UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
pub fn control_transfer_out_with_buffer_source(
&self,
setup: &UsbControlTransferParameters,
data: &Object
) -> Promise
pub fn control_transfer_out_with_buffer_source(
&self,
setup: &UsbControlTransferParameters,
data: &Object
) -> Promise
The controlTransferOut()
method.
This API requires the following crate features to be activated: UsbControlTransferParameters
, UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
pub fn control_transfer_out_with_u8_array(
&self,
setup: &UsbControlTransferParameters,
data: &mut [u8]
) -> Promise
pub fn control_transfer_out_with_u8_array(
&self,
setup: &UsbControlTransferParameters,
data: &mut [u8]
) -> Promise
The controlTransferOut()
method.
This API requires the following crate features to be activated: UsbControlTransferParameters
, UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
pub fn isochronous_transfer_in(
&self,
endpoint_number: u8,
packet_lengths: &JsValue
) -> Promise
pub fn isochronous_transfer_in(
&self,
endpoint_number: u8,
packet_lengths: &JsValue
) -> Promise
The isochronousTransferIn()
method.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
The isochronousTransferOut()
method.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
The isochronousTransferOut()
method.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
The open()
method.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
The releaseInterface()
method.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
The reset()
method.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
pub fn select_alternate_interface(
&self,
interface_number: u8,
alternate_setting: u8
) -> Promise
pub fn select_alternate_interface(
&self,
interface_number: u8,
alternate_setting: u8
) -> Promise
The selectAlternateInterface()
method.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
The selectConfiguration()
method.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
The transferIn()
method.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
The transferOut()
method.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
The transferOut()
method.
This API requires the following crate features to be activated: UsbDevice
This API is unstable and requires --cfg=web_sys_unstable_apis
to be activated, as
described in the wasm-bindgen
guide
Trait Implementations
Performs a dynamic instanceof
check to see whether the JsValue
provided is an instance of this type. Read more
Performs a zero-cost unchecked conversion from a JsValue
into an
instance of Self
Read more
Performs a zero-cost unchecked conversion from a &JsValue
into an
instance of &Self
. Read more
Test whether this JS value has a type T
. Read more
Performs a dynamic cast (checked at runtime) of this value into the
target type T
. Read more
Performs a dynamic cast (checked at runtime) of this value into the
target type T
. Read more
Performs a zero-cost unchecked cast into the specified type. Read more
Performs a zero-cost unchecked cast into a reference to the specified type. Read more
Test whether this JS value is an instance of the type T
. Read more
Performs a dynamic check to see whether the JsValue
provided
is a value of this type. Read more
type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
The wasm ABI type references to Self
are recovered from.
type Anchor = ManuallyDrop<UsbDevice>
type Anchor = ManuallyDrop<UsbDevice>
The type that holds the reference to Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read more
Recover a Self::Anchor
from Self::Abi
. Read more
Auto Trait Implementations
impl RefUnwindSafe for UsbDevice
impl UnwindSafe for UsbDevice
Blanket Implementations
Mutably borrows from an owned value. Read more
type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
Same as IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more