pub struct Signal {
pub id: &'static str,
pub audience: Audience,
pub base: f64,
pub metric: fn(&EngineInputs) -> f64,
}Expand description
A registered nudge. metric extracts the raw pressure numerator m from
the inputs; base is the denominator b; the signal fires when
(m / b) * factor >= 1.
Fields§
§id: &'static strStable identifier (also the throttle-map key).
audience: AudienceWho the nudge is for.
base: f64The pressure denominator b (> 0).
metric: fn(&EngineInputs) -> f64Extract the raw pressure numerator m from the inputs.
Implementations§
Auto Trait Implementations§
impl Freeze for Signal
impl RefUnwindSafe for Signal
impl Send for Signal
impl Sync for Signal
impl Unpin for Signal
impl UnsafeUnpin for Signal
impl UnwindSafe for Signal
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