17 lines
269 B
Rust
17 lines
269 B
Rust
// src/tui/terminal/event_reader.rs
|
|
|
|
use crossterm::event::{self, Event};
|
|
use anyhow::Result;
|
|
|
|
pub struct EventReader;
|
|
|
|
impl EventReader {
|
|
pub fn new() -> Self {
|
|
Self
|
|
}
|
|
|
|
pub fn read_event(&self) -> Result<Event> {
|
|
Ok(event::read()?)
|
|
}
|
|
}
|