pub struct Home {Show 19 fields
pub scope: Scope,
pub limit_units: Vec<String>,
pub theme: Theme,
pub logger: Logger,
pub show_logger: bool,
pub all_units: IndexMap<UnitId, UnitWithStatus>,
pub filtered_units: StatefulList<MatchedUnit>,
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>>,
pub fuzzy_matcher: SkimMatcherV2,
}Fields§
§scope: Scope§limit_units: Vec<String>§theme: Theme§logger: Logger§show_logger: bool§all_units: IndexMap<UnitId, UnitWithStatus>§filtered_units: StatefulList<MatchedUnit>§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>>§fuzzy_matcher: SkimMatcherV2Implementations§
Source§impl Home
impl Home
pub fn new(scope: Scope, limit_units: &[String]) -> Self
pub fn set_units(&mut self, units: Vec<UnitWithStatus>)
pub fn sort_units(&mut self)
Sourcepub fn merge_unit_files(&mut self, unit_files: Vec<UnitFile>)
pub fn merge_unit_files(&mut self, unit_files: Vec<UnitFile>)
Merge unit file info (enablement state, file path) into existing units. Also adds units that aren’t returned by ListUnits (e.g. disabled, static, masked).
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)
pub fn refresh_filtered_units(&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 !Freeze for Home
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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more