mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
14 lines
359 B
Rust
14 lines
359 B
Rust
use crate::*;
|
|
/// Event source
|
|
pub trait Input: Send + Sync + Sized {
|
|
/// Type of input event
|
|
type Event;
|
|
/// Result of handling input
|
|
type Handled;
|
|
/// Currently handled event
|
|
fn event (&self) -> &Self::Event;
|
|
/// Whether component should exit
|
|
fn is_done (&self) -> bool;
|
|
/// Mark component as done
|
|
fn done (&self);
|
|
}
|