stickup 0.2.9

A modular input device abstraction layer with HID and virtual device support.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! src/devices/device.rs
/// Core trait for all input devices in StickUp.
///
/// Used for polling input and identifying devices across sessions.
pub trait Device {
    /// Polls for new input events (e.g., axis motion, button press).
    fn poll(&mut self) -> Vec<crate::event::InputKind>;

    /// Returns a user-friendly display name (e.g., "T.16000M Joystick").
    fn name(&self) -> &str;

    /// Returns the device's persistent ID (`vendor:product[:serial]`).
    fn id(&self) -> &str;
}