Skip to main content

CustomValue

Trait CustomValue 

Source
pub trait CustomValue:
    Any
    + Debug
    + Send
    + Sync {
    // Required method
    fn as_any(&self) -> &dyn Any;
}
Expand description

The trait objects accepted by Value::Custom.

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Upcast so callers can downcast to the concrete type.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Any + Debug + Send + Sync> CustomValue for T