pub struct SessionListModel {
pub scope: Scope,
pub sort: SortMode,
pub named_only: bool,
pub show_path: bool,
pub query: String,
pub confirm_delete: Option<String>,
pub current_path: Option<String>,
pub loading: bool,
/* private fields */
}Expand description
The picker model.
Fields§
§scope: ScopeScope.
sort: SortModeSort mode.
named_only: boolNamed-only filter.
show_path: boolShow file paths.
query: StringSearch query.
confirm_delete: Option<String>Path awaiting delete confirmation.
current_path: Option<String>Currently open session file.
loading: boolItems are loading.
Implementations§
Source§impl SessionListModel
impl SessionListModel
Sourcepub fn set_items(&mut self, items: Vec<SessionItem>)
pub fn set_items(&mut self, items: Vec<SessionItem>)
Replaces the items (newest first expected).
Sourcepub fn item(&self, index: usize) -> Option<&SessionItem>
pub fn item(&self, index: usize) -> Option<&SessionItem>
Item by index.
Sourcepub fn rows(&self) -> &[SessionRow]
pub fn rows(&self) -> &[SessionRow]
Visible rows.
Sourcepub fn selected_item(&self) -> Option<&SessionItem>
pub fn selected_item(&self) -> Option<&SessionItem>
Selected session.
Sourcepub fn toggle_sort(&mut self)
pub fn toggle_sort(&mut self)
app.session.toggleSort.
Sourcepub fn toggle_named(&mut self)
pub fn toggle_named(&mut self)
app.session.toggleNamedFilter.
Trait Implementations§
Source§impl Clone for SessionListModel
impl Clone for SessionListModel
Source§impl Debug for SessionListModel
impl Debug for SessionListModel
Auto Trait Implementations§
impl Freeze for SessionListModel
impl RefUnwindSafe for SessionListModel
impl Send for SessionListModel
impl Sync for SessionListModel
impl Unpin for SessionListModel
impl UnsafeUnpin for SessionListModel
impl UnwindSafe for SessionListModel
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