pub struct SessionPicker { /* private fields */ }Expand description
Interactive session picker state. Not a full TUI Component — emits a result for the app to act on.
Implementations§
Source§impl SessionPicker
impl SessionPicker
pub fn new() -> Self
Sourcepub fn load_sessions(&mut self, repo: &dyn SessionRepo)
pub fn load_sessions(&mut self, repo: &dyn SessionRepo)
Load sessions from disk (call from async context).
Sourcepub fn set_filter(&mut self, filter: &str)
pub fn set_filter(&mut self, filter: &str)
Set the filter string and rebuild the filtered list.
Sourcepub fn select_prev(&mut self)
pub fn select_prev(&mut self)
Move selection up.
Sourcepub fn select_next(&mut self)
pub fn select_next(&mut self)
Move selection down.
Sourcepub fn selected_info(&self) -> Option<&SessionInfo>
pub fn selected_info(&self) -> Option<&SessionInfo>
Get the currently selected session info, if any.
Sourcepub fn selected_path(&self) -> Option<PathBuf>
pub fn selected_path(&self) -> Option<PathBuf>
Get the path of the selected session.
Sourcepub fn is_loading(&self) -> bool
pub fn is_loading(&self) -> bool
Whether the picker is still loading.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionPicker
impl RefUnwindSafe for SessionPicker
impl Send for SessionPicker
impl Sync for SessionPicker
impl Unpin for SessionPicker
impl UnsafeUnpin for SessionPicker
impl UnwindSafe for SessionPicker
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