Trait stepflow::data::Var[][src]

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

Required methods

pub fn id(&self) -> &VarId[src]

pub fn value_from_str(
    &self,
    s: &str
) -> Result<Box<dyn Value + 'static, Global>, InvalidValue>
[src]

pub fn validate_val_type(
    &self,
    val: &Box<dyn Value + 'static, Global>
) -> Result<(), InvalidValue>
[src]

Loading content...

Implementations

impl dyn Var + 'static + Send + Sync[src]

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

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

Implementors

impl Var for BoolVar[src]

pub fn id(&self) -> &VarId[src]

Gets the ID

pub fn value_from_str(
    &self,
    s: &str
) -> Result<Box<dyn Value + 'static, Global>, InvalidValue>
[src]

Convert a &str to this Var's corresponding value

pub fn validate_val_type(
    &self,
    val: &Box<dyn Value + 'static, Global>
) -> Result<(), InvalidValue>
[src]

Validate the value type corresponds to this Var

impl Var for EmailVar[src]

pub fn id(&self) -> &VarId[src]

Gets the ID

pub fn value_from_str(
    &self,
    s: &str
) -> Result<Box<dyn Value + 'static, Global>, InvalidValue>
[src]

Convert a &str to this Var's corresponding value

pub fn validate_val_type(
    &self,
    val: &Box<dyn Value + 'static, Global>
) -> Result<(), InvalidValue>
[src]

Validate the value type corresponds to this Var

impl Var for StringVar[src]

pub fn id(&self) -> &VarId[src]

Gets the ID

pub fn value_from_str(
    &self,
    s: &str
) -> Result<Box<dyn Value + 'static, Global>, InvalidValue>
[src]

Convert a &str to this Var's corresponding value

pub fn validate_val_type(
    &self,
    val: &Box<dyn Value + 'static, Global>
) -> Result<(), InvalidValue>
[src]

Validate the value type corresponds to this Var

impl Var for TrueVar[src]

pub fn id(&self) -> &VarId[src]

Gets the ID

pub fn value_from_str(
    &self,
    s: &str
) -> Result<Box<dyn Value + 'static, Global>, InvalidValue>
[src]

Convert a &str to this Var's corresponding value

pub fn validate_val_type(
    &self,
    val: &Box<dyn Value + 'static, Global>
) -> Result<(), InvalidValue>
[src]

Validate the value type corresponds to this Var

Loading content...