pub enum Variation {
Fixed,
Seeded(u64),
RoundRobin,
Random,
}Expand description
Controls how template alternatives are selected.
Fixed and RoundRobin are literal: they honour the contract exactly
(first alternative every time / strict rotation in registration order).
Seeded and Random additionally layer discourse-aware choose-best
scoring on top, so candidates that repeat recent words or flatten recent
sentence cadence are penalised.
Variants§
Fixed
Always pick the first registered template, every render.
Seeded(u64)
Deterministic hash-based selection. Same seed + key = same index. Further refined by discourse-aware choose-best scoring.
RoundRobin
Cycle through alternatives in registration order, strictly.
Random
Select randomly (non-deterministic). Layered with choose-best scoring.
Trait Implementations§
impl Copy for Variation
impl Eq for Variation
impl StructuralPartialEq for Variation
Auto Trait Implementations§
impl Freeze for Variation
impl RefUnwindSafe for Variation
impl Send for Variation
impl Sync for Variation
impl Unpin for Variation
impl UnsafeUnpin for Variation
impl UnwindSafe for Variation
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