pub struct ExecRun { /* private fields */ }Expand description
A running muse exec --json invocation.
Implementations§
Source§impl ExecRun
impl ExecRun
Sourcepub async fn spawn(builder: &MuseExecBuilder) -> Result<Self>
pub async fn spawn(builder: &MuseExecBuilder) -> Result<Self>
Spawn a run from a builder.
Sourcepub async fn next_record(&mut self) -> Result<Option<MuseRecord>>
pub async fn next_record(&mut self) -> Result<Option<MuseRecord>>
Next journal record, or None at end of stream.
Sourcepub async fn wait_terminal<F>(self, on_record: F) -> Result<RunTerminal>where
F: FnMut(&MuseRecord),
pub async fn wait_terminal<F>(self, on_record: F) -> Result<RunTerminal>where
F: FnMut(&MuseRecord),
Consume records until the run reaches a terminal state, invoking
on_record for each record seen (including the terminal one), and
return the terminal payload.
If the stream ends without a run.terminal.* record, the child’s
exit code and collected stderr are folded into the error.
Auto Trait Implementations§
impl !RefUnwindSafe for ExecRun
impl !UnwindSafe for ExecRun
impl Freeze for ExecRun
impl Send for ExecRun
impl Sync for ExecRun
impl Unpin for ExecRun
impl UnsafeUnpin for ExecRun
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