Struct HistoryEntry
pub struct HistoryEntry {
pub id: HistoryEntryId,
pub author: HistoryAuthor,
pub entry_kind: EntryKind,
pub artifact_kind: ArtifactKind,
pub timestamp: SystemTime,
pub summary: String,
pub text_delta: Option<(usize, usize)>,
pub diff_payload: Option<Vec<u8>>,
pub redaction: Option<RedactionDisplay>,
pub context: Option<ActionContext>,
}Fields§
§id: HistoryEntryId§entry_kind: EntryKindDrives the row’s icon glyph and the [Revert] chip’s visibility
(see EntryKind::is_revertible).
artifact_kind: ArtifactKind§timestamp: SystemTime§summary: Stringe.g. “+12 -3 chars”, “Moved to Done”. Producer should keep it short — the row is ~40 px tall.
text_delta: Option<(usize, usize)>None means “not a text edit, or not countable” — never (0, 0),
because a group aggregating these must be able to tell “nothing
moved” from “we do not know”, and report an aggregate only when
every member reported one.
diff_payload: Option<Vec<u8>>Opaque bytes for the scrubber to re-derive the artifact’s state at
this tick; the widget never cracks them open. None when an entry
(Govern ops, pure metadata edits) has no per-entry payload.
redaction: Option<RedactionDisplay>None means “not redacted; render the summary as normal”.
context: Option<ActionContext>Semantic provenance carried by an action. Legacy/direct CRDT edits leave this empty and retain their structural diff summary.
Implementations§
§impl HistoryEntry
impl HistoryEntry
pub fn is_revertible(&self) -> bool
pub fn is_revertible(&self) -> bool
Whether this row represents a reversible document mutation. Durable effect receipts share the activity timeline but describe external work; reverting their metadata would not undo that work and is never offered.
pub fn is_genesis(&self) -> bool
pub fn is_genesis(&self) -> bool
Whether this row is the document’s genesis: the version it was created as. It stays restorable, but nobody made it and its time is not when anyone did, so it is shown without an author or a time and never offered as a recent change.
pub fn is_effect_receipt(&self) -> bool
pub fn is_effect_receipt(&self) -> bool
Whether this row is a durable effect receipt: external work recorded in the activity timeline rather than a document mutation.
Trait Implementations§
§impl Clone for HistoryEntry
impl Clone for HistoryEntry
§fn clone(&self) -> HistoryEntry
fn clone(&self) -> HistoryEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for HistoryEntry
impl Debug for HistoryEntry
§impl PartialEq for HistoryEntry
impl PartialEq for HistoryEntry
impl StructuralPartialEq for HistoryEntry
Auto Trait Implementations§
impl Freeze for HistoryEntry
impl RefUnwindSafe for HistoryEntry
impl Send for HistoryEntry
impl Sync for HistoryEntry
impl Unpin for HistoryEntry
impl UnsafeUnpin for HistoryEntry
impl UnwindSafe for HistoryEntry
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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