Enum virtual_view::Prop
[−]
[src]
pub enum Prop { Null, Boolean(bool), Number(Number), String(String), Function(Arc<Function>), Array(Array), Object(Props), }
Variants
Null
Boolean(bool)
Number(Number)
String(String)
Function(Arc<Function>)
Array(Array)
Object(Props)
Methods
impl Prop
[src]
pub fn null(&self) -> Option<()>
[src]
pub fn boolean(&self) -> Option<bool>
[src]
pub fn number(&self) -> Option<Number>
[src]
pub fn string(&self) -> Option<&String>
[src]
pub fn function(&self) -> Option<&Arc<Function>>
[src]
pub fn array(&self) -> Option<&Array>
[src]
pub fn object(&self) -> Option<&Props>
[src]
pub fn array_mut(&mut self) -> Option<&mut Array>
[src]
pub fn object_mut(&mut self) -> Option<&mut Props>
[src]
pub fn take_null(self) -> Result<(), Self>
[src]
pub fn take_boolean(self) -> Result<bool, Self>
[src]
pub fn take_number(self) -> Result<Number, Self>
[src]
pub fn take_string(self) -> Result<String, Self>
[src]
pub fn take_function(self) -> Result<Arc<Function>, Self>
[src]
pub fn take_array(self) -> Result<Array, Self>
[src]
pub fn take_object(self) -> Result<Props, Self>
[src]
pub fn is_null(&self) -> bool
[src]
pub fn is_boolean(&self) -> bool
[src]
pub fn is_number(&self) -> bool
[src]
pub fn is_string(&self) -> bool
[src]
pub fn is_function(&self) -> bool
[src]
pub fn is_array(&self) -> bool
[src]
pub fn is_object(&self) -> bool
[src]
pub fn call(&self, e: &mut Props) -> Option<Prop>
[src]
pub fn is_truthy(&self) -> bool
[src]
pub fn is_falsey(&self) -> bool
[src]
pub fn is_true(&self) -> bool
[src]
pub fn is_false(&self) -> bool
[src]
pub fn to_json(&self) -> Value
[src]
Trait Implementations
impl Clone for Prop
[src]
fn clone(&self) -> Prop
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Sync for Prop
[src]
impl Send for Prop
[src]
impl<'a> From<&'a Prop> for Prop
[src]
impl From<()> for Prop
[src]
impl From<bool> for Prop
[src]
impl<'a> From<&'a str> for Prop
[src]
impl From<String> for Prop
[src]
impl From<u8> for Prop
[src]
impl From<u16> for Prop
[src]
impl From<u32> for Prop
[src]
impl From<u64> for Prop
[src]
impl From<usize> for Prop
[src]
impl From<i8> for Prop
[src]
impl From<i16> for Prop
[src]
impl From<i32> for Prop
[src]
impl From<i64> for Prop
[src]
impl From<isize> for Prop
[src]
impl From<f32> for Prop
[src]
impl From<f64> for Prop
[src]
impl<T> From<Vec<T>> for Prop where
T: Into<Prop>,
[src]
T: Into<Prop>,
impl From<Array> for Prop
[src]
impl<T> From<FnvHashMap<String, T>> for Prop where
T: Into<Prop>,
[src]
T: Into<Prop>,
fn from(value: FnvHashMap<String, T>) -> Self
[src]
Performs the conversion.
impl From<Props> for Prop
[src]
impl<F> From<F> for Prop where
F: 'static + Fn(&mut Props) -> Prop,
[src]
F: 'static + Fn(&mut Props) -> Prop,
impl From<Value> for Prop
[src]
impl<'a> From<&'a Value> for Prop
[src]
impl Debug for Prop
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Display for Prop
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Eq for Prop
[src]
impl PartialEq for Prop
[src]
fn eq(&self, other: &Prop) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialEq<str> for Prop
[src]
fn eq(&self, other: &str) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialEq<u8> for Prop
[src]
fn eq(&self, other: &u8) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialEq<u16> for Prop
[src]
fn eq(&self, other: &u16) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialEq<u32> for Prop
[src]
fn eq(&self, other: &u32) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialEq<u64> for Prop
[src]
fn eq(&self, other: &u64) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialEq<usize> for Prop
[src]
fn eq(&self, other: &usize) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialEq<i8> for Prop
[src]
fn eq(&self, other: &i8) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialEq<i16> for Prop
[src]
fn eq(&self, other: &i16) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialEq<i32> for Prop
[src]
fn eq(&self, other: &i32) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialEq<i64> for Prop
[src]
fn eq(&self, other: &i64) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialEq<isize> for Prop
[src]
fn eq(&self, other: &isize) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialEq<f32> for Prop
[src]
fn eq(&self, other: &f32) -> bool
[src]
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[src]
This method tests for !=
.
impl PartialEq<f64> for Prop
[src]
fn eq(&self, other: &f64) -> bool
[src]
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[src]
This method tests for !=
.