pub enum Salience {
Low,
Medium,
High,
}Expand description
Salience level of an event — how much detail/emphasis it deserves.
Templates can be registered for specific salience levels, and the engine selects the appropriate level based on event magnitude.
Variants§
Low
Minor changes — single-consumer or no-impact. Brief, often parenthetical.
Medium
Standard changes — the default verbosity level.
High
Major changes — high impact, deserves elaboration.
Implementations§
Source§impl Salience
impl Salience
Sourcepub fn from_context(ctx: &Context, thresholds: SalienceThresholds) -> Self
pub fn from_context(ctx: &Context, thresholds: SalienceThresholds) -> Self
Derive salience from a rendering context.
Order of precedence:
- Explicit
saliencekey in context (with value “low”/“medium”/“high”) consumer_countmapped through thresholds- Default (Medium)
Trait Implementations§
Source§impl Ord for Salience
impl Ord for Salience
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Salience
impl PartialOrd for Salience
impl Copy for Salience
impl Eq for Salience
impl StructuralPartialEq for Salience
Auto Trait Implementations§
impl Freeze for Salience
impl RefUnwindSafe for Salience
impl Send for Salience
impl Sync for Salience
impl Unpin for Salience
impl UnsafeUnpin for Salience
impl UnwindSafe for Salience
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