pub struct Value(pub Value);Expand description
Dynamic value for field access and condition evaluation.
Wraps serde_json::Value to provide type-safe field extraction and comparison operations used by flow control nodes.
Tuple Fields§
§0: ValueImplementations§
Source§impl Value
impl Value
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Create a value from JSON bytes.
Sourcepub fn get_field(&self, path: &str) -> Option<Value>
pub fn get_field(&self, path: &str) -> Option<Value>
Get a field by path (dot notation or JSONPath-like).
Supports:
- Simple field access: “field”
- Dot notation: “parent.child.value”
- JSONPath prefix: “$.parent.child” -> “parent.child”
Returns None if the field doesn’t exist.
Sourcepub fn get_string(&self, path: &str) -> Option<String>
pub fn get_string(&self, path: &str) -> Option<String>
Get a field as a string.
Sourcepub fn equals_str(&self, other: &str) -> bool
pub fn equals_str(&self, other: &str) -> bool
Check equality with a string value.
Sourcepub fn field_equals(&self, path: &str, value: &str) -> bool
pub fn field_equals(&self, path: &str, value: &str) -> bool
Check if a field equals a value (string comparison).
Sourcepub fn field_greater_than(&self, path: &str, threshold: f64) -> bool
pub fn field_greater_than(&self, path: &str, threshold: f64) -> bool
Check if a field is greater than a threshold (numeric comparison).
Sourcepub fn field_less_than(&self, path: &str, threshold: f64) -> bool
pub fn field_less_than(&self, path: &str, threshold: f64) -> bool
Check if a field is less than a threshold (numeric comparison).
Sourcepub fn field_matches(&self, path: &str, pattern: &str) -> bool
pub fn field_matches(&self, path: &str, pattern: &str) -> bool
Check if a field matches a regex pattern.
Sourcepub fn field_is_true(&self, path: &str) -> bool
pub fn field_is_true(&self, path: &str) -> bool
Check if a boolean field is true.
Sourcepub fn field_is_false(&self, path: &str) -> bool
pub fn field_is_false(&self, path: &str) -> bool
Check if a boolean field is false.
Sourcepub fn into_inner(self) -> JsonValue
pub fn into_inner(self) -> JsonValue
Convert into the inner serde_json::Value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
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
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.