pub struct SuccessEnvelope<'a, T: Serialize> {
pub schema_version: u32,
pub ok: bool,
pub command: &'a str,
pub data: T,
pub duration_ms: u64,
pub source_url: Option<&'a str>,
}Expand description
JSON success envelope for agents (schema_version, ok, command, data, duration_ms).
Typed wire shape — serializes directly without an intermediate serde_json::Value.
Optional fields use omit-on-None (skip_serializing_if), not JSON null.
Fields§
§schema_version: u32Envelope schema version.
ok: boolAlways true for success envelopes.
command: &'a strCommand name that produced this payload.
data: TCommand-specific typed data payload.
duration_ms: u64Wall-clock duration of the command in milliseconds.
source_url: Option<&'a str>Final source URL when the command fetched remote content.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for SuccessEnvelope<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for SuccessEnvelope<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for SuccessEnvelope<'a, T>where
T: Send,
impl<'a, T> Sync for SuccessEnvelope<'a, T>where
T: Sync,
impl<'a, T> Unpin for SuccessEnvelope<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for SuccessEnvelope<'a, T>where
T: UnsafeUnpin,
impl<'a, T> UnwindSafe for SuccessEnvelope<'a, T>where
T: UnwindSafe,
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
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>
Converts
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>
Converts
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