pub struct SessionPicker { /* private fields */ }Expand description
The session picker TUI model.
Implementations§
Source§impl SessionPicker
impl SessionPicker
Sourcepub fn new(sessions: Vec<SessionMeta>) -> Self
pub fn new(sessions: Vec<SessionMeta>) -> Self
Create a new session picker.
pub fn with_theme(sessions: Vec<SessionMeta>, theme: &Theme) -> Self
pub fn with_theme_and_root( sessions: Vec<SessionMeta>, theme: &Theme, sessions_root: PathBuf, ) -> Self
Sourcepub fn selected_path(&self) -> Option<&str>
pub fn selected_path(&self) -> Option<&str>
Get the selected session path after the picker completes.
Sourcepub const fn was_cancelled(&self) -> bool
pub const fn was_cancelled(&self) -> bool
Check if the picker was cancelled.
pub fn update(&mut self, msg: Message) -> Option<Cmd>
pub fn view(&self) -> String
Trait Implementations§
Source§impl Model for SessionPicker
impl Model for SessionPicker
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).
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