pub struct Subagent {
pub node: NodeId,
/* private fields */
}Expand description
A handle to a running subagent process and the down side of its control channel. Upward messages arrive on the reactor’s merged channel, not here.
Fields§
§node: NodeIdImplementations§
Source§impl Subagent
impl Subagent
pub fn pid(&self) -> i32
Sourcepub fn join_reader(&mut self)
pub fn join_reader(&mut self)
Wait for the stdout reader to finish (bounded: the pipe has EOF’d once the child is reapable). After this, every frame the child ever wrote has been forwarded.
pub fn pgid(&self) -> i32
Sourcepub fn send(&mut self, msg: &ControlMsg) -> Result<()>
pub fn send(&mut self, msg: &ControlMsg) -> Result<()>
Send a control message down (Ping / Cancel / Inject).
Sourcepub fn mark_reaped(&mut self)
pub fn mark_reaped(&mut self)
Mark that the reactor already reaped this child (via waitpid(-1)), so
teardown won’t signal a possibly-reused pid.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Subagent
impl !UnwindSafe for Subagent
impl Freeze for Subagent
impl Send for Subagent
impl Sync for Subagent
impl Unpin for Subagent
impl UnsafeUnpin for Subagent
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