This commit is contained in:
🪞👃🪞 2025-07-19 08:42:08 +03:00
parent 291b917970
commit 238ac2e888
25 changed files with 1018 additions and 1147 deletions

View file

@ -7,7 +7,7 @@ use crate::*;
///
/// When a key is pressed, the bindings for it are checked in sequence.
/// When the first non-conditional or true conditional binding is executed,
/// that binding's value is returned.
/// that .event()binding's value is returned.
#[derive(Debug)] pub struct EventMap<E, D: Dsl>(
/// Map of each event (e.g. key combination) to
/// all command expressions bound to it by
@ -71,7 +71,7 @@ impl<E: Ord + Debug + From<Arc<str>> + Clone> EventMap<E, Ast> {
}
/// Evaluate the active layers for a given state,
/// returning the command to be executed, if any.
pub fn handle <S, O> (&self, state: &mut S, event: Ast) -> Perhaps<O> where
pub fn handle <S, O> (&self, state: &mut S, event: &E) -> Perhaps<O> where
S: DslInto<bool> + DslInto<O>,
O: Command<S>
{