pub struct HistoryWidget { /* private fields */ }
Expand description
A self-contained widget for command history
Implementations§
Source§impl HistoryWidget
impl HistoryWidget
pub fn new(command_history: CommandHistory) -> Self
Sourcepub fn initialize(&mut self)
pub fn initialize(&mut self)
Initialize history mode - load all history entries
Sourcepub fn update_search(&mut self, query: String)
pub fn update_search(&mut self, query: String)
Update search query and filter matches
Sourcepub fn handle_key(&mut self, key: KeyEvent) -> HistoryAction
pub fn handle_key(&mut self, key: KeyEvent) -> HistoryAction
Handle key input for history mode
Sourcepub fn get_state(&self) -> &HistoryState
pub fn get_state(&self) -> &HistoryState
Get the current state (for persistence/restoration)
Sourcepub fn set_state(&mut self, state: HistoryState)
pub fn set_state(&mut self, state: HistoryState)
Restore state (for mode switching)
Sourcepub fn get_selected_command(&self) -> Option<String>
pub fn get_selected_command(&self) -> Option<String>
Get selected command if any
Trait Implementations§
Source§impl DebugInfoProvider for HistoryWidget
impl DebugInfoProvider for HistoryWidget
Source§fn debug_info(&self) -> String
fn debug_info(&self) -> String
Generate a formatted string containing debug information about the widget’s state Read more
Source§fn debug_summary(&self) -> String
fn debug_summary(&self) -> String
Optional: Get a short one-line summary of the widget state
Useful for compact debug views
Auto Trait Implementations§
impl !Freeze for HistoryWidget
impl RefUnwindSafe for HistoryWidget
impl Send for HistoryWidget
impl Sync for HistoryWidget
impl Unpin for HistoryWidget
impl UnwindSafe for HistoryWidget
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