DataValue

Trait DataValue 

Source
pub trait DataValue: Debug {
Show 27 methods // Required methods fn serialize( &self, pretty_print: bool, tab_index: usize, ) -> (PropertyType, String); fn deserialize( serialized_type: &PropertyType, serialized_value: &str, ) -> Option<Box<dyn DataValue>> where Self: Sized; fn clone_data_value(&self) -> Box<dyn DataValue>; // Provided methods fn get_type(&self) -> PropertyType { ... } fn is_implicit(&self) -> bool { ... } fn as_vec(&self) -> Vec<Box<dyn DataValue>> { ... } fn as_bool(&self) -> bool { ... } fn as_character(&self) -> char { ... } fn as_enum_structure(&self) -> (String, Vec<Box<dyn DataValue>>) { ... } fn as_hashmap(&self) -> HashMap<Box<dyn DataValue>, Box<dyn DataValue>> { ... } fn as_string(&self) -> String { ... } fn as_struct_structure(&self) -> HashMap<String, Box<dyn DataValue>> { ... } fn as_tuple_structure(&self) -> Vec<Box<dyn DataValue>> { ... } fn as_f32(&self) -> f32 { ... } fn as_f64(&self) -> f64 { ... } fn as_u8(&self) -> u8 { ... } fn as_i8(&self) -> i8 { ... } fn as_u16(&self) -> u16 { ... } fn as_i16(&self) -> i16 { ... } fn as_u32(&self) -> u32 { ... } fn as_i32(&self) -> i32 { ... } fn as_u64(&self) -> u64 { ... } fn as_i64(&self) -> i64 { ... } fn as_u128(&self) -> u128 { ... } fn as_i128(&self) -> i128 { ... } fn as_usize(&self) -> usize { ... } fn as_isize(&self) -> isize { ... }
}

Required Methods§

Source

fn serialize( &self, pretty_print: bool, tab_index: usize, ) -> (PropertyType, String)

Source

fn deserialize( serialized_type: &PropertyType, serialized_value: &str, ) -> Option<Box<dyn DataValue>>
where Self: Sized,

Source

fn clone_data_value(&self) -> Box<dyn DataValue>

Provided Methods§

Source

fn get_type(&self) -> PropertyType

Source

fn is_implicit(&self) -> bool

Source

fn as_vec(&self) -> Vec<Box<dyn DataValue>>

Source

fn as_bool(&self) -> bool

Source

fn as_character(&self) -> char

Source

fn as_enum_structure(&self) -> (String, Vec<Box<dyn DataValue>>)

Source

fn as_hashmap(&self) -> HashMap<Box<dyn DataValue>, Box<dyn DataValue>>

Source

fn as_string(&self) -> String

Source

fn as_struct_structure(&self) -> HashMap<String, Box<dyn DataValue>>

Source

fn as_tuple_structure(&self) -> Vec<Box<dyn DataValue>>

Source

fn as_f32(&self) -> f32

Source

fn as_f64(&self) -> f64

Source

fn as_u8(&self) -> u8

Source

fn as_i8(&self) -> i8

Source

fn as_u16(&self) -> u16

Source

fn as_i16(&self) -> i16

Source

fn as_u32(&self) -> u32

Source

fn as_i32(&self) -> i32

Source

fn as_u64(&self) -> u64

Source

fn as_i64(&self) -> i64

Source

fn as_u128(&self) -> u128

Source

fn as_i128(&self) -> i128

Source

fn as_usize(&self) -> usize

Source

fn as_isize(&self) -> isize

Trait Implementations§

Source§

impl Hash for dyn DataValue

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl PartialEq for dyn DataValue

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for dyn DataValue

Implementors§