Files
komp_ac/client/src/tui/terminal/event_reader.rs

16 lines
277 B
Rust

// src/tui/terminal/event_reader.rs
use crossterm::event::{self, Event};
pub struct EventReader;
impl EventReader {
pub fn new() -> Self {
Self
}
pub fn read_event(&self) -> Result<Event, Box<dyn std::error::Error>> {
Ok(event::read()?)
}
}