pub struct ShadowStateManager { /* private fields */ }
Expand description
Shadow state manager that observes but doesn’t control
Implementations§
Source§impl ShadowStateManager
impl ShadowStateManager
pub fn new() -> Self
Sourcepub fn observe_mode_change(&mut self, mode: AppMode, trigger: &str)
pub fn observe_mode_change(&mut self, mode: AppMode, trigger: &str)
Observe a mode change from the existing system
Sourcepub fn set_mode(&mut self, mode: AppMode, buffer: &mut Buffer, trigger: &str)
pub fn set_mode(&mut self, mode: AppMode, buffer: &mut Buffer, trigger: &str)
Set mode - authoritative method that updates both shadow state and buffer
Sourcepub fn switch_to_results(&mut self, buffer: &mut Buffer)
pub fn switch_to_results(&mut self, buffer: &mut Buffer)
Switch to Results mode
Sourcepub fn switch_to_command(&mut self, buffer: &mut Buffer)
pub fn switch_to_command(&mut self, buffer: &mut Buffer)
Switch to Command mode
Sourcepub fn start_search(
&mut self,
search_type: SearchType,
buffer: &mut Buffer,
trigger: &str,
)
pub fn start_search( &mut self, search_type: SearchType, buffer: &mut Buffer, trigger: &str, )
Start search with specific type
Sourcepub fn exit_to_results(&mut self, buffer: &mut Buffer)
pub fn exit_to_results(&mut self, buffer: &mut Buffer)
Exit current mode to Results
Sourcepub fn observe_search_start(&mut self, search_type: SearchType, trigger: &str)
pub fn observe_search_start(&mut self, search_type: SearchType, trigger: &str)
Observe search starting
Sourcepub fn observe_search_end(&mut self, trigger: &str)
pub fn observe_search_end(&mut self, trigger: &str)
Observe search ending
Sourcepub fn is_search_active(&self) -> bool
pub fn is_search_active(&self) -> bool
Check if we’re in search mode
Sourcepub fn get_search_type(&self) -> Option<SearchType>
pub fn get_search_type(&self) -> Option<SearchType>
Get current search type if active
Sourcepub fn status_display(&self) -> String
pub fn status_display(&self) -> String
Get display string for status line
Sourcepub fn debug_info(&self) -> String
pub fn debug_info(&self) -> String
Get debug info about recent transitions
Sourcepub fn report_discrepancy(&mut self, expected: &str, actual: &str)
pub fn report_discrepancy(&mut self, expected: &str, actual: &str)
Report a discrepancy between shadow and actual state
Sourcepub fn get_mode(&self) -> AppMode
pub fn get_mode(&self) -> AppMode
Get the current mode (converts state to AppMode
for compatibility)
Sourcepub fn is_in_results_mode(&self) -> bool
pub fn is_in_results_mode(&self) -> bool
Check if currently in Results mode
Sourcepub fn is_in_command_mode(&self) -> bool
pub fn is_in_command_mode(&self) -> bool
Check if currently in Command mode
Sourcepub fn is_in_search_mode(&self) -> bool
pub fn is_in_search_mode(&self) -> bool
Check if currently in any Search mode
Sourcepub fn is_in_help_mode(&self) -> bool
pub fn is_in_help_mode(&self) -> bool
Check if currently in Help mode
Sourcepub fn is_in_debug_mode(&self) -> bool
pub fn is_in_debug_mode(&self) -> bool
Check if currently in Debug mode
Sourcepub fn is_in_history_mode(&self) -> bool
pub fn is_in_history_mode(&self) -> bool
Check if currently in History mode
Sourcepub fn is_in_jump_mode(&self) -> bool
pub fn is_in_jump_mode(&self) -> bool
Check if currently in JumpToRow
mode
Sourcepub fn is_in_column_stats_mode(&self) -> bool
pub fn is_in_column_stats_mode(&self) -> bool
Check if currently in ColumnStats
mode
Sourcepub fn is_in_column_search(&self) -> bool
pub fn is_in_column_search(&self) -> bool
Check if in column search specifically
Sourcepub fn is_in_data_search(&self) -> bool
pub fn is_in_data_search(&self) -> bool
Check if in data search specifically
Sourcepub fn is_in_fuzzy_filter(&self) -> bool
pub fn is_in_fuzzy_filter(&self) -> bool
Check if in fuzzy filter mode specifically
Sourcepub fn is_in_vim_search(&self) -> bool
pub fn is_in_vim_search(&self) -> bool
Check if in vim search mode specifically
Sourcepub fn get_previous_state(&self) -> Option<&AppState>
pub fn get_previous_state(&self) -> Option<&AppState>
Get the previous state if any
Check if we can navigate (in Results mode)
Sourcepub fn get_transition_count(&self) -> usize
pub fn get_transition_count(&self) -> usize
Get transition count (useful for debugging)
Sourcepub fn get_last_transition(&self) -> Option<&StateTransition>
pub fn get_last_transition(&self) -> Option<&StateTransition>
Get the last transition if any
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShadowStateManager
impl RefUnwindSafe for ShadowStateManager
impl Send for ShadowStateManager
impl Sync for ShadowStateManager
impl Unpin for ShadowStateManager
impl UnwindSafe for ShadowStateManager
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
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>
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>
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