INNER CODE UNIT · Rust

default

nativeshell/nativeshell · nativeshell/src/codec/value/mod.rs:29

    fn default() -> Self {
        Value::Null
    }
}

macro_rules! impl_from {
    ($variant:path, $for_type:ty) => {
        impl From<$for_type> for Value {
            fn from(v: $for_type) -> Value {
                $variant(v.into())
            }
        }
    };
}

impl_from!(Value::Bool, bool);
impl_from!(Value::I64, i64);
impl_from!(Value::I64, u32);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…