Skip to main content

Outline

Struct Outline 

Source
pub struct Outline { /* private fields */ }
Expand description

A grouped history, with expansion and filtering, addressable by row.

Implementations§

Source§

impl Outline

Source

pub fn new(events: Vec<NormalizedEvent>, groups: Vec<Group>) -> Self

Source

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.

Source

pub fn groups(&self) -> &[Group]

Source

pub fn events(&self) -> &[NormalizedEvent]

Source

pub fn show_plumbing(&self) -> bool

Source

pub fn len(&self) -> usize

Total rows. Free: it is the last cumulative offset, not a count of anything.

Source

pub fn is_empty(&self) -> bool

Source

pub fn row_at(&self, row: usize) -> Option<Row>

What is on row row, without building the rows before it.

Source

pub fn slice(&self, first: usize, count: usize) -> Vec<Row>

The rows in [first, first + count). Only these are built.

Source

pub fn group(&self, index: usize) -> Option<&Group>

Source

pub fn event(&self, index: usize) -> Option<&NormalizedEvent>

Source

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.

Source

pub fn is_expanded(&self, group: usize) -> bool

Source

pub fn expand_all(&mut self)

Source

pub fn collapse_all(&mut self)

Source

pub fn set_show_plumbing(&mut self, show: bool)

Show or hide workflow-task groups.

Source

pub fn row_of_group(&self, group: usize) -> Option<usize>

Which row a group’s own line is on, if it is visible.

Source

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.

Source

pub fn prev_failure(&self, from: usize) -> Option<usize>

The previous failing group before from.

Auto Trait Implementations§

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, 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.