pub struct ArchiveNavigator {
pub entries: Vec<ArchiveEntry>,
pub manifest: FxarManifest,
pub selected: usize,
}Expand description
Builds and navigates a virtual directory tree from a flat FXAR manifest.
Fields§
§entries: Vec<ArchiveEntry>Flat array of all nodes (root at index 0, then others).
manifest: FxarManifest§selected: usizeSelected node index (for TUI cursor).
Implementations§
Sourcepub fn from_manifest(manifest: FxarManifest) -> Result<Self>
pub fn from_manifest(manifest: FxarManifest) -> Result<Self>
Open the manifest and build the virtual tree.
pub fn root(&self) -> &ArchiveEntry
pub fn entry_at(&self, idx: usize) -> Option<&ArchiveEntry>
pub fn children_of(&self, idx: usize) -> &[usize]
pub fn parent_of(&self, idx: usize) -> Option<usize>
pub fn manifest_entry_for(&self, idx: usize) -> Option<&FxarManifestEntry>
pub fn select_next(&mut self)
pub fn select_prev(&mut self)
pub fn selected_entry(&self) -> Option<&ArchiveEntry>
Sourcepub fn list_snapshots(&self) -> &[String]
pub fn list_snapshots(&self) -> &[String]
Returns the list of snapshot names from the manifest.
Sourcepub fn snapshot_entry_count(&self, snapshot: &str) -> usize
pub fn snapshot_entry_count(&self, snapshot: &str) -> usize
Count entries (files and dirs) whose path starts with snapshot/ or equals snapshot.
Auto Trait Implementations§
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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