Enum stdweb::Value
[−]
[src]
pub enum Value { Undefined, Null, Bool(bool), Number(Number), String(String), Array(Vec<Value>), Object(BTreeMap<String, Value>), Reference(Reference), }
A type representing a JavaScript value.
This type implements a rich set of conversions from and into standard Rust types, for example:
let v1: Value = "Hello world!".into(); let v2: Value = true.into(); let v3: Value = vec![ 1, 2, 3 ].into(); let v4: Value = Null.into(); let v5: Value = 123_u64.try_into().unwrap(); let v1_r: String = v1.try_into().unwrap(); let v2_r: bool = v2.try_into().unwrap(); let v3_r: Vec< i32 > = v3.try_into().unwrap(); let v4_r: Option< String > = v4.try_into().unwrap(); // Will be `None`. let v5_r: u64 = v5.try_into().unwrap();
Variants
Undefined
Null
Bool(bool)
Number(Number)
String(String)
Array(Vec<Value>)
Object(BTreeMap<String, Value>)
Reference(Reference)
Methods
impl Value
[src]
fn is_reference(&self) -> bool
Checks whenever the Value is of the Reference variant.
fn as_reference(&self) -> Option<&Reference>
Gets a reference to the Reference inside this Value
.
fn into_reference(self) -> Option<Reference>
Returns the Reference inside this Value
.
unsafe fn into_reference_unchecked<T: FromReferenceUnchecked>(self) -> Option<T>
Converts a Reference inside this Value
into
the given type T
; doesn't check whenever the reference is really of type T
.
In cases where the value is not a Reference
a None
is returned.
fn into_string(self) -> Option<String>
Returns the String
inside this Value
.
fn as_str(&self) -> Option<&str>
Returns a borrow of the string inside this Value
.
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 !=
.
impl Debug for Value
[src]
impl AsRef<Value> for Value
[src]
fn as_ref(&self) -> &Self
Performs the conversion.
impl From<Undefined> for Value
[src]
impl<'a> From<&'a Undefined> for Value
[src]
impl<'a> From<&'a mut Undefined> for Value
[src]
impl From<Null> for Value
[src]
impl<'a> From<&'a Null> for Value
[src]
impl<'a> From<&'a mut Null> for Value
[src]
impl From<bool> for Value
[src]
impl<'a> From<&'a bool> for Value
[src]
impl<'a> From<&'a mut bool> for Value
[src]
impl<'a> From<&'a str> for Value
[src]
impl<'a> From<&'a mut str> for Value
[src]
impl From<String> for Value
[src]
impl<'a> From<&'a String> for Value
[src]
impl<'a> From<&'a mut String> for Value
[src]
impl From<char> for Value
[src]
impl<'a> From<&'a char> for Value
[src]
impl<'a> From<&'a mut char> for Value
[src]
impl<T: Into<Value>> From<Vec<T>> for Value
[src]
impl<'a, T> From<&'a Vec<T>> for Value where
&'a T: Into<Value>,
[src]
&'a T: Into<Value>,
impl<'a, T> From<&'a mut Vec<T>> for Value where
&'a T: Into<Value>,
[src]
&'a T: Into<Value>,
impl<'a, T> From<&'a [T]> for Value where
&'a T: Into<Value>,
[src]
&'a T: Into<Value>,
impl<'a, T> From<&'a mut [T]> for Value where
&'a T: Into<Value>,
[src]
&'a T: Into<Value>,
impl<K: Into<String>, V: Into<Value>> From<BTreeMap<K, V>> for Value
[src]
impl<'a, K, V> From<&'a BTreeMap<K, V>> for Value where
&'a K: Into<String>,
&'a V: Into<Value>,
[src]
&'a K: Into<String>,
&'a V: Into<Value>,
impl<'a, K, V> From<&'a mut BTreeMap<K, V>> for Value where
&'a K: Into<String>,
&'a V: Into<Value>,
[src]
&'a K: Into<String>,
&'a V: Into<Value>,
impl<K: Into<String> + Hash + Eq, V: Into<Value>> From<HashMap<K, V>> for Value
[src]
impl<'a, K: Hash + Eq, V> From<&'a HashMap<K, V>> for Value where
&'a K: Into<String>,
&'a V: Into<Value>,
[src]
&'a K: Into<String>,
&'a V: Into<Value>,
impl<'a, K: Hash + Eq, V> From<&'a mut HashMap<K, V>> for Value where
&'a K: Into<String>,
&'a V: Into<Value>,
[src]
&'a K: Into<String>,
&'a V: Into<Value>,
impl From<Reference> for Value
[src]
impl<'a> From<&'a Reference> for Value
[src]
impl<'a> From<&'a mut Reference> for Value
[src]
impl From<i8> for Value
[src]
impl<'a> From<&'a i8> for Value
[src]
impl<'a> From<&'a mut i8> for Value
[src]
impl TryFrom<i8> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: i8) -> Result<Self, Self::Error>
Performs the conversion.
impl From<i16> for Value
[src]
impl<'a> From<&'a i16> for Value
[src]
impl<'a> From<&'a mut i16> for Value
[src]
impl TryFrom<i16> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: i16) -> Result<Self, Self::Error>
Performs the conversion.
impl From<i32> for Value
[src]
impl<'a> From<&'a i32> for Value
[src]
impl<'a> From<&'a mut i32> for Value
[src]
impl TryFrom<i32> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: i32) -> Result<Self, Self::Error>
Performs the conversion.
impl From<u8> for Value
[src]
impl<'a> From<&'a u8> for Value
[src]
impl<'a> From<&'a mut u8> for Value
[src]
impl TryFrom<u8> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: u8) -> Result<Self, Self::Error>
Performs the conversion.
impl From<u16> for Value
[src]
impl<'a> From<&'a u16> for Value
[src]
impl<'a> From<&'a mut u16> for Value
[src]
impl TryFrom<u16> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: u16) -> Result<Self, Self::Error>
Performs the conversion.
impl From<u32> for Value
[src]
impl<'a> From<&'a u32> for Value
[src]
impl<'a> From<&'a mut u32> for Value
[src]
impl TryFrom<u32> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: u32) -> Result<Self, Self::Error>
Performs the conversion.
impl From<f32> for Value
[src]
impl<'a> From<&'a f32> for Value
[src]
impl<'a> From<&'a mut f32> for Value
[src]
impl TryFrom<f32> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: f32) -> Result<Self, Self::Error>
Performs the conversion.
impl From<f64> for Value
[src]
impl<'a> From<&'a f64> for Value
[src]
impl<'a> From<&'a mut f64> for Value
[src]
impl TryFrom<f64> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: f64) -> Result<Self, Self::Error>
Performs the conversion.
impl TryFrom<Undefined> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: Undefined) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a> TryFrom<&'a Undefined> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a Undefined) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a> TryFrom<&'a mut Undefined> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a mut Undefined) -> Result<Self, Self::Error>
Performs the conversion.
impl TryFrom<Null> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: Null) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a> TryFrom<&'a Null> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a Null) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a> TryFrom<&'a mut Null> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a mut Null) -> Result<Self, Self::Error>
Performs the conversion.
impl TryFrom<bool> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: bool) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a> TryFrom<&'a bool> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a bool) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a> TryFrom<&'a mut bool> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a mut bool) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a> TryFrom<&'a str> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a str) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a> TryFrom<&'a mut str> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a mut str) -> Result<Self, Self::Error>
Performs the conversion.
impl TryFrom<String> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: String) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a> TryFrom<&'a String> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a String) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a> TryFrom<&'a mut String> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a mut String) -> Result<Self, Self::Error>
Performs the conversion.
impl TryFrom<char> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: char) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a> TryFrom<&'a char> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a char) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a> TryFrom<&'a mut char> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a mut char) -> Result<Self, Self::Error>
Performs the conversion.
impl<T> TryFrom<Vec<T>> for Value where
T: Into<Value>,
[src]
T: Into<Value>,
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: Vec<T>) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a, T> TryFrom<&'a Vec<T>> for Value where
&'a T: Into<Value>,
[src]
&'a T: Into<Value>,
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a Vec<T>) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a, T> TryFrom<&'a mut Vec<T>> for Value where
&'a T: Into<Value>,
[src]
&'a T: Into<Value>,
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a mut Vec<T>) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a, T> TryFrom<&'a [T]> for Value where
&'a T: Into<Value>,
[src]
&'a T: Into<Value>,
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a [T]) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a, T> TryFrom<&'a mut [T]> for Value where
&'a T: Into<Value>,
[src]
&'a T: Into<Value>,
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a mut [T]) -> Result<Self, Self::Error>
Performs the conversion.
impl<K, V> TryFrom<BTreeMap<K, V>> for Value where
K: Into<String>,
V: Into<Value>,
[src]
K: Into<String>,
V: Into<Value>,
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: BTreeMap<K, V>) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a, K, V> TryFrom<&'a BTreeMap<K, V>> for Value where
&'a K: Into<String>,
&'a V: Into<Value>,
[src]
&'a K: Into<String>,
&'a V: Into<Value>,
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a BTreeMap<K, V>) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a, K, V> TryFrom<&'a mut BTreeMap<K, V>> for Value where
&'a K: Into<String>,
&'a V: Into<Value>,
[src]
&'a K: Into<String>,
&'a V: Into<Value>,
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a mut BTreeMap<K, V>) -> Result<Self, Self::Error>
Performs the conversion.
impl<K, V> TryFrom<HashMap<K, V>> for Value where
K: Into<String> + Hash + Eq,
V: Into<Value>,
[src]
K: Into<String> + Hash + Eq,
V: Into<Value>,
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: HashMap<K, V>) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a, K, V> TryFrom<&'a HashMap<K, V>> for Value where
K: Hash + Eq,
&'a K: Into<String>,
&'a V: Into<Value>,
[src]
K: Hash + Eq,
&'a K: Into<String>,
&'a V: Into<Value>,
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a HashMap<K, V>) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a, K, V> TryFrom<&'a mut HashMap<K, V>> for Value where
K: Hash + Eq,
&'a K: Into<String>,
&'a V: Into<Value>,
[src]
K: Hash + Eq,
&'a K: Into<String>,
&'a V: Into<Value>,
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: &'a mut HashMap<K, V>) -> Result<Self, Self::Error>
Performs the conversion.
impl TryFrom<Reference> for Value
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(source: Reference) -> Result<Self, Self::Error>
Performs the conversion.
impl TryFrom<i64> for Value
[src]
type Error = <Number as TryFrom<i64>>::Error
The type returned in the event of a conversion error.
fn try_from(value: i64) -> Result<Self, Self::Error>
Performs the conversion.
impl TryFrom<u64> for Value
[src]
type Error = <Number as TryFrom<u64>>::Error
The type returned in the event of a conversion error.
fn try_from(value: u64) -> Result<Self, Self::Error>
Performs the conversion.
impl PartialEq<Undefined> for Value
[src]
fn eq(&self, _: &Undefined) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<Null> for Value
[src]
fn eq(&self, _: &Null) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<bool> for Value
[src]
fn eq(&self, right: &bool) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<str> for Value
[src]
fn eq(&self, right: &str) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<String> for Value
[src]
fn eq(&self, right: &String) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<T> PartialEq<[T]> for Value where
Value: PartialEq<T>,
[src]
Value: PartialEq<T>,
fn eq(&self, right: &[T]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a, T> PartialEq<&'a [T]> for Value where
Value: PartialEq<T>,
[src]
Value: PartialEq<T>,
fn eq(&self, right: &&'a [T]) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<Number> for Value
[src]
fn eq(&self, right: &Number) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<T: AsRef<Reference>> PartialEq<T> for Value
[src]
fn eq(&self, right: &T) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<Reference> for &'a Value
[src]
fn eq(&self, right: &Reference) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<i8> for Value
[src]
fn eq(&self, right: &i8) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a i8> for Value
[src]
fn eq(&self, right: &&'a i8) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<i8> for &'a Value
[src]
fn eq(&self, right: &i8) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<i16> for Value
[src]
fn eq(&self, right: &i16) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a i16> for Value
[src]
fn eq(&self, right: &&'a i16) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<i16> for &'a Value
[src]
fn eq(&self, right: &i16) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<i32> for Value
[src]
fn eq(&self, right: &i32) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a i32> for Value
[src]
fn eq(&self, right: &&'a i32) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<i32> for &'a Value
[src]
fn eq(&self, right: &i32) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<i64> for Value
[src]
fn eq(&self, right: &i64) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a i64> for Value
[src]
fn eq(&self, right: &&'a i64) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<i64> for &'a Value
[src]
fn eq(&self, right: &i64) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<u8> for Value
[src]
fn eq(&self, right: &u8) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a u8> for Value
[src]
fn eq(&self, right: &&'a u8) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<u8> for &'a Value
[src]
fn eq(&self, right: &u8) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<u16> for Value
[src]
fn eq(&self, right: &u16) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a u16> for Value
[src]
fn eq(&self, right: &&'a u16) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<u16> for &'a Value
[src]
fn eq(&self, right: &u16) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<u32> for Value
[src]
fn eq(&self, right: &u32) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a u32> for Value
[src]
fn eq(&self, right: &&'a u32) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<u32> for &'a Value
[src]
fn eq(&self, right: &u32) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<u64> for Value
[src]
fn eq(&self, right: &u64) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a u64> for Value
[src]
fn eq(&self, right: &&'a u64) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<u64> for &'a Value
[src]
fn eq(&self, right: &u64) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<f32> for Value
[src]
fn eq(&self, right: &f32) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a f32> for Value
[src]
fn eq(&self, right: &&'a f32) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<f32> for &'a Value
[src]
fn eq(&self, right: &f32) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialEq<f64> for Value
[src]
fn eq(&self, right: &f64) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a f64> for Value
[src]
fn eq(&self, right: &&'a f64) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<f64> for &'a Value
[src]
fn eq(&self, right: &f64) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a Undefined> for Value
[src]
fn eq(&self, right: &&'a Undefined) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<Undefined> for &'a Value
[src]
fn eq(&self, right: &Undefined) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a Null> for Value
[src]
fn eq(&self, right: &&'a Null) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<Null> for &'a Value
[src]
fn eq(&self, right: &Null) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a bool> for Value
[src]
fn eq(&self, right: &&'a bool) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<bool> for &'a Value
[src]
fn eq(&self, right: &bool) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a str> for Value
[src]
fn eq(&self, right: &&'a str) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<str> for &'a Value
[src]
fn eq(&self, right: &str) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a String> for Value
[src]
fn eq(&self, right: &&'a String) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<String> for &'a Value
[src]
fn eq(&self, right: &String) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<&'a Number> for Value
[src]
fn eq(&self, right: &&'a Number) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<Number> for &'a Value
[src]
fn eq(&self, right: &Number) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Serialize for Value
[src]
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for Value
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl<'de> Deserializer<'de> for Value
[src]
type Error = ConversionError
The error type that can be returned if some error occurs during deserialization. Read more
fn deserialize_any<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
self,
visitor: V
) -> Result<V::Value, Self::Error>
Require the Deserializer
to figure out how to drive the visitor based on what data type is in the input. Read more
fn deserialize_option<V: Visitor<'de>>(
self,
visitor: V
) -> Result<V::Value, Self::Error>
self,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an optional value. Read more
fn deserialize_enum<V: Visitor<'de>>(
self,
_name: &str,
_variants: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error>
self,
_name: &str,
_variants: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting an enum value with a particular name and possible variants. Read more
fn deserialize_newtype_struct<V: Visitor<'de>>(
self,
_name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error>
self,
_name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error>
Hint that the Deserialize
type is expecting a newtype struct with a particular name. Read more
fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a bool
value.
fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a u8
value.
fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a u16
value.
fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a u32
value.
fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a u64
value.
fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting an i8
value.
fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting an i16
value.
fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting an i32
value.
fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting an i64
value.
fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a f32
value.
fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a f64
value.
fn deserialize_char<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a char
value.
fn deserialize_str<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a string value and does not benefit from taking ownership of buffered data owned by the Deserializer
. Read more
fn deserialize_string<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a string value and would benefit from taking ownership of buffered data owned by the Deserializer
. Read more
fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a unit value.
fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a sequence of values.
fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a byte array and does not benefit from taking ownership of buffered data owned by the Deserializer
. Read more
fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a byte array and would benefit from taking ownership of buffered data owned by the Deserializer
. Read more
fn deserialize_map<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a map of key-value pairs.
fn deserialize_unit_struct<V>(
self,
name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
self,
name: &'static str,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a unit struct with a particular name. Read more
fn deserialize_tuple_struct<V>(
self,
name: &'static str,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
self,
name: &'static str,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a tuple struct with a particular name and number of fields. Read more
fn deserialize_struct<V>(
self,
name: &'static str,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
self,
name: &'static str,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a struct with a particular name and fields. Read more
fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type is expecting the name of a struct field or the discriminant of an enum variant. Read more
fn deserialize_tuple<V>(
self,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
self,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
Hint that the Deserialize
type is expecting a sequence of values and knows how many values there are without looking at the serialized data. Read more
fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Self::Error> where
V: Visitor<'de>,
V: Visitor<'de>,
Hint that the Deserialize
type needs to deserialize a value whose type doesn't matter because it is ignored. Read more
impl<T: Serialize> TryFrom<Serde<T>> for Value
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Serde<T>) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a, T: Serialize> TryFrom<&'a Serde<T>> for Value
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &'a Serde<T>) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a, T: Serialize> TryFrom<&'a mut Serde<T>> for Value
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &'a mut Serde<T>) -> Result<Self, Self::Error>
Performs the conversion.