Struct boomerang::builder::ReactionBuilderState
source · pub struct ReactionBuilderState<'a> { /* private fields */ }
Implementations§
source§impl<'a> ReactionBuilderState<'a>
impl<'a> ReactionBuilderState<'a>
pub fn new( name: &str, priority: usize, reactor_key: BuilderReactorKey, reaction_fn: Box<dyn ReactionFn>, env: &'a mut EnvBuilder ) -> Self
sourcepub fn with_trigger_action<T: PortData, Q>(
self,
trigger_key: TypedActionKey<T, Q>,
order: usize
) -> Self
pub fn with_trigger_action<T: PortData, Q>( self, trigger_key: TypedActionKey<T, Q>, order: usize ) -> Self
Indicate that this Reaction can be triggered by the given Action
sourcepub fn with_trigger_port<T: PortData>(
self,
port_key: TypedPortKey<T>,
order: usize
) -> Self
pub fn with_trigger_port<T: PortData>( self, port_key: TypedPortKey<T>, order: usize ) -> Self
Indicate that this Reaction can be triggered by the given Port
sourcepub fn with_schedulable_action<T: PortData, Q>(
self,
action_key: TypedActionKey<T, Q>,
order: usize
) -> Self
pub fn with_schedulable_action<T: PortData, Q>( self, action_key: TypedActionKey<T, Q>, order: usize ) -> Self
Indicate that this Reaction may schedule the given Action
sourcepub fn with_antidependency<T: PortData>(
self,
antidep_key: TypedPortKey<T>,
order: usize
) -> Self
pub fn with_antidependency<T: PortData>( self, antidep_key: TypedPortKey<T>, order: usize ) -> Self
Indicate that this Reaction may set the value of the given Port (uses keyword).
pub fn finish(self) -> Result<BuilderReactionKey, BuilderError>
Trait Implementations§
source§impl<'a> FindElements for ReactionBuilderState<'a>
impl<'a> FindElements for ReactionBuilderState<'a>
source§fn get_port_by_name(
&self,
port_name: &str
) -> Result<BuilderPortKey, BuilderError>
fn get_port_by_name( &self, port_name: &str ) -> Result<BuilderPortKey, BuilderError>
Find the PortKey with a given name within the parent Reactor
fn get_action_by_name( &self, action_name: &str ) -> Result<BuilderActionKey, BuilderError>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ReactionBuilderState<'a>
impl<'a> !Send for ReactionBuilderState<'a>
impl<'a> !Sync for ReactionBuilderState<'a>
impl<'a> Unpin for ReactionBuilderState<'a>
impl<'a> !UnwindSafe for ReactionBuilderState<'a>
Blanket Implementations§
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.