pub struct DaemonEnvelope {
pub service: Option<String>,
pub op: String,
pub payload: Value,
pub origin_invocation_id: Option<String>,
}Expand description
A request sent to the daemon over the control socket.
Fields§
§service: Option<String>Target service name. None
(or "daemon") routes to the built-in daemon ops.
op: StringOperation name, interpreted by the target service (or the daemon).
payload: ValueOperation payload; null when the op takes no arguments.
origin_invocation_id: Option<String>Originating client’s request-log invocation_id, threaded across the
socket so daemon-side HTTP records correlate to the CLI/MCP invocation
that triggered them rather than the daemon’s own (#1198). Non-secret.
Absent from older clients; the daemon simply skips the correlation then.
Implementations§
Source§impl DaemonEnvelope
impl DaemonEnvelope
Sourcepub fn service(
name: impl Into<String>,
op: impl Into<String>,
payload: Value,
) -> Self
pub fn service( name: impl Into<String>, op: impl Into<String>, payload: Value, ) -> Self
Builds an envelope targeting a named service.
Sourcepub fn builtin(op: impl Into<String>) -> Self
pub fn builtin(op: impl Into<String>) -> Self
Builds an envelope targeting the built-in daemon ops.
Sourcepub fn with_origin(self, invocation_id: impl Into<String>) -> Self
pub fn with_origin(self, invocation_id: impl Into<String>) -> Self
Stamps the originating client’s request-log invocation_id on the
envelope so the daemon can correlate the requests it serves back to the
caller’s invocation (#1198).
Trait Implementations§
Source§impl Clone for DaemonEnvelope
impl Clone for DaemonEnvelope
Source§fn clone(&self) -> DaemonEnvelope
fn clone(&self) -> DaemonEnvelope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DaemonEnvelope
impl Debug for DaemonEnvelope
Source§impl<'de> Deserialize<'de> for DaemonEnvelope
impl<'de> Deserialize<'de> for DaemonEnvelope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for DaemonEnvelope
impl RefUnwindSafe for DaemonEnvelope
impl Send for DaemonEnvelope
impl Sync for DaemonEnvelope
impl Unpin for DaemonEnvelope
impl UnsafeUnpin for DaemonEnvelope
impl UnwindSafe for DaemonEnvelope
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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