[][src]Struct boomerang::Reaction

pub struct Reaction<S> where
    S: Sched
{ pub name: &'static str, pub reactor: Box<RefCell<dyn FnMut(&mut S)>>, pub index: Index, pub chain_id: u64, pub triggers: Vec<(Rc<RefCell<dyn IsPresent>>, Vec<Rc<Trigger<S>>>)>, pub running: bool, pub local_deadline: Option<(Duration, Box<RefCell<dyn FnMut(&mut S) -> bool>>)>, }

Reaction activation record to push onto the reaction queue.

Fields

name: &'static strreactor: Box<RefCell<dyn FnMut(&mut S)>>

Reaction closure

index: Index

Inverse priority determined by dependency analysis.

chain_id: u64

Binary encoding of the branches that this reaction has upstream in the dependency graph.

triggers: Vec<(Rc<RefCell<dyn IsPresent>>, Vec<Rc<Trigger<S>>>)>

Vector of tuples per Output that are sensitive to this Reaction. Each output has a list of associated triggers

running: bool

Indicator that this reaction has already started executing.

local_deadline: Option<(Duration, Box<RefCell<dyn FnMut(&mut S) -> bool>>)>

Local deadline relative to the time stamp for invocation of the reaction. Local deadline violation handler.

Methods

impl<S> Reaction<S> where
    S: Sched
[src]

pub fn new(
    name: &'static str,
    reactor: Box<RefCell<dyn FnMut(&mut S)>>,
    index: Index,
    chain_id: u64,
    triggers: Vec<(Rc<RefCell<dyn IsPresent>>, Vec<Rc<Trigger<S>>>)>
) -> Self
[src]

Trait Implementations

impl<S> Debug for Reaction<S> where
    S: Sched
[src]

impl<S> Display for Reaction<S> where
    S: Sched
[src]

impl<S> Eq for Reaction<S> where
    S: Sched
[src]

impl<S> Ord for Reaction<S> where
    S: Sched
[src]

impl<S> PartialEq<Reaction<S>> for Reaction<S> where
    S: Sched
[src]

impl<S> PartialOrd<Reaction<S>> for Reaction<S> where
    S: Sched
[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for Reaction<S>

impl<S> !Send for Reaction<S>

impl<S> !Sync for Reaction<S>

impl<S> Unpin for Reaction<S>

impl<S> !UnwindSafe for Reaction<S>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.