pub struct NodeIo<'a> { /* private fields */ }Expand description
What a node can do while it runs: report text and ask a person (in a streamed run), and keep its progress (in a checkpointed one).
Implementations§
Source§impl<'a> NodeIo<'a>
impl<'a> NodeIo<'a>
Sourcepub fn quiet(node: &'a str) -> Self
pub fn quiet(node: &'a str) -> Self
The view of node node in a plain run: its text goes nowhere, and
it cannot ask. Build one to run a node yourself.
Sourcepub fn streaming(
node: &'a str,
text: &'a (dyn Fn(&str) + Send + Sync),
question: &'a (dyn Fn(Question) + Send + Sync),
) -> Self
pub fn streaming( node: &'a str, text: &'a (dyn Fn(&str) + Send + Sync), question: &'a (dyn Fn(Question) + Send + Sync), ) -> Self
The view of node node in a streamed run: its text goes to text,
its questions to question.
Sourcepub fn run_state(&self) -> &RunState
pub fn run_state(&self) -> &RunState
The request-scoped state of the run the node is part of: what the
graph was started with, see RunState. Empty for a node run by hand.
Sourcepub fn is_streaming(&self) -> bool
pub fn is_streaming(&self) -> bool
Whether the run is streamed: text is reported and questions asked.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for NodeIo<'a>
impl<'a> !UnwindSafe for NodeIo<'a>
impl<'a> Forget for NodeIo<'a>
impl<'a> Freeze for NodeIo<'a>
impl<'a> Move for NodeIo<'a>
impl<'a> Send for NodeIo<'a>
impl<'a> Sync for NodeIo<'a>
impl<'a> Unpin for NodeIo<'a>
impl<'a> UnsafeUnpin for NodeIo<'a>
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