pub struct SearchScreen {
pub query: String,
pub cursor_pos: usize,
pub results: Option<RomList>,
pub result_groups: Option<Vec<RomGroup>>,
pub selected: usize,
pub scroll_offset: usize,
/* private fields */
}Expand description
Full-text search screen over ROMs, with grouped results.
Fields§
§query: String§cursor_pos: usize§results: Option<RomList>§result_groups: Option<Vec<RomGroup>>One row per game name (base + updates/DLC grouped).
selected: usize§scroll_offset: usizeImplementations§
Source§impl SearchScreen
impl SearchScreen
pub fn new() -> Self
pub fn add_char(&mut self, c: char)
pub fn delete_char(&mut self)
pub fn cursor_left(&mut self)
pub fn cursor_right(&mut self)
pub fn set_results(&mut self, results: RomList)
pub fn clear_results(&mut self)
pub fn next(&mut self)
pub fn previous(&mut self)
Sourcepub fn get_selected_group(&self) -> Option<(Rom, Vec<Rom>)>
pub fn get_selected_group(&self) -> Option<(Rom, Vec<Rom>)>
Primary ROM and other files (updates/DLC) for the selected game.
pub fn render(&mut self, f: &mut Frame<'_>, area: Rect)
pub fn cursor_position(&self, area: Rect) -> Option<(u16, u16)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SearchScreen
impl RefUnwindSafe for SearchScreen
impl Send for SearchScreen
impl Sync for SearchScreen
impl Unpin for SearchScreen
impl UnsafeUnpin for SearchScreen
impl UnwindSafe for SearchScreen
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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