pub struct Source {
pub fetch: Arc<dyn Fn() -> String + Send + Sync>,
pub ended: Option<Box<dyn Fn() -> String>>,
pub cur: String,
pub cur_cwd: String,
pub cur_target: String,
pub home: String,
pub newver: String,
pub script: Option<String>,
pub popup: bool,
pub state: State,
}Expand description
Where rows come from, and what does not change while the picker is open.
fetch is a closure rather than a string so ctrl-r and the refresh timer can
ask again. ended is separate because the ended list is not the pane list
filtered: it comes off the sessions cache and nothing in it has a pane at all.
Fields§
§fetch: Arc<dyn Fn() -> String + Send + Sync>Shared and thread-safe because a refresh runs OFF the input loop: see
start_refresh. It was a plain closure until a sweep froze the picker
for the 85 seconds its restarts took, with no key accepted and nothing
on screen to say why.
ended: Option<Box<dyn Fn() -> String>>The ended list stays synchronous: it is a read of one cache file, with no fork in it, and it is what Tab’s last stop shows the instant you land on it. Nothing here has ever been slow, and making it async would mean showing pane rows under the “past sessions” label while it arrived.
cur: String§cur_cwd: StringWhere the pane the picker was opened from IS, for the case where that
pane is not an agent session: cur then matches no row at all and these
are what the cursor is placed by instead. See nearest.
Empty means “not known”, which is what every entry point but pick hands
over, and the cursor then opens at the top of the list as it always did.
cur_target: String§home: String§newver: String§script: Option<String>The taimux script, for the two keys that act rather than navigate. Unset means they are not bound, and the header then does not advertise them: the header only ever says what is really there.
popup: boolSet only when the binding said so with -e TAIMUX_POPUP=1. It is what
allows the picker to close and reopen itself at a new size, which would
be wrong for a picker running inline in a pane: tmux resizes a PANE with
the client already, so there is nothing to do there and everything to
lose by guessing.
state: StateWhat a previous instance was doing when the terminal grew under it.
Auto Trait Implementations§
impl !RefUnwindSafe for Source
impl !Send for Source
impl !Sync for Source
impl !UnwindSafe for Source
impl Freeze for Source
impl Unpin for Source
impl UnsafeUnpin for Source
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
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> ⓘ
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> ⓘ
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