logutil 0.12.4

log Util is a Rust-based tool designed to help you monitor and analyze Nginx access logs in real-time.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crossterm::event::KeyEvent;
use ratatui::{layout::Rect, Frame};

/// Trait for TUI tabs
pub trait Tab: Send + Sync + 'static {
    /// Draw the tab content
    fn draw(&mut self, frame: &mut Frame, area: Rect, log_data: &crate::log_data::LogData);

    /// Handle input for the tab
    fn handle_input(&mut self, key: KeyEvent, log_data: &crate::log_data::LogData) -> bool;

    /// Get mutable reference as Any for downcasting
    fn as_any_mut(&mut self) -> &mut dyn std::any::Any;
}