pub struct Outline { /* private fields */ }Expand description
A grouped history, with expansion and filtering, addressable by row.
Implementations§
Source§impl Outline
impl Outline
pub fn new(events: Vec<NormalizedEvent>, groups: Vec<Group>) -> Self
Sourcepub fn replace(&mut self, events: Vec<NormalizedEvent>, groups: Vec<Group>)
pub fn replace(&mut self, events: Vec<NormalizedEvent>, groups: Vec<Group>)
Swap in a re-grouped history after another page arrived, keeping what the reader has set up.
History is append-only, so re-grouping the accumulated events yields the same groups in the same order plus new ones on the end, which is why expansion can be carried over by index. Rebuilding the outline from scratch on every page would silently fold shut whatever the reader had just opened.
pub fn groups(&self) -> &[Group]
pub fn events(&self) -> &[NormalizedEvent]
pub fn show_plumbing(&self) -> bool
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Total rows. Free: it is the last cumulative offset, not a count of anything.
pub fn is_empty(&self) -> bool
Sourcepub fn row_at(&self, row: usize) -> Option<Row>
pub fn row_at(&self, row: usize) -> Option<Row>
What is on row row, without building the rows before it.
Sourcepub fn slice(&self, first: usize, count: usize) -> Vec<Row>
pub fn slice(&self, first: usize, count: usize) -> Vec<Row>
The rows in [first, first + count). Only these are built.
pub fn group(&self, index: usize) -> Option<&Group>
pub fn event(&self, index: usize) -> Option<&NormalizedEvent>
Sourcepub fn toggle(&mut self, group: usize) -> Option<usize>
pub fn toggle(&mut self, group: usize) -> Option<usize>
Fold a group open or shut. Returns the row the group’s own line now sits on, so a caller can keep the cursor on it.
pub fn is_expanded(&self, group: usize) -> bool
pub fn expand_all(&mut self)
pub fn collapse_all(&mut self)
Sourcepub fn set_show_plumbing(&mut self, show: bool)
pub fn set_show_plumbing(&mut self, show: bool)
Show or hide workflow-task groups.
Sourcepub fn row_of_group(&self, group: usize) -> Option<usize>
pub fn row_of_group(&self, group: usize) -> Option<usize>
Which row a group’s own line is on, if it is visible.
Sourcepub fn next_failure(&self, from: usize) -> Option<usize>
pub fn next_failure(&self, from: usize) -> Option<usize>
The next group at or after from whose outcome is a failure, ]f, and what the
minimap points at. On a long history “where did it go wrong” is the whole question,
and scrolling to find out does not scale.
Sourcepub fn prev_failure(&self, from: usize) -> Option<usize>
pub fn prev_failure(&self, from: usize) -> Option<usize>
The previous failing group before from.