Struct tokio_hidg::MouseInput
source · #[repr(C, packed(1))]pub struct MouseInput { /* private fields */ }
Expand description
Mouse input report
Implementations§
source§impl 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>(
&'i self,
other: &'i MouseInput,
relative_pointer: bool,
relative_wheel: bool
) -> MouseInputChanges<'i> ⓘ
pub fn diff<'i>( &'i self, other: &'i MouseInput, relative_pointer: bool, relative_wheel: bool ) -> MouseInputChanges<'i> ⓘ
Get changes between two reports
Difference of two reports
Trait Implementations§
source§impl AsMut<[u8]> for MouseInput
impl AsMut<[u8]> for MouseInput
source§impl AsRef<[u8]> for MouseInput
impl AsRef<[u8]> for MouseInput
source§impl Clone for MouseInput
impl Clone for MouseInput
source§fn clone(&self) -> MouseInput
fn clone(&self) -> MouseInput
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MouseInput
impl Debug for MouseInput
source§impl Default for MouseInput
impl Default for MouseInput
source§fn default() -> MouseInput
fn default() -> MouseInput
Returns the “default value” for a type. Read more
source§impl Extend<(i16, i16)> for MouseInput
impl Extend<(i16, i16)> for MouseInput
source§fn extend<T>(&mut self, iter: T)
fn extend<T>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn 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.
source§fn 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
source§impl Extend<MouseInput> for MouseInput
impl Extend<MouseInput> for MouseInput
source§fn 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
source§fn 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.
source§fn 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
source§impl Extend<StateChange<Button>> for MouseInput
impl Extend<StateChange<Button>> for MouseInput
source§fn extend<T>(&mut self, iter: T)
fn extend<T>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn 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.
source§fn 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
source§impl Extend<StateChange<Buttons>> for MouseInput
impl Extend<StateChange<Buttons>> for MouseInput
source§fn extend<T>(&mut self, iter: T)
fn extend<T>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn 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.
source§fn 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
source§impl Extend<ValueChange<(i16, i16)>> for MouseInput
impl Extend<ValueChange<(i16, i16)>> for MouseInput
source§fn extend<T>(&mut self, iter: T)
fn extend<T>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn 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.
source§fn 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
source§impl Extend<ValueChange<i8>> for MouseInput
impl Extend<ValueChange<i8>> for MouseInput
source§fn extend<T>(&mut self, iter: T)
fn extend<T>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn 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.
source§fn 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
source§impl<'i> Sub for &'i MouseInput
impl<'i> Sub for &'i MouseInput
§type Output = MouseInputChanges<'i>
type Output = MouseInputChanges<'i>
The resulting type after applying the
-
operator.source§fn sub(self, other: &'i MouseInput) -> <&'i MouseInput as Sub>::Output
fn sub(self, other: &'i MouseInput) -> <&'i MouseInput as Sub>::Output
Performs the
-
operation. Read moreimpl Copy for MouseInput
Auto Trait Implementations§
impl Freeze for MouseInput
impl RefUnwindSafe for MouseInput
impl Send for MouseInput
impl Sync for MouseInput
impl Unpin for MouseInput
impl UnwindSafe for MouseInput
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