pub trait Value: Index<usize> + PartialEq<i8> + PartialEq<i16> + PartialEq<i32> + PartialEq<i64> + PartialEq<i128> + PartialEq<u8> + PartialEq<u16> + PartialEq<u32> + PartialEq<u64> + PartialEq<u128> + PartialEq<f32> + PartialEq<f64> + PartialEq<String> + PartialEq<bool> + PartialEq<()> + ValueAccess {
Show 24 methods
fn value_type(&self) -> ValueType;
fn is_null(&self) -> bool;
fn is_float(&self) -> bool { ... }
fn is_integer(&self) -> bool { ... }
fn is_number(&self) -> bool { ... }
fn is_bool(&self) -> bool { ... }
fn is_i128(&self) -> bool { ... }
fn is_i64(&self) -> bool { ... }
fn is_i32(&self) -> bool { ... }
fn is_i16(&self) -> bool { ... }
fn is_i8(&self) -> bool { ... }
fn is_u128(&self) -> bool { ... }
fn is_u64(&self) -> bool { ... }
fn is_usize(&self) -> bool { ... }
fn is_u32(&self) -> bool { ... }
fn is_u16(&self) -> bool { ... }
fn is_u8(&self) -> bool { ... }
fn is_f64(&self) -> bool { ... }
fn is_f64_castable(&self) -> bool { ... }
fn is_f32(&self) -> bool { ... }
fn is_str(&self) -> bool { ... }
fn is_char(&self) -> bool { ... }
fn is_array(&self) -> bool { ... }
fn is_object(&self) -> bool { ... }
}
Expand description
The Value
exposes common interface for values, this allows using both
BorrowedValue
and OwnedValue
nearly interchangable
Required Methods
fn value_type(&self) -> ValueType
fn value_type(&self) -> ValueType
Returns the type of the current Valye
Provided Methods
fn is_integer(&self) -> bool
fn is_integer(&self) -> bool
returns true if the current value a integer number
fn is_f64_castable(&self) -> bool
fn is_f64_castable(&self) -> bool
returns true if the current value can be cast into a f64