IValue

Trait IValue 

Source
pub trait IValue: Any + Display {
    // Required method
    fn as_any(&self) -> &dyn Any;
}
Expand description

Property values.

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Returns the value as a &dyn Any trait object.

Implementations§

Source§

impl dyn IValue

Source

pub fn is<T: Any>(&self) -> bool

Returns true if the inner type is the same as T.

Source

pub fn downcast_ref<T: Any>(&self) -> Option<&T>

Returns some reference to the inner value if it is of type T, or None if it isn’t.

Trait Implementations§

Source§

impl Debug for dyn IValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§

Source§

impl<T> IValue for T
where T: Clone + Default + PartialEq + Display + FromStr + 'static + Sized, T::Err: StdError + Send + Sync + 'static,