Enum mpack::Value
[−]
[src]
pub enum Value { Nil, Boolean(bool), Uint8(u8), Uint16(u16), Uint32(u32), Uint64(u64), Int8(i8), Int16(i16), Int32(i32), Int64(i64), Float32(f32), Float64(f64), String(String), Binary(Vec<u8>), Array(Vec<Value>), Map(ValueMap), Extended(i8, Vec<u8>), }
A value that can be sent by msgpack
.
Variants
Nil
Boolean(bool)
Uint8(u8)
Uint16(u16)
Uint32(u32)
Uint64(u64)
Int8(i8)
Int16(i16)
Int32(i32)
Int64(i64)
Float32(f32)
Float64(f64)
String(String)
Binary(Vec<u8>)
Array(Vec<Value>)
Map(ValueMap)
Extended(i8, Vec<u8>)
Methods
impl Value
[src]
fn is_nil(&self) -> bool
fn bool(self) -> Result<bool, TypeError>
fn int(self) -> Result<i64, TypeError>
fn uint(self) -> Result<u64, TypeError>
fn float(self) -> Result<f64, TypeError>
fn string(self) -> Result<String, TypeError>
fn binary(self) -> Result<Vec<u8>, TypeError>
fn array(self) -> Result<Vec<Value>, TypeError>
fn map(self) -> Result<ValueMap, TypeError>
fn extended_type(&self) -> Option<i8>
fn extended_data(self) -> Option<Vec<u8>>
fn extended<T>(self) -> Result<T, TypeError>
Trait Implementations
impl Clone for Value
[src]
fn clone(&self) -> Value
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Value
[src]
fn eq(&self, __arg_0: &Value) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Value) -> bool
This method tests for !=
.