[][src]Struct ps2_mouse::Mouse

pub struct Mouse { /* fields omitted */ }

A basic interface to interact with a PS2 mouse.


impl Mouse[src]

pub const fn new() -> Mouse[src]

Creates a new Mouse.

pub fn get_state(&self) -> MouseState[src]

Returns the last completed state of the mouse.

pub fn init(&mut self) -> Result<(), &'static str>[src]

Attempts to initialize a Mouse. If successful, interrupts will be generated as PIC offset + 12.

pub fn process_packet(&mut self, packet: u8)[src]

Attempts to process a packet.

pub fn set_on_complete(&mut self, handler: fn(_: MouseState))[src]

Sets the on_complete function to be called when a packet is completed.

Trait Implementations

impl Debug for Mouse[src]

impl Default for Mouse[src]

Auto Trait Implementations

impl Send for Mouse

impl Sync for Mouse

impl Unpin for Mouse

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.