Enum wezterm_dynamic::Value
source · [−]pub enum Value {
Null,
Bool(bool),
String(String),
Array(Array),
Object(Object),
U64(u64),
I64(i64),
F64(OrderedFloat<f64>),
}
Expand description
Represents values of various possible other types. Value is intended to be convertible to the same set of types as Lua and is a superset of the types possible in TOML and JSON.
Variants
Null
Bool(bool)
String(String)
Array(Array)
Object(Object)
U64(u64)
I64(i64)
F64(OrderedFloat<f64>)
Implementations
sourceimpl Value
impl Value
pub fn variant_name(&self) -> &str
pub fn coerce_unsigned(&self) -> Option<u64>
pub fn coerce_signed(&self) -> Option<i64>
pub fn coerce_float(&self) -> Option<f64>
Trait Implementations
sourceimpl<'a> Borrow<dyn ObjectKeyTrait + 'a> for Value
impl<'a> Borrow<dyn ObjectKeyTrait + 'a> for Value
sourcefn borrow(&self) -> &(dyn ObjectKeyTrait + 'a)
fn borrow(&self) -> &(dyn ObjectKeyTrait + 'a)
Immutably borrows from an owned value. Read more
sourceimpl FromDynamic for Value
impl FromDynamic for Value
fn from_dynamic(
value: &Value,
_options: FromDynamicOptions
) -> Result<Self, Error>
sourceimpl FromIterator<Value> for Array
impl FromIterator<Value> for Array
sourcefn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = Value>,
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = Value>,
Creates a value from an iterator. Read more
sourceimpl ObjectKeyTrait for Value
impl ObjectKeyTrait for Value
fn key<'k>(&'k self) -> BorrowedKey<'k>
sourceimpl Ord for Value
impl Ord for Value
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
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 Eq for Value
impl StructuralEq for Value
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