pub enum NargoValue {
Null,
Bool(bool),
Number(f64),
String(String),
Array(Vec<NargoValue>),
Object(HashMap<String, NargoValue>),
Signal(String),
Binary(Vec<u8>),
Raw(String),
Ref(String),
}Expand description
Nargo 值类型
Variants§
Null
Null 值
Bool(bool)
布尔值
Number(f64)
数字
String(String)
字符串
Array(Vec<NargoValue>)
数组
Object(HashMap<String, NargoValue>)
对象
Signal(String)
响应式信号引用
Binary(Vec<u8>)
二进制数据 (如 WASM)
Raw(String)
源码片段或表达式代码
Ref(String)
跨节点引用或 ID
Implementations§
Source§impl NargoValue
impl NargoValue
Source§impl NargoValue
impl NargoValue
Sourcepub fn is_json_compatible(&self) -> bool
pub fn is_json_compatible(&self) -> bool
判断值是否与 JSON 兼容
Trait Implementations§
Source§impl Clone for NargoValue
impl Clone for NargoValue
Source§fn clone(&self) -> NargoValue
fn clone(&self) -> NargoValue
Returns a duplicate of the value. Read more
1.0.0 · 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 NargoValue
impl Debug for NargoValue
Source§impl Default for NargoValue
impl Default for NargoValue
Source§fn default() -> NargoValue
fn default() -> NargoValue
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NargoValue
impl<'de> Deserialize<'de> for NargoValue
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 NargoValue
impl Display for NargoValue
Source§impl PartialEq for NargoValue
impl PartialEq for NargoValue
Source§impl Serialize for NargoValue
impl Serialize for NargoValue
impl StructuralPartialEq for NargoValue
Auto Trait Implementations§
impl Freeze for NargoValue
impl RefUnwindSafe for NargoValue
impl Send for NargoValue
impl Sync for NargoValue
impl Unpin for NargoValue
impl UnsafeUnpin for NargoValue
impl UnwindSafe for NargoValue
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