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§
source§impl 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§
source§impl IntoExtResult for Value
impl IntoExtResult for Value
source§impl PartialEq<Value> for Value
impl PartialEq<Value> for Value
source§impl PartialOrd<Value> for Value
impl PartialOrd<Value> for Value
1.0.0 · source§fn 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