Var

Trait Var 

Source
pub trait Var: Debug + AsAny {
    // Required methods
    fn id(&self) -> &VarId;
    fn value_from_str(&self, s: &str) -> Result<Box<dyn Value>, InvalidValue>;
    fn validate_val_type(
        &self,
        val: &Box<dyn Value>,
    ) -> Result<(), InvalidValue>;
}

Required Methods§

Source

fn id(&self) -> &VarId

Source

fn value_from_str(&self, s: &str) -> Result<Box<dyn Value>, InvalidValue>

Source

fn validate_val_type(&self, val: &Box<dyn Value>) -> Result<(), InvalidValue>

Implementations§

Source§

impl dyn Var + Send + Sync

Source

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

Source

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

Trait Implementations§

Source§

impl ObjectStoreContent for Box<dyn Var + Sync + Send>

Source§

type IdType = VarId

Source§

fn new_id(id_val: u16) -> Self::IdType

Source§

fn id(&self) -> &Self::IdType

Implementors§