pub struct StateFnNode<F>(/* private fields */);Expand description
A node made of an async function that reads the run’s state; see
node_fn_with_state.
Trait Implementations§
Source§impl<F, Fut> Node for StateFnNode<F>where
F: Fn(String, RunState) -> Fut + WasmCompatSend + WasmCompatSync,
Fut: Future<Output = Result<String, NodeError>> + WasmCompatSend + 'static,
impl<F, Fut> Node for StateFnNode<F>where
F: Fn(String, RunState) -> Fut + WasmCompatSend + WasmCompatSync,
Fut: Future<Output = Result<String, NodeError>> + WasmCompatSend + 'static,
Source§fn run<'a>(
&'a self,
input: String,
io: &'a NodeIo<'a>,
) -> WasmBoxedFuture<'a, Result<NodeOutput, NodeError>>
fn run<'a>( &'a self, input: String, io: &'a NodeIo<'a>, ) -> WasmBoxedFuture<'a, Result<NodeOutput, NodeError>>
Run the step on
input. Through io it can report the text it
writes and ask a person, when the graph run is
streamed.Auto Trait Implementations§
impl<F> Forget for StateFnNode<F>
impl<F> Freeze for StateFnNode<F>where
F: Freeze,
impl<F> Move for StateFnNode<F>
impl<F> RefUnwindSafe for StateFnNode<F>where
F: RefUnwindSafe,
impl<F> Send for StateFnNode<F>where
F: Send,
impl<F> Sync for StateFnNode<F>where
F: Sync,
impl<F> Unpin for StateFnNode<F>where
F: Unpin,
impl<F> UnsafeUnpin for StateFnNode<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for StateFnNode<F>where
F: UnwindSafe,
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