Value

Trait Value 

Source
pub trait Value:
    Debug
    + Sync
    + Send
    + AsAny {
    // Required methods
    fn get_baseval(&self) -> BaseValue;
    fn clone_box(&self) -> Box<dyn Value>;
    fn eq_box(&self, other: &Box<dyn Value>) -> bool;
}

Required Methods§

Source

fn get_baseval(&self) -> BaseValue

Source

fn clone_box(&self) -> Box<dyn Value>

Source

fn eq_box(&self, other: &Box<dyn Value>) -> bool

Implementations§

Source§

impl dyn Value

Source

pub fn downcast<T>(&self) -> Option<&T>
where T: Value + Any,

Source

pub fn is<T>(&self) -> bool
where T: Value + Any,

Trait Implementations§

Source§

impl Clone for Box<dyn Value>

Source§

fn clone(&self) -> Box<dyn Value>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl PartialEq for Box<dyn Value>

Source§

fn eq(&self, other: &Box<dyn Value>) -> 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.

Implementors§