RKTK API Docs RKTK Home Repo

Trait MouseDriver

Source
pub trait MouseDriver {
    type Error: Error;

    // Required methods
    async fn read(&mut self) -> Result<(i8, i8), Self::Error>;
    async fn set_cpi(&mut self, _cpi: u16) -> Result<(), Self::Error>;
    async fn get_cpi(&mut self) -> Result<u16, Self::Error>;

    // Provided method
    async fn init(&mut self) -> Result<(), Self::Error> { ... }
}

Required Associated Types§

Required Methods§

Source

async fn read(&mut self) -> Result<(i8, i8), Self::Error>

Source

async fn set_cpi(&mut self, _cpi: u16) -> Result<(), Self::Error>

Source

async fn get_cpi(&mut self) -> Result<u16, Self::Error>

Provided Methods§

Source

async fn init(&mut self) -> Result<(), Self::Error>

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§