pub struct LoopHandle {
pub loop_id: LoopId,
pub control: LoopControl,
pub health: LoopHealth,
pub completion: LoopCompletion,
pub output: Mutex<Option<Receiver<LoopOutputEvent>>>,
}Expand description
Live loop handle.
Fields§
§loop_id: LoopIdLoop identity.
control: LoopControlControl.
health: LoopHealthHealth counters.
completion: LoopCompletionCompletion.
output: Mutex<Option<Receiver<LoopOutputEvent>>>Output events (independent of Interpreter stream).
Prefer Self::take_output so callers do not hold a mutex across await
(Law 21). Direct locking remains for legacy unit tests.
Implementations§
Source§impl LoopHandle
impl LoopHandle
Sourcepub async fn take_output(&self) -> Receiver<LoopOutputEvent>
pub async fn take_output(&self) -> Receiver<LoopOutputEvent>
Take the output receiver once (Law 21: no guard held across await).
Auto Trait Implementations§
impl !Freeze for LoopHandle
impl !RefUnwindSafe for LoopHandle
impl !UnwindSafe for LoopHandle
impl Send for LoopHandle
impl Sync for LoopHandle
impl Unpin for LoopHandle
impl UnsafeUnpin for LoopHandle
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