Struct ConnectionActivity
pub struct ConnectionActivity(/* private fields */);Expand description
Liveness token for one accepted RPC connection, shared by every task that connection started.
The listener’s client counter is decremented when the LAST clone is dropped, not when the connection task exits. A forced teardown aborts the connection task and the prompt tasks it owns, but an abort only schedules the drop of a task that may still be inside provider or tool cleanup. Each of those tasks holds its own clone from inside its spawned body, so the clone survives exactly as long as the task’s future does, including the nested turn task that runs the agent loop.
The daemon reads the same counter to decide when a replacement generation may be admitted, so “the count reached zero” means “no task from the retiring generation is still unwinding” rather than “the connection task has been aborted”.
Trait Implementations§
Source§impl Clone for ConnectionActivity
impl Clone for ConnectionActivity
Auto Trait Implementations§
impl Freeze for ConnectionActivity
impl RefUnwindSafe for ConnectionActivity
impl Send for ConnectionActivity
impl Sync for ConnectionActivity
impl Unpin for ConnectionActivity
impl UnsafeUnpin for ConnectionActivity
impl UnwindSafe for ConnectionActivity
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more