pub trait ChildHandle:
Send
+ Sync
+ Debug {
// Required methods
fn id(&self) -> &str;
fn status(&self) -> Status;
fn run_sync(&mut self, input: Value) -> Result<ChildResult, RunError>;
fn abort(&mut self);
fn is_finished(&self) -> bool;
}Expand description
Handle to a spawned child (synchronous).
Provides control over a child that was spawned via
ChildContext::spawn_child().
For async operations, see AsyncChildHandle.
§Example
ⓘ
let mut handle = ctx.spawn_child(config)?;
// Run the child (blocking)
let result = handle.run_sync(input)?;
// Check status
println!("Status: {:?}", handle.status());
// Abort if needed
handle.abort();Required Methods§
Sourcefn is_finished(&self) -> bool
fn is_finished(&self) -> bool
Returns true if the child has completed (success, error, or aborted).