Expand description
A value that can be converted to and from Arma types.
Variants
Null
Arma’s nil value.
Represented as null
Number(f64)
Arma’s number value.
Array(Vec<Value>)
Arma’s array value.
Represented as [...]
Boolean(bool)
Arma’s boolean value.
Represented as true or false
String(String)
Arma’s string value.
Represented as "..."
Note: Arma escapes quotes with two double quotes.
This conversation will remove one step of escaping.
Example: "My name is ""John""." will become My name is "John".
Implementations
sourceimpl Value
impl Value
sourcepub const fn as_f64(&self) -> Option<f64>
pub const fn as_f64(&self) -> Option<f64>
Returns an Option representing if the value is a number
sourcepub const fn as_vec(&self) -> Option<&Vec<Self>>
pub const fn as_vec(&self) -> Option<&Vec<Self>>
Returns an Option representing if the value is an array
sourcepub const fn as_bool(&self) -> Option<bool>
pub const fn as_bool(&self) -> Option<bool>
Returns an Option representing if the value is a boolean
sourcepub const fn is_boolean(&self) -> bool
pub const fn is_boolean(&self) -> bool
Checks if the value is a boolean
Trait Implementations
sourceimpl IntoExtResult for Value
impl IntoExtResult for Value
sourcefn to_ext_result(self) -> Result<Value, Value>
fn to_ext_result(self) -> Result<Value, Value>
Convert a type to a successful or failed extension result
sourceimpl PartialOrd<Value> for Value
impl PartialOrd<Value> for Value
sourcefn partial_cmp(&self, other: &Value) -> Option<Ordering>
fn partial_cmp(&self, other: &Value) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl StructuralPartialEq for Value
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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