pub enum ArgValue {
Null,
Bool(bool),
Int(i64),
Float(f64),
Str(String),
Array(Vec<ArgValue>),
Object(Vec<(String, ArgValue)>),
}Expand description
A JSON-shaped value: exactly the shapes an asset’s args object can hold. Kept
deliberately small so it maps one-to-one onto the engine’s accept path
(serde_json::from_value with #[serde(default)]), where an omitted field
falls back to its default.
Variants§
Null
A JSON null.
Bool(bool)
A boolean.
Int(i64)
An integer.
Float(f64)
A floating-point number.
Str(String)
A string.
Array(Vec<ArgValue>)
An array of values.
Object(Vec<(String, ArgValue)>)
An object, in insertion order (nested args reuse the same ordered shape).
Implementations§
Trait Implementations§
impl StructuralPartialEq for ArgValue
Auto Trait Implementations§
impl Freeze for ArgValue
impl RefUnwindSafe for ArgValue
impl Send for ArgValue
impl Sync for ArgValue
impl Unpin for ArgValue
impl UnsafeUnpin for ArgValue
impl UnwindSafe for ArgValue
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<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