[−][src]Struct sunrise_keyboard::Keyboard
Keyboard handling structure.
Fields
writable_event: Option<WritableEvent>
The event used to signal changes in the shared memory.
readable_event: ReadableEvent
The event returned to the client when requested via IPC.
keys_queue: VecDeque<HidKeyboardState>
The queue containing the keyboard state received by the driver.
Implementations
impl Keyboard
[src]
pub fn new() -> Result<Self, Error>
[src]
Create a new instance of Keyboard.
pub fn get_readable_event(&self) -> HandleRef<'static>
[src]
Get the readable update event of the Keyboard.
pub fn take_writable_event(&mut self) -> Option<WritableEvent>
[src]
pub fn handle_ps2_irq(&mut self) -> Option<()>
[src]
Handle a PS2 IRQ and push a new key state to the internal queue if needed.
pub fn read_keyboard_states(
&mut self,
states: &mut [HidKeyboardState]
) -> Result<u64, Error>
[src]
&mut self,
states: &mut [HidKeyboardState]
) -> Result<u64, Error>
Get the last key states on the internal queue.
Auto Trait Implementations
impl RefUnwindSafe for Keyboard
impl Send for Keyboard
impl Sync for Keyboard
impl Unpin for Keyboard
impl UnwindSafe for Keyboard
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SizedIPCBuffer for T
[src]
fn size(&self) -> usize
[src]
fn is_cool(addr: usize, size: usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(addr: usize, _size: usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(addr: usize, _size: usize) -> &'a mut T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,