Trait bpxe::flow_node::FlowNode [−][src]
Flow node
Flow node type should also implement [futures::stream::Stream
] with Item
set to Action
.
Required methods
fn set_state(&mut self, state: State) -> Result<(), StateError>
[src]
Sets durable state
If the state variant is incorect, StateError
error should be returned.
fn get_state(&mut self) -> State
[src]
Gets durable state
The reason why it's mutable is that in some cases some activites might want to change their data or simply get mutable access to it during state retrieval
fn element(&self) -> Box<dyn FlowNodeType>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
Returns a flow element
Provided methods
fn set_process(&mut self, process: Handle)
[src]
Sets process handle
This allows flow nodes to access the process they are running in.
Default implementation does nothing.
fn sequence_flow(
&mut self,
outgoing: OutgoingIndex,
sequence_flow: &SequenceFlow,
condition_result: bool
)
[src]
&mut self,
outgoing: OutgoingIndex,
sequence_flow: &SequenceFlow,
condition_result: bool
)
Reports outgoing sequence flow processing
If condition was not present or it returned a truthful result, condition_result
will be set to true
, otherwise it will be zero.
This allows flow nodes to make further decisions after each sequence flow processing. Flow node will be polled after this.
Default implementation does nothing.
fn handle_outgoing_action(
&mut self,
index: OutgoingIndex,
action: Option<Action>
) -> Option<Option<Action>>
[src]
&mut self,
index: OutgoingIndex,
action: Option<Action>
) -> Option<Option<Action>>
Maps outgoing node's action to a new action (or inaction)
This is useful for nodes with more complex processing (for example, event-based gateway) that need to handle the result action of the outgoing node.
Returning None
will mean that the action has to be dropped, returning Some(action)
will
replace the original action with the returned one in the flow.
Default implementation does nothing (returns the same action)
fn incoming(&mut self, index: IncomingIndex)
[src]
Reports incoming sequence flow
Default implementation does nothing.
fn tokens(&mut self, count: usize)
[src]
Reports token count at ingress.
Useful for complex flow node behaviours where it needs to know how many outstanding tokens there are.
Default implementation does nothing.
Implementors
impl FlowNode for Task
[src]
fn set_state(&mut self, state: State) -> Result<(), StateError>
[src]
fn get_state(&mut self) -> State
[src]
fn element(&self) -> Box<dyn FlowNodeType>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
fn set_process(&mut self, process: Handle)
[src]
impl FlowNode for EndEvent
[src]
fn set_state(&mut self, state: State) -> Result<(), StateError>
[src]
fn get_state(&mut self) -> State
[src]
fn element(&self) -> Box<dyn FlowNodeType>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
fn incoming(&mut self, _index: IncomingIndex)
[src]
fn set_process(&mut self, process: Handle)
[src]
impl FlowNode for IntermediateCatchEvent
[src]
fn set_state(&mut self, state: State) -> Result<(), StateError>
[src]
fn get_state(&mut self) -> State
[src]
fn set_process(&mut self, process: Handle)
[src]
fn element(&self) -> Box<dyn FlowNodeType>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
fn incoming(&mut self, _index: IncomingIndex)
[src]
impl FlowNode for IntermediateThrowEvent
[src]
fn set_state(&mut self, state: State) -> Result<(), StateError>
[src]
fn get_state(&mut self) -> State
[src]
fn element(&self) -> Box<dyn FlowNodeType>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
fn incoming(&mut self, _index: IncomingIndex)
[src]
fn set_process(&mut self, process: Handle)
[src]
impl FlowNode for StartEvent
[src]
fn set_state(&mut self, state: State) -> Result<(), StateError>
[src]
fn get_state(&mut self) -> State
[src]
fn element(&self) -> Box<dyn FlowNodeType>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
fn set_process(&mut self, process: Handle)
[src]
impl FlowNode for bpxe::gateway::event_based::Gateway
[src]
fn set_state(&mut self, state: State) -> Result<(), StateError>
[src]
fn set_process(&mut self, process: Handle)
[src]
fn get_state(&mut self) -> State
[src]
fn element(&self) -> Box<dyn FlowNodeType>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
fn incoming(&mut self, _index: IncomingIndex)
[src]
fn handle_outgoing_action(
&mut self,
_index: OutgoingIndex,
action: Option<Action>
) -> Option<Option<Action>>
[src]
&mut self,
_index: OutgoingIndex,
action: Option<Action>
) -> Option<Option<Action>>
impl FlowNode for bpxe::gateway::exclusive::Gateway
[src]
fn set_state(&mut self, state: State) -> Result<(), StateError>
[src]
fn set_process(&mut self, process: Handle)
[src]
fn get_state(&mut self) -> State
[src]
fn element(&self) -> Box<dyn FlowNodeType>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
fn incoming(&mut self, _index: IncomingIndex)
[src]
fn sequence_flow(
&mut self,
outgoing: OutgoingIndex,
sequence_flow: &SequenceFlow,
condition_result: bool
)
[src]
&mut self,
outgoing: OutgoingIndex,
sequence_flow: &SequenceFlow,
condition_result: bool
)
impl FlowNode for bpxe::gateway::inclusive::Gateway
[src]
fn set_state(&mut self, state: State) -> Result<(), StateError>
[src]
fn set_process(&mut self, process: Handle)
[src]
fn get_state(&mut self) -> State
[src]
fn element(&self) -> Box<dyn FlowNodeType>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
fn incoming(&mut self, _index: IncomingIndex)
[src]
fn sequence_flow(
&mut self,
output: OutgoingIndex,
sequence_flow: &SequenceFlow,
condition_result: bool
)
[src]
&mut self,
output: OutgoingIndex,
sequence_flow: &SequenceFlow,
condition_result: bool
)
fn tokens(&mut self, count: usize)
[src]
impl FlowNode for bpxe::gateway::parallel::Gateway
[src]
fn set_state(&mut self, state: State) -> Result<(), StateError>
[src]
fn get_state(&mut self) -> State
[src]
fn element(&self) -> Box<dyn FlowNodeType>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
fn incoming(&mut self, index: IncomingIndex)
[src]
impl<T, E, F> FlowNode for ActivityContainer<T, E, F> where
T: Activity + 'static,
E: ActivityType + Clone + Unpin,
F: ParameterizedFactory<Item = T, Parameter = E> + Send + Clone + Unpin + 'static,
[src]
T: Activity + 'static,
E: ActivityType + Clone + Unpin,
F: ParameterizedFactory<Item = T, Parameter = E> + Send + Clone + Unpin + 'static,
fn set_state(&mut self, state: State) -> Result<(), StateError>
[src]
fn get_state(&mut self) -> State
[src]
fn set_process(&mut self, process: Handle)
[src]
fn element(&self) -> Box<dyn FlowNodeType>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
fn sequence_flow(
&mut self,
outgoing: OutgoingIndex,
sequence_flow: &SequenceFlow,
condition_result: bool
)
[src]
&mut self,
outgoing: OutgoingIndex,
sequence_flow: &SequenceFlow,
condition_result: bool
)
fn handle_outgoing_action(
&mut self,
index: OutgoingIndex,
action: Option<Action>
) -> Option<Option<Action>>
[src]
&mut self,
index: OutgoingIndex,
action: Option<Action>
) -> Option<Option<Action>>