pub enum BehaviorStatus {
Running,
Done(Result<(), BehaviorError>),
}Expand description
Whether an interpreter wants to be ticked again — and, when it does not, how it ended.
Liveness is one bit: Running or terminal
(Done). The terminal case carries a Result — Ok(()) for a
clean stop, Err for a fault the run could not recover from.
This is the interpreter’s scheduling status, not an application outcome. A
behavior does not return a value — it writes its outputs to store keys — so
the terminal Ok is (), never a payload. A run’s success / failure / errno
is likewise an application value on its status key, not here: one tick may
drive many runs, so a single return cannot speak for each. What the runtime
must act on is only liveness and, at termination, whether the run stopped
cleanly or faulted.
Variants§
Running
Not terminal: tick me again next step (a node graph; a tree still running).
Done(Result<(), BehaviorError>)
Terminal: I reached a terminal state and the runtime drops me. Ok(())
is a clean stop; Err(_) is a fault the run could not recover from — its
reason is surfaced (like an Err from tick)
but, unlike a transient Err, a run that ends Done(Err(_)) is dropped,
not retried.
Trait Implementations§
Source§impl Clone for BehaviorStatus
impl Clone for BehaviorStatus
Source§fn clone(&self) -> BehaviorStatus
fn clone(&self) -> BehaviorStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BehaviorStatus
impl Debug for BehaviorStatus
impl Eq for BehaviorStatus
Source§impl PartialEq for BehaviorStatus
impl PartialEq for BehaviorStatus
impl StructuralPartialEq for BehaviorStatus
Auto Trait Implementations§
impl Freeze for BehaviorStatus
impl RefUnwindSafe for BehaviorStatus
impl Send for BehaviorStatus
impl Sync for BehaviorStatus
impl Unpin for BehaviorStatus
impl UnsafeUnpin for BehaviorStatus
impl UnwindSafe for BehaviorStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.