pub enum JsValue {
U32(u32),
I32(i32),
U64(u64),
I64(i64),
True,
False,
Null,
Undefined,
Vec(Vec<u8>),
String(String),
List(Vec<JsValue>),
Object(HashMap<String, JsValue>),
}
Variants
U32(u32)
I32(i32)
U64(u64)
I64(i64)
True
False
Null
Undefined
Vec(Vec<u8>)
String(String)
List(Vec<JsValue>)
Object(HashMap<String, JsValue>)
Implementations
sourceimpl JsValue
impl JsValue
pub fn str(value: &str) -> JsValue
pub fn to_snapshot(&self) -> MemoryBlock
pub fn try_get_u64(self) -> Result<u64, String>
pub fn try_get_u64_or_null(self) -> Result<Option<u64>, String>
pub fn try_get_string(self) -> Result<String, String>
pub fn try_get_u32(self) -> Result<u32, String>
pub fn try_get_bool(self) -> Result<bool, String>
pub fn try_get_list(self) -> Result<Vec<JsValue>, String>
pub fn try_get_buffer(self) -> Result<Vec<u8>, String>
pub fn to_decodelist(self) -> Result<JsValueListDecoder, String>
pub fn convert<T, F: FnOnce(JsValueListDecoder) -> Result<T, String>>(
self,
convert: F
) -> Result<T, String>
Trait Implementations
impl StructuralPartialEq for JsValue
Auto Trait Implementations
impl RefUnwindSafe for JsValue
impl Send for JsValue
impl Sync for JsValue
impl Unpin for JsValue
impl UnwindSafe for JsValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more