[−][src]Enum keyberon::layout::Event
An event on the key matrix.
Variants
Press event with coordinates (i, j).
Release event with coordinates (i, j).
Implementations
impl Event
[src]
pub fn coord(self) -> (u8, u8)
[src]
Returns the coordinates (i, j) of the event.
pub fn transform(self, f: impl FnOnce(u8, u8) -> (u8, u8)) -> Self
[src]
Transforms the coordinates of the event.
Example
assert_eq!( Event::Press(3, 10), Event::Press(3, 1).transform(|i, j| (i, 11 - j)), );
Trait Implementations
impl Clone for Event
[src]
fn clone(&self) -> Event
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Event
[src]
impl Debug for Event
[src]
impl Eq for Event
[src]
impl PartialEq<Event> for Event
[src]
impl StructuralEq for Event
[src]
impl StructuralPartialEq for Event
[src]
Auto Trait Implementations
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, 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>,