PropertyInstanceGetter

Trait PropertyInstanceGetter 

Source
pub trait PropertyInstanceGetter {
    // Required methods
    fn get(&self, property_name: &str) -> Option<Value>;
    fn as_bool(&self, property_name: &str) -> Option<bool>;
    fn as_u64(&self, property_name: &str) -> Option<u64>;
    fn as_i64(&self, property_name: &str) -> Option<i64>;
    fn as_f64(&self, property_name: &str) -> Option<f64>;
    fn as_string(&self, property_name: &str) -> Option<String>;
    fn as_array(&self, property_name: &str) -> Option<Vec<Value>>;
    fn as_object(&self, property_name: &str) -> Option<Map<String, Value>>;
}

Required Methods§

Source

fn get(&self, property_name: &str) -> Option<Value>

Returns the json value of the given property by name

Source

fn as_bool(&self, property_name: &str) -> Option<bool>

Returns the boolean value of the given property by name

Source

fn as_u64(&self, property_name: &str) -> Option<u64>

Returns the u64 value of the given property by name

Source

fn as_i64(&self, property_name: &str) -> Option<i64>

Returns the i64 value of the given property by name

Source

fn as_f64(&self, property_name: &str) -> Option<f64>

Returns the f64 value of the given property by name

Source

fn as_string(&self, property_name: &str) -> Option<String>

Returns the string value of the given property by name

Source

fn as_array(&self, property_name: &str) -> Option<Vec<Value>>

Returns the string value of the given property by name

Source

fn as_object(&self, property_name: &str) -> Option<Map<String, Value>>

Returns the string value of the given property by name

Implementors§