pub struct PointerHit {
pub x: f64,
pub y: f64,
pub pressure: Option<f64>,
pub surface_id: String,
}Expand description
Normalized pointer hit event data.
Fields§
§x: f64§y: f64§pressure: Option<f64>§surface_id: StringImplementations§
Source§impl PointerHit
impl PointerHit
Sourcepub fn new(
x: f64,
y: f64,
surface_id: impl Into<String>,
) -> Result<Self, ContractError>
pub fn new( x: f64, y: f64, surface_id: impl Into<String>, ) -> Result<Self, ContractError>
Creates a new instance.
Sourcepub fn with_pressure(self, pressure: f64) -> Result<Self, ContractError>
pub fn with_pressure(self, pressure: f64) -> Result<Self, ContractError>
Builder — sets pressure.
Trait Implementations§
Source§impl Clone for PointerHit
impl Clone for PointerHit
Source§impl Debug for PointerHit
impl Debug for PointerHit
Source§impl<'de> Deserialize<'de> for PointerHit
impl<'de> Deserialize<'de> for PointerHit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PointerHit
impl PartialEq for PointerHit
Source§impl Serialize for PointerHit
impl Serialize for PointerHit
impl StructuralPartialEq for PointerHit
Auto Trait Implementations§
impl Freeze for PointerHit
impl RefUnwindSafe for PointerHit
impl Send for PointerHit
impl Sync for PointerHit
impl Unpin for PointerHit
impl UnsafeUnpin for PointerHit
impl UnwindSafe for PointerHit
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