pub struct Row {
pub rev: Rev,
pub label: String,
pub touched: usize,
pub written: Option<Written>,
pub tags: Vec<String>,
}Expand description
One rev as a reader sees it. Owned, so a view can carry the rows away from the history they were read off.
Fields§
§rev: Rev§label: String§touched: usizeHow many entities the act named — blockworx log‘s count column.
The panel shows the entities’ scope instead, so this is the
dump’s alone.
written: Option<Written>What the manifest row behind this one records beyond the commit.
None for a scratch session.
What this rev is called, where tag rows named it — alphabetical, and empty for an untagged rev.
Implementations§
Source§impl Row
impl Row
fn kind_written(&self) -> Option<RowKind>
fn wall_time(&self) -> Option<WallTime>
Sourcepub fn kind_of(&self) -> Kind
pub fn kind_of(&self) -> Kind
What this rev did to its neighbours, without the rev it did it to. A session keeping no rows has only its commits, and a commit is an edit.
Sourcepub fn is_inverse(&self) -> bool
pub fn is_inverse(&self) -> bool
Whether this rev is an inverse rather than a design decision — rendered muted and italic in the panel so a reader scanning for when something changed can read past it. A session with no rows has only the label it wrote, which still says so.
Sourcepub fn undone(&self) -> Option<Rev>
pub fn undone(&self) -> Option<Rev>
Which rev this one took back, where the row says so — what the
panel’s Undo — <original> is titled from.
Sourcepub fn kind(&self) -> String
pub fn kind(&self) -> String
The row’s kind column: Self::kind_of and the rev it names.
Sourcepub fn scope_names(&self) -> &[String]
pub fn scope_names(&self) -> &[String]
The scope line: the blocks the act happened inside, outermost first, as its author saw them spelled. Empty at the document root and for a session that recorded no path.
Sourcepub fn initials(&self) -> String
pub fn initials(&self) -> String
The author’s initials, for the row’s avatar. Two at most, and a name with nothing in it shows nothing rather than a placeholder letter.
Sourcepub fn time(&self) -> String
pub fn time(&self) -> String
The clock time this rev was written, without its date: the day is in the group heading, so the row says only the time. Empty for a session that carried no clock.
fn time_in(&self, zone: &TimeZone) -> String
Sourcepub fn since(&self, now: WallTime) -> String
pub fn since(&self, now: WallTime) -> String
How long ago this was written, as a person would say it — “3 hours
ago”. The viewing pill’s half of the clock; the history row says the
time instead. Empty for a session that carried no clock, and
for a row whose stamp is in now’s future (a clock that went
backwards, or a container written on another machine).
Sourcepub fn full_when(&self) -> String
pub fn full_when(&self) -> String
The whole instant as a reader would say it — what the time hovers to and what the picked rev’s card shows in full.
fn full_when_in(&self, zone: &TimeZone) -> String
Sourcepub fn day(&self) -> Option<Day>
pub fn day(&self) -> Option<Day>
The day this rev was written. None for a session that carried no
clock — there is no day to group it under.
fn day_in(&self, zone: &TimeZone) -> Option<Day>
Sourcepub fn when(&self) -> String
pub fn when(&self) -> String
The wall time as a person reads it, in this machine’s own zone. Empty for a session that never carried one.
Sourcefn when_in(&self, zone: &TimeZone) -> String
fn when_in(&self, zone: &TimeZone) -> String
Self::when against a named zone — the seam a test pins so its
expected text does not depend on where the machine is.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Row
impl<'de> Deserialize<'de> for Row
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Row
impl StructuralPartialEq for Row
Auto Trait Implementations§
impl Freeze for Row
impl RefUnwindSafe for Row
impl Send for Row
impl Sync for Row
impl Unpin for Row
impl UnsafeUnpin for Row
impl UnwindSafe for Row
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more