pub struct RuntimeExpression(/* private fields */);Expand description
Represents a runtime expression following the Serverless Workflow DSL ${...} syntax.
Runtime expressions are used throughout the specification to reference workflow data, context, and other dynamic values at runtime.
Implementations§
Source§impl RuntimeExpression
impl RuntimeExpression
Sourcepub fn normalized(expr: &str) -> Self
pub fn normalized(expr: &str) -> Self
Creates a RuntimeExpression and normalizes it (adds ${} if missing)
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Checks if the expression appears to be syntactically valid.
This performs basic structural validation (proper ${} enclosure
or bare expression form). Full jq syntax validation would require
a jq parser.
Sourcepub fn sanitize(&self) -> String
pub fn sanitize(&self) -> String
Returns the expression content without the ${} enclosure.
If the expression is not in strict form, returns it as-is.
Sourcepub fn normalize(&self) -> RuntimeExpression
pub fn normalize(&self) -> RuntimeExpression
Returns the expression in normalized form (with ${} enclosure).
Trait Implementations§
Source§impl AsRef<str> for RuntimeExpression
impl AsRef<str> for RuntimeExpression
Source§impl Clone for RuntimeExpression
impl Clone for RuntimeExpression
Source§fn clone(&self) -> RuntimeExpression
fn clone(&self) -> RuntimeExpression
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RuntimeExpression
impl Debug for RuntimeExpression
Source§impl Default for RuntimeExpression
impl Default for RuntimeExpression
Source§fn default() -> RuntimeExpression
fn default() -> RuntimeExpression
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RuntimeExpression
impl<'de> Deserialize<'de> for RuntimeExpression
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RuntimeExpression
impl Display for RuntimeExpression
Source§impl From<&str> for RuntimeExpression
impl From<&str> for RuntimeExpression
Source§impl From<String> for RuntimeExpression
impl From<String> for RuntimeExpression
Source§impl PartialEq for RuntimeExpression
impl PartialEq for RuntimeExpression
Source§fn eq(&self, other: &RuntimeExpression) -> bool
fn eq(&self, other: &RuntimeExpression) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RuntimeExpression
impl Serialize for RuntimeExpression
impl Eq for RuntimeExpression
impl StructuralPartialEq for RuntimeExpression
Auto Trait Implementations§
impl Freeze for RuntimeExpression
impl RefUnwindSafe for RuntimeExpression
impl Send for RuntimeExpression
impl Sync for RuntimeExpression
impl Unpin for RuntimeExpression
impl UnsafeUnpin for RuntimeExpression
impl UnwindSafe for RuntimeExpression
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