pub enum RunValue {
Text(String),
Number(f64),
Bool(bool),
Array(Vec<RunValue>),
Agent(String),
Session(SessionHandle),
Secret(String),
}Expand description
A value on its way from one pin to another.
Distinct from openquiver_graph::Value, which is only ever a literal written
in a file. This one also carries the handles a run produces, and every one of
them has to survive being written to the journal and read back — which is why
a session appears here as its handle and never as the object.
Variants§
Text(String)
Number(f64)
Bool(bool)
Array(Vec<RunValue>)
Agent(String)
A connected agent, by the name it has in the project manifest.
Session(SessionHandle)
Secret(String)
The name of a secret, never its value.
Resolution happens at the point of use, so a secret never reaches the journal — and the journal is a file a colleague can be handed.
Implementations§
Source§impl RunValue
impl RunValue
Sourcepub fn as_text(&self) -> Option<String>
pub fn as_text(&self) -> Option<String>
How this value reads on a Text pin.
These are the conversions openquiver_compile::accepts lets through into
Text, for every type this milestone can put on a wire. A value the
compiler allowed and the runtime cannot render is a graph that passes
check and dies mid-run, so the two have to be read together whenever
either changes.
accepts also passes Wildcard, which has no rendering because it has
no resolved type yet. Nothing produces one — wildcard resolution is not
built — and when it is, resolution has to happen before this point.
pub fn as_bool(&self) -> Option<bool>
pub fn as_agent(&self) -> Option<&str>
pub fn as_session(&self) -> Option<&SessionHandle>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunValue
impl<'de> Deserialize<'de> for RunValue
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>,
impl StructuralPartialEq for RunValue
Auto Trait Implementations§
impl Freeze for RunValue
impl RefUnwindSafe for RunValue
impl Send for RunValue
impl Sync for RunValue
impl Unpin for RunValue
impl UnsafeUnpin for RunValue
impl UnwindSafe for RunValue
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