Struct systemctl_tui::components::home::Home
source · pub struct Home {Show 16 fields
pub scope: Scope,
pub logger: Logger,
pub show_logger: bool,
pub all_units: IndexMap<UnitId, UnitWithStatus>,
pub filtered_units: StatefulList<UnitWithStatus>,
pub logs: Vec<String>,
pub logs_scroll_offset: u16,
pub mode: Mode,
pub previous_mode: Option<Mode>,
pub input: Input,
pub menu_items: StatefulList<MenuItem>,
pub cancel_token: Option<CancellationToken>,
pub spinner_tick: u8,
pub error_message: String,
pub action_tx: Option<UnboundedSender<Action>>,
pub journalctl_tx: Option<Sender<UnitId>>,
}Fields§
§scope: Scope§logger: Logger§show_logger: bool§all_units: IndexMap<UnitId, UnitWithStatus>§filtered_units: StatefulList<UnitWithStatus>§logs: Vec<String>§logs_scroll_offset: u16§mode: Mode§previous_mode: Option<Mode>§input: Input§cancel_token: Option<CancellationToken>§spinner_tick: u8§error_message: String§action_tx: Option<UnboundedSender<Action>>§journalctl_tx: Option<Sender<UnitId>>Implementations§
source§impl Home
impl Home
pub fn new(scope: Scope) -> Self
pub fn set_units(&mut self, units: Vec<UnitWithStatus>)
pub fn update_units(&mut self, units: Vec<UnitWithStatus>)
pub fn next(&mut self)
pub fn previous(&mut self)
pub fn select(&mut self, index: Option<usize>, refresh_logs: bool)
pub fn unselect(&mut self)
pub fn selected_service(&self) -> Option<UnitId>
pub fn get_logs(&mut self)
Trait Implementations§
source§impl Component for Home
impl Component for Home
fn init(&mut self, tx: UnboundedSender<Action>) -> Result<()>
fn handle_key_events(&mut self, key: KeyEvent) -> Vec<Action>
fn dispatch(&mut self, action: Action) -> Option<Action>
fn render(&mut self, f: &mut Frame<'_>, rect: Rect)
fn handle_events(&mut self, event: Option<Event>) -> Vec<Action>
fn handle_mouse_events(&mut self, mouse: MouseEvent) -> Vec<Action>
Auto Trait Implementations§
impl !RefUnwindSafe for Home
impl Send for Home
impl Sync for Home
impl Unpin for Home
impl !UnwindSafe for Home
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.