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

Implementations on Foreign Types§

Source§

impl ValueExt for Value

Implementors§