Skip to main content

ArchiveModel

Struct ArchiveModel 

Source
pub struct ArchiveModel {
Show 22 fields pub navigator: ArchiveNavigator, pub tree_state: TreeState<String>, pub show_metadata: bool, pub search_mode: bool, pub search_query: String, pub search_results: Vec<usize>, pub snapshot_filter: Option<String>, pub detail_popup: bool, pub snapshot_popup: bool, pub snapshot_popup_selected: usize, pub preview_mode: bool, pub preview_content_raw: Option<Vec<u8>>, pub preview_scroll: u16, pub extract_prompt: bool, pub extract_dest: String, pub extract_status: Option<String>, pub pending_extract: Option<String>, pub vector_search_mode: bool, pub vector_query: String, pub vector_results: Vec<(f32, String)>, pub vector_status: Option<String>, pub vector_search_pending: bool,
}
Expand description

State for archive browsing mode.

Fields§

§navigator: ArchiveNavigator§tree_state: TreeState<String>§show_metadata: bool

Whether the full metadata panel is shown (or toggled off for narrow terminals).

§search_mode: bool

Whether we’re in search input mode.

§search_query: String§search_results: Vec<usize>

Indices into navigator.entries that match the current search query.

§snapshot_filter: Option<String>

None = all snapshots; Some(name) = filtered to one snapshot.

§detail_popup: bool

Whether the detail popup is shown (I key).

§snapshot_popup: bool

Whether the snapshot selector popup is open (S key).

§snapshot_popup_selected: usize

Selected index in the snapshot popup list.

§preview_mode: bool

Whether a file preview is shown (V key).

§preview_content_raw: Option<Vec<u8>>

Raw bytes from restore_file_head() for the selected file.

§preview_scroll: u16

Vertical scroll offset for preview panel.

§extract_prompt: bool

True when the user pressed E and is entering a destination path.

§extract_dest: String

The destination path being typed in the extract prompt.

§extract_status: Option<String>

Result message shown after extraction (e.g. “Extracted: /path (1234 B)”).

§pending_extract: Option<String>

Pending extract request: destination path confirmed by Enter.

§vector_search_mode: bool

Whether we’re in vector/semantic search mode (Ctrl+/).

§vector_query: String

The natural-language query being typed for vector search.

§vector_results: Vec<(f32, String)>

(score, file_path) pairs from the vector search callback, sorted desc by score.

§vector_status: Option<String>

Status message for vector search (“No AI index”, “Searching…”, “Found N results”, or error).

§vector_search_pending: bool

Flag set by Enter in vector search mode; consumed by BrowserApp::run_vector_search().

Implementations§

Source§

impl ArchiveModel

Source

pub fn new(navigator: ArchiveNavigator) -> Self

Source

pub fn build_tree_items(&self) -> Vec<TreeItem<'static, String>>

Source

pub fn apply_search_filter(&mut self)

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.

§

impl<T> Instrument for T

§

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

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

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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