pub struct Transition<S, O> {
pub state: S,
pub outputs: Vec<O>,
}Expand description
The result of one step, which is one of alchemy’s shared types. The result of one step: the next state and what to emit for it.
Fields§
§state: S§outputs: Vec<O>Implementations§
Source§impl<S, O> Transition<S, O>
impl<S, O> Transition<S, O>
pub fn new(state: S, outputs: Vec<O>) -> Transition<S, O>
Sourcepub fn stay(state: S) -> Transition<S, O>
pub fn stay(state: S) -> Transition<S, O>
A step that emits nothing.
Sourcepub fn emit(state: S, output: O) -> Transition<S, O>
pub fn emit(state: S, output: O) -> Transition<S, O>
A step that emits one item.
Trait Implementations§
Source§impl<S, O> Clone for Transition<S, O>
impl<S, O> Clone for Transition<S, O>
Source§fn clone(&self) -> Transition<S, O>
fn clone(&self) -> Transition<S, O>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S, O> Debug for Transition<S, O>
impl<S, O> Debug for Transition<S, O>
Source§impl<S, O> PartialEq for Transition<S, O>
impl<S, O> PartialEq for Transition<S, O>
impl<S, O> StructuralPartialEq for Transition<S, O>
Auto Trait Implementations§
impl<S, O> Freeze for Transition<S, O>
impl<S, O> RefUnwindSafe for Transition<S, O>
impl<S, O> Send for Transition<S, O>
impl<S, O> Sync for Transition<S, O>
impl<S, O> Unpin for Transition<S, O>
impl<S, O> UnsafeUnpin for Transition<S, O>
impl<S, O> UnwindSafe for Transition<S, O>
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