ShadowStateManager

Struct ShadowStateManager 

Source
pub struct ShadowStateManager { /* private fields */ }
Expand description

Shadow state manager that observes but doesn’t control

Implementations§

Source§

impl ShadowStateManager

Source

pub fn new() -> Self

Source

pub fn observe_mode_change(&mut self, mode: AppMode, trigger: &str)

Observe a mode change from the existing system

Source

pub fn set_mode(&mut self, mode: AppMode, buffer: &mut Buffer, trigger: &str)

Set mode - authoritative method that updates both shadow state and buffer

Source

pub fn switch_to_results(&mut self, buffer: &mut Buffer)

Switch to Results mode

Source

pub fn switch_to_command(&mut self, buffer: &mut Buffer)

Switch to Command mode

Start search with specific type

Source

pub fn exit_to_results(&mut self, buffer: &mut Buffer)

Exit current mode to Results

Source

pub fn observe_search_start(&mut self, search_type: SearchType, trigger: &str)

Observe search starting

Source

pub fn observe_search_end(&mut self, trigger: &str)

Observe search ending

Source

pub fn is_search_active(&self) -> bool

Check if we’re in search mode

Source

pub fn get_search_type(&self) -> Option<SearchType>

Get current search type if active

Source

pub fn status_display(&self) -> String

Get display string for status line

Source

pub fn debug_info(&self) -> String

Get debug info about recent transitions

Source

pub fn report_discrepancy(&mut self, expected: &str, actual: &str)

Report a discrepancy between shadow and actual state

Source

pub fn get_state(&self) -> &AppState

Get the current state

Source

pub fn get_mode(&self) -> AppMode

Get the current mode (converts state to AppMode for compatibility)

Source

pub fn is_in_results_mode(&self) -> bool

Check if currently in Results mode

Source

pub fn is_in_command_mode(&self) -> bool

Check if currently in Command mode

Source

pub fn is_in_search_mode(&self) -> bool

Check if currently in any Search mode

Source

pub fn is_in_help_mode(&self) -> bool

Check if currently in Help mode

Source

pub fn is_in_debug_mode(&self) -> bool

Check if currently in Debug mode

Source

pub fn is_in_history_mode(&self) -> bool

Check if currently in History mode

Source

pub fn is_in_jump_mode(&self) -> bool

Check if currently in JumpToRow mode

Source

pub fn is_in_column_stats_mode(&self) -> bool

Check if currently in ColumnStats mode

Check if in column search specifically

Check if in data search specifically

Source

pub fn is_in_fuzzy_filter(&self) -> bool

Check if in fuzzy filter mode specifically

Check if in vim search mode specifically

Source

pub fn get_previous_state(&self) -> Option<&AppState>

Get the previous state if any

Source

pub fn can_navigate(&self) -> bool

Check if we can navigate (in Results mode)

Source

pub fn can_edit(&self) -> bool

Check if we can edit (in Command mode or search modes)

Source

pub fn get_transition_count(&self) -> usize

Get transition count (useful for debugging)

Source

pub fn get_last_transition(&self) -> Option<&StateTransition>

Get the last transition if any

Trait Implementations§

Source§

impl Default for ShadowStateManager

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,