pub enum TimelineBlock {
Standalone {
id: EventId,
root: Option<ThreadPointer>,
},
Module {
events: Vec<EventId>,
has_gap: bool,
root: Option<ThreadPointer>,
},
}Expand description
Either one event on its own, or a chained module of contextually related
events (root-first newest-last when fully chained; see crate::Grouper).
Variants§
Standalone
Fields
root: Option<ThreadPointer>Terminal root pointer resolved for the event. None when the
event is itself a thread root; Some when the event is a reply
that could not be stitched into a chain (parent absent, leaf
taken, or max_module_size hit). Preserving the pointer lets
renderers flag the block as a partial-chain head rather than
mistaking the reply for a root.
Module
Fields
has_gap: boolTrue when an ancestor in the chain is missing from the local store
OR the lookback between adjacent events exceeded ModulePolicy ::max_lookback_gap_secs OR the chain’s resolved root pointer is
not the top event’s id.
root: Option<ThreadPointer>Terminal root pointer used for adjacent-module collapse. None
when the module’s top event is itself a thread root.
Implementations§
Trait Implementations§
Source§impl Clone for TimelineBlock
impl Clone for TimelineBlock
Source§fn clone(&self) -> TimelineBlock
fn clone(&self) -> TimelineBlock
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TimelineBlock
impl Debug for TimelineBlock
Source§impl<'de> Deserialize<'de> for TimelineBlock
impl<'de> Deserialize<'de> for TimelineBlock
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 TimelineBlock
Source§impl PartialEq for TimelineBlock
impl PartialEq for TimelineBlock
Source§fn eq(&self, other: &TimelineBlock) -> bool
fn eq(&self, other: &TimelineBlock) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for TimelineBlock
impl Serialize for TimelineBlock
impl StructuralPartialEq for TimelineBlock
Auto Trait Implementations§
impl Freeze for TimelineBlock
impl RefUnwindSafe for TimelineBlock
impl Send for TimelineBlock
impl Sync for TimelineBlock
impl Unpin for TimelineBlock
impl UnsafeUnpin for TimelineBlock
impl UnwindSafe for TimelineBlock
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.