Skip to main content

Input

Struct Input 

Source
pub struct Input<'a> {
Show 13 fields pub cur: &'a str, pub width: usize, pub home: &'a str, pub newver: &'a str, pub only: &'a str, pub outdated: bool, pub background: bool, pub with_background: bool, pub panes: bool, pub query: &'a str, pub snips: HashMap<String, String>, pub ptitles: HashMap<String, String>, pub restarting: HashSet<String>,
}

Fields§

§cur: &'a str§width: usize

0 means “unknown”, which reads as “do not right-align”.

§home: &'a str§newver: &'a str

What a session started right now would run, so a pane left behind by a self-update can be told apart from a current one.

§only: &'a str

One state only, or empty for all.

§outdated: bool

Keep only the rows a restart would act on, i.e. the ones the version column paints yellow.

Separate from only because being behind is not a STATE: it is the row’s version against the one installed here, and a session waiting, working or idle can each be behind. Which is also why this list crosses the four state modes rather than sitting inside one of them.

§background: bool

Keep only the rows whose session left work in flight, a shell or a subagent still running: the tenth field, bg.

Not a state either, for the same reason the hook line’s bg reads as idle: the turn is over and the prompt is free. It is the question restart asks on top of the state, and a session that has started a new turn since can still have that work running.

§with_background: bool

Keep the rows background would as well, whatever their state, on top of the ones only keeps.

What the working list asks for: a shell or a subagent a turn left running is work still going on, and the list of what is busy is where you look for it, even though the turn that started it is over and the row reads as idle. Only the list grows: the row keeps its state and its marker, so it still shows as idle in it.

§panes: bool

Keep the rows of panes running no agent, the ones in state pane, which every list but the every-pane one leaves out. They come in on the same scan as the sessions, so this is the only thing that keeps them out of the lists of what sessions are doing.

§query: &'a str§snips: HashMap<String, String>

pane id to the snippet of what that session said, when searching.

The layout applies whatever it is given. The “at least TAIMUX_SEARCH_MIN characters” gate lives in the CALLER, exactly as it does in bash: under three characters a term is in every transcript and a match would say nothing, so no snippets are looked up at all. Handing this a snippet map for a one-letter query would quietly turn every row into a search hit.

§ptitles: HashMap<String, String>

pane id to the title its conversation last recorded, for a pane that publishes none of its own.

§restarting: HashSet<String>

Panes with a restart in flight.

This paints the marker column and nothing else. In particular it does NOT touch the state field, which is what keeps such a row where it was: the state drives both the Tab filter and the row’s place in the list, so a synthetic “restarting” state would drop the row out of whichever mode it was being watched in, at the exact moment its owner is watching it.

Trait Implementations§

Source§

impl<'a> Default for Input<'a>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Forget for Input<'a>

§

impl<'a> Freeze for Input<'a>

§

impl<'a> Move for Input<'a>

§

impl<'a> RefUnwindSafe for Input<'a>

§

impl<'a> Send for Input<'a>
where &'a str: Send, RawTable<(String, String)>: Send, RawTable<(String, ())>: Send,

§

impl<'a> Sync for Input<'a>
where RawTable<(String, String)>: Sync, RawTable<(String, ())>: Sync,

§

impl<'a> Unpin for Input<'a>
where &'a str: Unpin, *const u8 is !null: Unpin,

§

impl<'a> UnsafeUnpin for Input<'a>

§

impl<'a> UnwindSafe for Input<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.