pub struct Store { /* private fields */ }Expand description
The records of one terminal. See the crate docs.
Implementations§
Source§impl Store
impl Store
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
A store holding at most capacity records, clamped to 64..=256
(terminals MAY choose a lower limit but MUST support at least 64).
Sourcepub fn set_drop_idle_on_lifetime_events(&mut self, on: bool)
pub fn set_drop_idle_on_lifetime_events(&mut self, on: bool)
Also drop idle records on process exit and new prompts (the spec
allows either). Off by default.
Sourcepub fn get(&self, id: Option<&str>) -> Option<&Record>
pub fn get(&self, id: Option<&str>) -> Option<&Record>
The record for id (None is the root record).
Sourcepub fn iter(&self) -> impl Iterator<Item = (Option<&str>, &Record)>
pub fn iter(&self) -> impl Iterator<Item = (Option<&str>, &Record)>
All records, ordered by id with the root first.
Sourcepub fn effective_app(&self, id: Option<&str>) -> Option<&str>
pub fn effective_app(&self, id: Option<&str>) -> Option<&str>
The app of the record, or of its nearest ancestor record that has
one. Ancestors do not need to exist. None if no record on the path
carries an app.
Sourcepub fn apply(&mut self, message: &Message<'_>) -> Vec<Change>
pub fn apply(&mut self, message: &Message<'_>) -> Vec<Change>
Applies one decoded message. Feature-detection messages change nothing.
Sourcepub fn set(&mut self, report: &Report<'_>) -> Vec<Change>
pub fn set(&mut self, report: &Report<'_>) -> Vec<Change>
Replaces the addressed record with report.
Sourcepub fn clear(&mut self, id: Option<&str>) -> Vec<Change>
pub fn clear(&mut self, id: Option<&str>) -> Vec<Change>
Removes the record id and every record beneath it, or every record
when id is None.
Sourcepub fn process_exited(&mut self) -> Vec<Change>
pub fn process_exited(&mut self) -> Vec<Change>
The process attached to the terminal exited: drops working and
blocked records (and idle ones if so configured).
Sourcepub fn prompt_started(&mut self) -> Vec<Change>
pub fn prompt_started(&mut self) -> Vec<Change>
A new shell prompt began (OSC 133 A): same effect as
process_exited.