pub struct TerminalApp { /* private fields */ }Expand description
Terminal document application state.
Implementations§
Source§impl TerminalApp
impl TerminalApp
Sourcepub fn new(document: IndexDocument, width: usize) -> Self
pub fn new(document: IndexDocument, width: usize) -> Self
Creates terminal state from a document and initial wrapping width.
Sourcepub fn with_capabilities(
document: IndexDocument,
width: usize,
capabilities: TerminalCapabilities,
) -> Self
pub fn with_capabilities( document: IndexDocument, width: usize, capabilities: TerminalCapabilities, ) -> Self
Creates terminal state from a document, width, and terminal capabilities.
Sourcepub const fn show_link_hints(&self) -> bool
pub const fn show_link_hints(&self) -> bool
Returns whether link hints are visible.
Returns whether the right-side structural sidebar is visible.
Returns the active right-sidebar mode.
Sourcepub const fn reader_profile(&self) -> ReaderProfile
pub const fn reader_profile(&self) -> ReaderProfile
Returns the active reader profile.
Sourcepub const fn reader_profile_is_auto(&self) -> bool
pub const fn reader_profile_is_auto(&self) -> bool
Returns whether the reader profile is currently automatic.
Sourcepub const fn table_mode(&self) -> TableMode
pub const fn table_mode(&self) -> TableMode
Returns the active table presentation mode.
Sourcepub const fn table_column_offset(&self) -> usize
pub const fn table_column_offset(&self) -> usize
Returns the zero-based horizontal table column offset.
Sets the active right-sidebar mode from persisted session state.
Sourcepub fn set_url_history(&mut self, history: Vec<String>)
pub fn set_url_history(&mut self, history: Vec<String>)
Replaces local URL-history suggestions.
Sourcepub fn set_response_logs(&mut self, logs: Vec<ResponseLogEntry>)
pub fn set_response_logs(&mut self, logs: Vec<ResponseLogEntry>)
Replaces local response logs.
Sourcepub fn set_reader_profile(&mut self, profile: ReaderProfile)
pub fn set_reader_profile(&mut self, profile: ReaderProfile)
Sets the active reader profile from CLI input or persisted session state.
Sourcepub fn set_reader_profile_auto(&mut self)
pub fn set_reader_profile_auto(&mut self)
Enables automatic reader profile selection for the current document.
Sourcepub const fn should_quit(&self) -> bool
pub const fn should_quit(&self) -> bool
Returns whether the app should quit.
Sourcepub const fn repair_recipe(&self) -> &RepairRecipe
pub const fn repair_recipe(&self) -> &RepairRecipe
Returns the current local repair recipe.
Sourcepub fn replace_document(
&mut self,
document: IndexDocument,
width: usize,
status: String,
)
pub fn replace_document( &mut self, document: IndexDocument, width: usize, status: String, )
Replaces the current document after an external navigation.
Sourcepub fn set_viewport_height(&mut self, height: usize)
pub fn set_viewport_height(&mut self, height: usize)
Updates the viewport height and clamps the offset.
Sourcepub fn handle_key(&mut self, key: KeyEvent) -> AppAction
pub fn handle_key(&mut self, key: KeyEvent) -> AppAction
Handles a terminal key event.
Trait Implementations§
Source§impl Clone for TerminalApp
impl Clone for TerminalApp
Source§fn clone(&self) -> TerminalApp
fn clone(&self) -> TerminalApp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for TerminalApp
impl RefUnwindSafe for TerminalApp
impl Send for TerminalApp
impl Sync for TerminalApp
impl Unpin for TerminalApp
impl UnsafeUnpin for TerminalApp
impl UnwindSafe for TerminalApp
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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