[][src]Struct keyberon::layout::Layout

pub struct Layout { /* fields omitted */ }

The layout manager. It takes Events and ticks as input, and generate keyboard reports.

Implementations

impl Layout[src]

pub fn new(layers: Layers) -> Self[src]

Creates a new Layout object.

pub fn keycodes<'a>(&'a self) -> impl Iterator<Item = KeyCode> + 'a[src]

Iterates on the key codes of the current state.

pub fn tick<'a>(&'a mut self) -> impl Iterator<Item = KeyCode> + 'a[src]

A time event.

This method must be called regularly, typically every millisecond.

Returns an iterator on the current key code state.

pub fn event<'a>(
    &'a mut self,
    event: Event
) -> impl Iterator<Item = KeyCode> + 'a
[src]

A key event.

Returns an iterator on the current key code state.

Auto Trait Implementations

impl Send for Layout

impl Sync for Layout

impl Unpin for Layout

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.