pub struct ViewCopyConfig {
pub header: Option<String>,
pub show_hints: bool,
pub exit_keys: Vec<KeyCode>,
pub toggle_key: KeyCode,
}Expand description
Configuration for View/Copy mode
Fields§
§header: Option<String>Header text to show at the top
show_hints: boolWhether to show keyboard hints
exit_keys: Vec<KeyCode>Exit keys (default: ‘c’, ‘q’, Esc)
toggle_key: KeyCodeToggle line numbers key (default: ‘n’)
Implementations§
Source§impl ViewCopyConfig
impl ViewCopyConfig
Sourcepub fn with_header(self, header: impl Into<String>) -> Self
pub fn with_header(self, header: impl Into<String>) -> Self
Set the header text
Sourcepub fn show_hints(self, show: bool) -> Self
pub fn show_hints(self, show: bool) -> Self
Set whether to show keyboard hints
Sourcepub fn toggle_key(self, key: KeyCode) -> Self
pub fn toggle_key(self, key: KeyCode) -> Self
Set the toggle line numbers key
Trait Implementations§
Source§impl Clone for ViewCopyConfig
impl Clone for ViewCopyConfig
Source§fn clone(&self) -> ViewCopyConfig
fn clone(&self) -> ViewCopyConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ViewCopyConfig
impl Debug for ViewCopyConfig
Auto Trait Implementations§
impl Freeze for ViewCopyConfig
impl RefUnwindSafe for ViewCopyConfig
impl Send for ViewCopyConfig
impl Sync for ViewCopyConfig
impl Unpin for ViewCopyConfig
impl UnwindSafe for ViewCopyConfig
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
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>
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