pub struct Reaction<C = bool> {
pub actuator: Option<C>,
pub alert: Option<Alert>,
}Expand description
The outcome of evaluating one reading against a policy.
A Controller issues an on/off command, so a reaction is Reaction<bool> by
default; a policy of your own issues whatever its actuator takes.
Fields§
§actuator: Option<C>The actuator setting this reading calls for, if the policy drives one.
For a controller, Some(true) switches the output on, Some(false) switches
it off, and None means the profile observes without driving an output.
alert: Option<Alert>An alert, if the reading crossed a threshold; None otherwise.
Trait Implementations§
impl<C: Copy> Copy for Reaction<C>
impl<C: PartialEq> StructuralPartialEq for Reaction<C>
Auto Trait Implementations§
impl<C> Freeze for Reaction<C>where
C: Freeze,
impl<C> RefUnwindSafe for Reaction<C>where
C: RefUnwindSafe,
impl<C> Send for Reaction<C>where
C: Send,
impl<C> Sync for Reaction<C>where
C: Sync,
impl<C> Unpin for Reaction<C>where
C: Unpin,
impl<C> UnsafeUnpin for Reaction<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for Reaction<C>where
C: UnwindSafe,
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