Struct async_std_hidg::MouseInput
source · [−]#[repr(C, packed)]pub struct MouseInput { /* private fields */ }
Expand description
Mouse input report
Implementations
sourceimpl MouseInput
impl MouseInput
sourcepub fn count_pressed(&self) -> usize
pub fn count_pressed(&self) -> usize
Get number of pressed buttons
Press or release buttons
Press buttons
Release buttons
Press or release button
Press button
Release button
sourcepub fn set_pointer(&mut self, pointer: (i16, i16))
pub fn set_pointer(&mut self, pointer: (i16, i16))
Set XY coordinates
sourcepub fn change_pointer(&mut self, pointer: (i16, i16), relative: bool)
pub fn change_pointer(&mut self, pointer: (i16, i16), relative: bool)
Change XY coordinates
sourcepub fn change_wheel(&mut self, wheel: i8, relative: bool)
pub fn change_wheel(&mut self, wheel: i8, relative: bool)
Change wheel value
sourcepub fn change(&mut self, change: &MouseInputChange)
pub fn change(&mut self, change: &MouseInputChange)
Change mouse input
sourcepub fn diff(
&'i self,
other: &'i MouseInput,
relative_pointer: bool,
relative_wheel: bool
) -> MouseInputChanges<'i>ⓘNotable traits for MouseInputChanges<'i>impl<'i> Iterator for MouseInputChanges<'i> type Item = MouseInputChange;
pub fn diff(
&'i self,
other: &'i MouseInput,
relative_pointer: bool,
relative_wheel: bool
) -> MouseInputChanges<'i>ⓘNotable traits for MouseInputChanges<'i>impl<'i> Iterator for MouseInputChanges<'i> type Item = MouseInputChange;
Get changes between two reports
Difference of two reports
Trait Implementations
sourceimpl AsMut<[u8]> for MouseInput
impl AsMut<[u8]> for MouseInput
sourceimpl AsRef<[u8]> for MouseInput
impl AsRef<[u8]> for MouseInput
sourceimpl Clone for MouseInput
impl Clone for MouseInput
sourcefn clone(&self) -> MouseInput
fn clone(&self) -> MouseInput
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for MouseInput
impl Debug for MouseInput
sourceimpl Default for MouseInput
impl Default for MouseInput
sourcefn default() -> MouseInput
fn default() -> MouseInput
Returns the “default value” for a type. Read more
sourceimpl Extend<(i16, i16)> for MouseInput
impl Extend<(i16, i16)> for MouseInput
sourcefn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = (i16, i16)>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = (i16, i16)>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl Extend<MouseInput> for MouseInput
impl Extend<MouseInput> for MouseInput
sourcefn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = MouseInput>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = MouseInput>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl Extend<StateChange<Button>> for MouseInput
impl Extend<StateChange<Button>> for MouseInput
sourcefn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = StateChange<Button>>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = StateChange<Button>>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl Extend<StateChange<Buttons>> for MouseInput
impl Extend<StateChange<Buttons>> for MouseInput
sourcefn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = StateChange<Buttons>>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = StateChange<Buttons>>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl Extend<ValueChange<(i16, i16)>> for MouseInput
impl Extend<ValueChange<(i16, i16)>> for MouseInput
sourcefn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = ValueChange<(i16, i16)>>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = ValueChange<(i16, i16)>>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl Extend<ValueChange<i8>> for MouseInput
impl Extend<ValueChange<i8>> for MouseInput
sourcefn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = ValueChange<i8>>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = ValueChange<i8>>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<'i> Sub<&'i MouseInput> for &'i MouseInput
impl<'i> Sub<&'i MouseInput> for &'i MouseInput
type Output = MouseInputChanges<'i>
type Output = MouseInputChanges<'i>
The resulting type after applying the
-
operator.sourcefn sub(
self,
other: &'i MouseInput
) -> <&'i MouseInput as Sub<&'i MouseInput>>::Output
fn sub(
self,
other: &'i MouseInput
) -> <&'i MouseInput as Sub<&'i MouseInput>>::Output
Performs the
-
operation. Read moreimpl Copy for MouseInput
Auto Trait Implementations
impl RefUnwindSafe for MouseInput
impl Send for MouseInput
impl Sync for MouseInput
impl Unpin for MouseInput
impl UnwindSafe for MouseInput
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more