Match key events using macros
This commit is contained in:
parent
df0403a782
commit
20ea96f83e
7 changed files with 152 additions and 155 deletions
|
|
@ -18,6 +18,15 @@ pub enum Cursor<I> {
|
|||
},
|
||||
}
|
||||
|
||||
impl<I> Cursor<I> {
|
||||
pub fn editor(coming_from: Option<I>, parent: Option<I>) -> Self {
|
||||
Self::Editor {
|
||||
coming_from,
|
||||
parent,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<I: Eq> Cursor<I> {
|
||||
pub fn refers_to(&self, id: &I) -> bool {
|
||||
if let Self::Msg(own_id) = self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue