Trait TouchInputDevice

Source
pub trait TouchInputDevice {
    type Error;

    // Required method
    fn touches(
        &mut self,
    ) -> Result<impl IntoIterator<Item = Touch>, Error<Self::Error>>;
}
Expand description

Blocking interface for touch devices.

Required Associated Types§

Source

type Error

Error type from the underlying interface

Required Methods§

Source

fn touches( &mut self, ) -> Result<impl IntoIterator<Item = Touch>, Error<Self::Error>>

Read current touch points, blocking until data is available

Returns an iterator of touch points currently detected. Drivers must track touch IDs across calls to maintain correct phase information.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§