pub struct DelegationOutcome {
pub delegation_id: String,
pub capsule_name: String,
pub capsule_version: String,
pub session_id: String,
pub status: DelegationStatus,
pub result_path: Option<String>,
pub workdir: String,
pub duration_ms: u64,
pub detail: Option<String>,
pub reported_by: Reporter,
pub delivered: bool,
pub delivery_error: Option<String>,
}Expand description
What a delegation left behind: the notification the parent receives, and the shape of
COMPLETION_FILE.
Carries no output. Self::result_path records where the child left its result for a reader
of the record; the parent’s runtime never opens it, and reads the result through the child
directories it holds instead ([result_block]).
Fields§
§delegation_id: StringThe id the parent’s launcher minted, injected into the child and echoed back here.
capsule_name: String§capsule_version: String§session_id: StringThe child’s own session, so its trace is findable.
status: DelegationStatus§result_path: Option<String>Absolute: out/result.txt in the child’s records directory for an agent capsule, or in its
work folder for a script capsule, which writes its own. Absent when the child wrote none —
a terminal path that failed without result text legitimately leaves no file.
workdir: StringThe child’s work folder, absolute. COMPLETION_FILE sits in the child’s records
directory.
duration_ms: u64§detail: Option<String>Present only for a crashed or terminated outcome: the exit status, and for a crash the
child’s bounded stderr tail. Capped at MAX_DETAIL_BYTES.
reported_by: Reporter§delivered: boolWhether the notification reached the parent’s door. false on a terminated outcome the
parent chose, which is never posted.
delivery_error: Option<String>Why delivery failed, when one was attempted and refused.
Implementations§
Source§impl DelegationOutcome
impl DelegationOutcome
Sourcepub fn message_text(&self) -> String
pub fn message_text(&self) -> String
The lines a runtime composes about the delegation: the delegation, the capsule by its bare
name, the outcome, the duration, the child’s work folder and, for a crash or a termination,
the detail. Never the child’s answer: this is what deliver_completion posts, and the
head of what the parent’s agent reads, which the parent’s runtime completes with
[result_block].
Trait Implementations§
Source§impl Clone for DelegationOutcome
impl Clone for DelegationOutcome
Source§impl Debug for DelegationOutcome
impl Debug for DelegationOutcome
Source§impl<'de> Deserialize<'de> for DelegationOutcome
impl<'de> Deserialize<'de> for DelegationOutcome
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 Forget for DelegationOutcome
impl Freeze for DelegationOutcome
impl Move for DelegationOutcome
impl RefUnwindSafe for DelegationOutcome
impl Send for DelegationOutcome
impl Sync for DelegationOutcome
impl Unpin for DelegationOutcome
impl UnsafeUnpin for DelegationOutcome
impl UnwindSafe for DelegationOutcome
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