pub struct LibraryBrowseScreen {
pub platforms: Vec<Platform>,
pub collections: Vec<Collection>,
pub subsection: LibrarySubsection,
pub list_index: usize,
pub view_mode: LibraryViewMode,
pub roms: Option<RomList>,
pub rom_groups: Option<Vec<RomGroup>>,
pub rom_selected: usize,
pub scroll_offset: usize,
pub search_query: String,
pub search_mode: Option<LibrarySearchMode>,
/* private fields */
}Expand description
Main library browser: consoles/collections on the left, games on the right.
Fields§
§platforms: Vec<Platform>§collections: Vec<Collection>§subsection: LibrarySubsection§list_index: usize§view_mode: LibraryViewMode§roms: Option<RomList>§rom_groups: Option<Vec<RomGroup>>One row per game name (base + updates/DLC grouped).
rom_selected: usize§scroll_offset: usize§search_query: String§search_mode: Option<LibrarySearchMode>Implementations§
Source§impl LibraryBrowseScreen
impl LibraryBrowseScreen
pub fn new(platforms: Vec<Platform>, collections: Vec<Collection>) -> Self
pub fn list_len(&self) -> usize
pub fn list_next(&mut self)
pub fn list_previous(&mut self)
pub fn rom_next(&mut self)
pub fn rom_previous(&mut self)
pub fn switch_subsection(&mut self)
pub fn switch_view(&mut self)
pub fn back_to_list(&mut self)
Sourcepub fn clear_roms(&mut self)
pub fn clear_roms(&mut self)
Clear the ROM list (and groups) so the right panel does not show another console/collection’s games while loading the new selection.
pub fn enter_search(&mut self, mode: LibrarySearchMode)
pub fn clear_search(&mut self)
pub fn add_search_char(&mut self, c: char)
pub fn delete_search_char(&mut self)
pub fn jump_to_match(&mut self, next: bool)
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.
Sourcepub fn cache_key(&self) -> Option<RomCacheKey>
pub fn cache_key(&self) -> Option<RomCacheKey>
Cache key for the currently selected console or collection.
Sourcepub fn expected_rom_count(&self) -> u64
pub fn expected_rom_count(&self) -> u64
Expected ROM count from the live platform/collection metadata. Used to validate whether the disk cache is still fresh.
pub fn get_roms_request_platform(&self) -> Option<GetRoms>
pub fn get_roms_request_collection(&self) -> Option<GetRoms>
pub fn render(&mut self, f: &mut Frame<'_>, area: Rect)
Auto Trait Implementations§
impl Freeze for LibraryBrowseScreen
impl RefUnwindSafe for LibraryBrowseScreen
impl Send for LibraryBrowseScreen
impl Sync for LibraryBrowseScreen
impl Unpin for LibraryBrowseScreen
impl UnsafeUnpin for LibraryBrowseScreen
impl UnwindSafe for LibraryBrowseScreen
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