Enum wry::application::event::MouseScrollDelta
source · [−]#[non_exhaustive]
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
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
sourceimpl Clone for MouseScrollDelta
impl Clone for MouseScrollDelta
sourcepub fn clone(&self) -> MouseScrollDelta
pub fn clone(&self) -> MouseScrollDelta
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 more
sourceimpl Debug for MouseScrollDelta
impl Debug for MouseScrollDelta
sourceimpl<'de> Deserialize<'de> for MouseScrollDelta
impl<'de> Deserialize<'de> for MouseScrollDelta
sourcepub fn deserialize<__D>(
__deserializer: __D
) -> Result<MouseScrollDelta, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub 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
sourceimpl PartialEq<MouseScrollDelta> for MouseScrollDelta
impl PartialEq<MouseScrollDelta> for MouseScrollDelta
sourcepub fn eq(&self, other: &MouseScrollDelta) -> bool
pub fn eq(&self, other: &MouseScrollDelta) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcepub fn ne(&self, other: &MouseScrollDelta) -> bool
pub fn ne(&self, other: &MouseScrollDelta) -> bool
This method tests for !=
.
sourceimpl Serialize for MouseScrollDelta
impl Serialize for MouseScrollDelta
sourcepub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more