use crate::event::key::Key;
use super::*;
use std::{fmt::Debug, any::Any};
pub mod compound;
pub mod filter;
pub mod variant;
pub mod key;
pub mod standard;
pub mod imp;
pub trait Event<E>: Sized + Clone + Debug where E: Env, E::Backend: Backend<E,Event=Self> {
type Dest: Destination;
type Key: Key;
fn consuming(&self) -> bool;
fn destination(&self) -> Self::Dest;
#[inline]
fn from<V: Variant<E>>(v: V) -> Self where Self: VariantSupport<V,E> {
VariantSupport::<V,E>::from_variant(v)
}
#[inline]
fn is<V: Variant<E>>(&self) -> Option<V> where Self: VariantSupport<V,E> {
VariantSupport::<V,E>::to_variant(self)
}
#[inline]
fn in_bounds(&self, _: &Bounds) -> bool {
true
}
fn _root_only(&self) -> bool;
fn _debug_type_name(&self);
}
pub trait Destination: Clone + Sized {
const ROOT: Self;
const FOCUSED: Self;
const HOVERED: Self;
const INVALID: Self;
#[inline]
fn default() -> Self {
Self::ROOT
}
}
pub type EventResp = bool;