pub struct SpawnerHandle {
pub session_id: String,
pub context_id: String,
pub delegation_id: String,
pub report_to: Option<CompletionAddress>,
}Expand description
The value injected into the child: a Spawner plus the delegation id the launcher minted.
Fields§
§session_id: String§context_id: String§delegation_id: String§report_to: Option<CompletionAddress>Implementations§
Source§impl SpawnerHandle
impl SpawnerHandle
Sourcepub fn for_delegation(spawner: &Spawner, delegation_id: String) -> Self
pub fn for_delegation(spawner: &Spawner, delegation_id: String) -> Self
The handle for one launch of spawner’s child.
Sourcepub fn to_env_value(&self) -> String
pub fn to_env_value(&self) -> String
The compact JSON written into SPAWNER_ENV.
A lineage-only handle carries the three keys that name the relationship and nothing that
could be read as an address; a reporting one adds url.
Sourcepub fn from_env() -> Result<Option<Self>, RuntimeError>
pub fn from_env() -> Result<Option<Self>, RuntimeError>
This process’s own handle, read from SPAWNER_ENV.
Ok(None) for a capsule nobody delegated — the variable absent, or blank. A variable that
is set to something else is an error and not an absence: a child that cannot read its
spawner cannot record which session spawned it or report to it, and running it anyway
would produce work whose provenance and outcome reach nobody.
Sourcepub fn parse(value: &str) -> Result<Self, RuntimeError>
pub fn parse(value: &str) -> Result<Self, RuntimeError>
Parse one Self::to_env_value string.
Trait Implementations§
Source§impl Clone for SpawnerHandle
impl Clone for SpawnerHandle
Source§impl Debug for SpawnerHandle
impl Debug for SpawnerHandle
impl Eq for SpawnerHandle
Source§impl PartialEq for SpawnerHandle
impl PartialEq for SpawnerHandle
impl StructuralPartialEq for SpawnerHandle
Auto Trait Implementations§
impl Freeze for SpawnerHandle
impl RefUnwindSafe for SpawnerHandle
impl Send for SpawnerHandle
impl Sync for SpawnerHandle
impl Unpin for SpawnerHandle
impl UnsafeUnpin for SpawnerHandle
impl UnwindSafe for SpawnerHandle
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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