pub enum EventModifier {
Behaviour(Behaviour),
Key(KeyName),
System(SystemKey),
}Expand description
What an on-<event>.<modifier> qualifier asks for. Every tier reads a handler’s modifiers
through this type; the words themselves live only in the tables below.
Variants§
Behaviour(Behaviour)
How the browser treats the event once a listener has it.
Key(KeyName)
The one key a keyboard handler answers.
System(SystemKey)
A modifier key that must be held while the event happens.
Implementations§
Source§impl EventModifier
impl EventModifier
Sourcepub fn classify(word: &str) -> Option<EventModifier>
pub fn classify(word: &str) -> Option<EventModifier>
Classify one qualifier word, or None when the catalogue does not know it.
Named qualifiers match case-insensitively, as HTML attribute names do. Any other single printable character is the key of that character.
Sourcepub fn key_of(modifiers: &[EventModifier]) -> Option<String>
pub fn key_of(modifiers: &[EventModifier]) -> Option<String>
The key a handler with these modifiers waits for, as a browser reports it — None for a
handler that answers every key.
Sourcepub fn host_listen_bits(modifiers: &[EventModifier]) -> u8
pub fn host_listen_bits(modifiers: &[EventModifier]) -> u8
The bits a host’s listen registration carries for these modifiers (Behaviour::listen_bit)
— every behaviour a host dispatches by. .once is not among them: a host never retires a
listener on its own, and the lowering keeps .once as compiled LOGOS.
Sourcepub fn every_word() -> impl Iterator<Item = &'static str>
pub fn every_word() -> impl Iterator<Item = &'static str>
Every qualifier the catalogue names, for a did-you-mean.
Trait Implementations§
Source§impl Clone for EventModifier
impl Clone for EventModifier
Source§fn clone(&self) -> EventModifier
fn clone(&self) -> EventModifier
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EventModifier
impl Debug for EventModifier
Source§impl PartialEq for EventModifier
impl PartialEq for EventModifier
impl Copy for EventModifier
impl Eq for EventModifier
impl StructuralPartialEq for EventModifier
Auto Trait Implementations§
impl Freeze for EventModifier
impl RefUnwindSafe for EventModifier
impl Send for EventModifier
impl Sync for EventModifier
impl Unpin for EventModifier
impl UnsafeUnpin for EventModifier
impl UnwindSafe for EventModifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.