pub struct ModulePolicy {
pub max_module_size: u8,
pub max_lookback_gap_secs: u64,
pub max_ancestor_hops: u8,
pub collapse_adjacent_same_root: bool,
}Expand description
Tunables for crate::Grouper. Defaults mirror Twitter / X behaviour:
at most three messages per module, ancestor walk capped at two hops,
adjacent same-root modules merged.
Fields§
§max_module_size: u8Maximum events surfaced inside a single TimelineBlock::Module.
Excess is rendered as additional standalone or chained modules.
max_lookback_gap_secs: u64Time gap (seconds) between adjacent module events before the block
is marked has_gap = true. Defaults to 72h.
max_ancestor_hops: u8How many ancestor hops to walk when stitching a reply into its
parent chain. Address / External pointers terminate the walk
regardless of the remaining budget.
collapse_adjacent_same_root: boolWhether adjacent modules that share the same root pointer should be merged into one block (Twitter-style “this is the same thread”).
Trait Implementations§
Source§impl Clone for ModulePolicy
impl Clone for ModulePolicy
Source§fn clone(&self) -> ModulePolicy
fn clone(&self) -> ModulePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModulePolicy
impl Debug for ModulePolicy
Source§impl Default for ModulePolicy
impl Default for ModulePolicy
Source§impl<'de> Deserialize<'de> for ModulePolicy
impl<'de> Deserialize<'de> for ModulePolicy
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ModulePolicy
Source§impl PartialEq for ModulePolicy
impl PartialEq for ModulePolicy
Source§fn eq(&self, other: &ModulePolicy) -> bool
fn eq(&self, other: &ModulePolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ModulePolicy
impl Serialize for ModulePolicy
impl StructuralPartialEq for ModulePolicy
Auto Trait Implementations§
impl Freeze for ModulePolicy
impl RefUnwindSafe for ModulePolicy
impl Send for ModulePolicy
impl Sync for ModulePolicy
impl Unpin for ModulePolicy
impl UnsafeUnpin for ModulePolicy
impl UnwindSafe for ModulePolicy
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.