Skip to main content

ValueExt

Trait ValueExt 

Source
pub trait ValueExt {
    // Required methods
    fn to_length(&self) -> Option<i64>;
    fn as_numeric(&self) -> Option<f64>;
    fn is_truthy(&self) -> bool;
}

Required Methods§

Source

fn to_length(&self) -> Option<i64>

Convert value to length for HasLength comparisons

Source

fn as_numeric(&self) -> Option<f64>

Extract numeric value for comparison

Source

fn is_truthy(&self) -> bool

Check if value is truthy

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ValueExt for Value

Implementors§