Enum wry::application::event::MouseScrollDelta
source · pub enum MouseScrollDelta {
LineDelta(f32, f32),
PixelDelta(PhysicalPosition<f64>),
}
Expand description
Describes a difference in the mouse scroll wheel state.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
LineDelta(f32, f32)
Amount in lines or rows to scroll in the horizontal and vertical directions.
Positive values indicate movement forward (away from the user) or rightwards.
PixelDelta(PhysicalPosition<f64>)
Amount in pixels to scroll in the horizontal and vertical direction.
Scroll events are expressed as a PixelDelta if supported by the device (eg. a touchpad) and platform.
Trait Implementations§
source§impl Clone for MouseScrollDelta
impl Clone for MouseScrollDelta
source§fn clone(&self) -> MouseScrollDelta
fn clone(&self) -> MouseScrollDelta
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 MouseScrollDelta
impl Debug for MouseScrollDelta
source§impl<'de> Deserialize<'de> for MouseScrollDelta
impl<'de> Deserialize<'de> for MouseScrollDelta
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<MouseScrollDelta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<MouseScrollDelta, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<MouseScrollDelta> for MouseScrollDelta
impl PartialEq<MouseScrollDelta> for MouseScrollDelta
source§fn eq(&self, other: &MouseScrollDelta) -> bool
fn eq(&self, other: &MouseScrollDelta) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for MouseScrollDelta
impl Serialize for MouseScrollDelta
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for MouseScrollDelta
impl StructuralPartialEq for MouseScrollDelta
Auto Trait Implementations§
impl RefUnwindSafe for MouseScrollDelta
impl Send for MouseScrollDelta
impl Sync for MouseScrollDelta
impl Unpin for MouseScrollDelta
impl UnwindSafe for MouseScrollDelta
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