Trait Reflect

Source
pub trait Reflect {
    // Required methods
    fn input() -> CastInfo;
    fn output() -> CastInfo;
    fn castable(value: &Value) -> bool;

    // Provided method
    fn error(found: &Value) -> EcoString { ... }
}

Required Methods§

Source

fn input() -> CastInfo

What can be turned into this value?

Source

fn output() -> CastInfo

What can this value turn into?

Source

fn castable(value: &Value) -> bool

Whether the given value can turn into this type

Provided Methods§

Source

fn error(found: &Value) -> EcoString

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Reflect for bool

Source§

impl Reflect for char

Source§

impl Reflect for i64

Source§

impl Reflect for ()

Source§

impl Reflect for usize

Implementors§