Skip to main content

Input

Struct Input 

Source
pub struct Input<'a> {
    pub cur: &'a str,
    pub width: usize,
    pub home: &'a str,
    pub newver: &'a str,
    pub only: &'a str,
    pub outdated: 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.

§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() -> Input<'a>

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

Auto Trait Implementations§

§

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

§

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

§

impl<'a> Send for Input<'a>

§

impl<'a> Sync for Input<'a>

§

impl<'a> Unpin for Input<'a>

§

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.