pub struct ResourceTraceAppender { /* private fields */ }Expand description
A second, independent O_APPEND handle to the session’s trace.jsonl, used by the resource
plane, by the peer plane’s listener, and by the peer-handoff tools in the agent loop.
[TraceWriter] is &mut-owned by the agent loop and cannot be shared, and the motivating
case for a resource-plane event — a gateway reading a finished-but-alive capsule — happens
after session_end has already been written. So the plane gets its own handle rather than a
borrow of the loop’s, and every event is written at the moment of the request rather than
deferred to a task boundary: a denied read that only surfaced at the next task end would be a
record of the wrong thing at the wrong time.
Interleaving is safe because both writers emit exactly one complete line per write_all and
flush it, and O_APPEND makes each such write atomic against the other’s.
Implementations§
Auto Trait Implementations§
impl !Freeze for ResourceTraceAppender
impl !RefUnwindSafe for ResourceTraceAppender
impl Send for ResourceTraceAppender
impl Sync for ResourceTraceAppender
impl Unpin for ResourceTraceAppender
impl UnsafeUnpin for ResourceTraceAppender
impl UnwindSafe for ResourceTraceAppender
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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