Trait EventCode

Source
pub trait EventCode<T>
where Self: Clone + Copy + Debug + Default + Eq + Hash + Sized, T: EventCodeValue,
{ const COUNT: T; const MAX: T; // Provided method fn iter() -> IntoIter<Self, T> { ... } }
Expand description

Trait common to all event codes

Required Associated Constants§

Source

const COUNT: T

Code count

Source

const MAX: T

Maximum value

Provided Methods§

Source

fn iter() -> IntoIter<Self, T>

Return the default event code iterator

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§

Source§

impl EventCode<u8> for AbsoluteAxis

Source§

const COUNT: u8 = 64u8

Source§

const MAX: u8 = 63u8

Source§

impl EventCode<u16> for Key

Source§

const COUNT: u16 = 768u16

Source§

const MAX: u16 = 767u16