pub struct ContainerLogsSearch {
pub query: String,
pub matches: Vec<usize>,
pub current: usize,
pub cursor_pos: usize,
}Expand description
Search state for the container logs viewer. None on
Screen::ContainerLogs.search means no search is active.
Modeless: while the struct is Some, every keystroke either edits
the query (chars / cursor / delete) or navigates matches
(Tab / Shift+Tab). There is no “confirm” step: matches are
recomputed live and Esc exits search outright.
matches are line indices into the rendered body; current
indexes into matches. Smart case is decided by the query at
match time: any uppercase rune flips to case-sensitive (vim’s
'smartcase').
cursor_pos is a char index into query (0..=chars().count()).
Mirrors the host_form pattern so Left/Right/Home/End/Delete edit
mid-string instead of forcing append-only behaviour.
Fields§
§query: String§matches: Vec<usize>§current: usize§cursor_pos: usizeImplementations§
Source§impl ContainerLogsSearch
impl ContainerLogsSearch
pub fn insert_char(&mut self, c: char)
pub fn delete_char_before_cursor(&mut self)
pub fn delete_char_at_cursor(&mut self)
pub fn move_left(&mut self)
pub fn move_right(&mut self)
pub fn move_home(&mut self)
pub fn move_end(&mut self)
Trait Implementations§
Source§impl Clone for ContainerLogsSearch
impl Clone for ContainerLogsSearch
Source§fn clone(&self) -> ContainerLogsSearch
fn clone(&self) -> ContainerLogsSearch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContainerLogsSearch
impl Debug for ContainerLogsSearch
Source§impl Default for ContainerLogsSearch
impl Default for ContainerLogsSearch
Source§fn default() -> ContainerLogsSearch
fn default() -> ContainerLogsSearch
Returns the “default value” for a type. Read more
Source§impl PartialEq for ContainerLogsSearch
impl PartialEq for ContainerLogsSearch
Source§fn eq(&self, other: &ContainerLogsSearch) -> bool
fn eq(&self, other: &ContainerLogsSearch) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ContainerLogsSearch
Auto Trait Implementations§
impl Freeze for ContainerLogsSearch
impl RefUnwindSafe for ContainerLogsSearch
impl Send for ContainerLogsSearch
impl Sync for ContainerLogsSearch
impl Unpin for ContainerLogsSearch
impl UnsafeUnpin for ContainerLogsSearch
impl UnwindSafe for ContainerLogsSearch
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