Trait MzReflect

Source
pub trait MzReflect {
    // Required method
    fn add_to_reflected_type_info(rti: &mut ReflectedTypeInfo);
}
Expand description

For to_json to create deserializable JSON for an instance of an type, the type must derive this trait.

Required Methods§

Source

fn add_to_reflected_type_info(rti: &mut ReflectedTypeInfo)

Adds names and types of the fields of the struct or enum to rti.

The corresponding implementation of this method will be recursively called for each type referenced by the struct or enum. Check out the crate README for more details.

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<T: MzReflect> MzReflect for Vec<T>

Implementors§

impl MzReflect for Id

impl MzReflect for Acos

impl MzReflect for Acosh

impl MzReflect for Ascii

impl MzReflect for Asin

impl MzReflect for Asinh

impl MzReflect for Atan

impl MzReflect for Atanh

impl MzReflect for Chr

impl MzReflect for Cos

impl MzReflect for Cosh

impl MzReflect for Cot

impl MzReflect for Encode

impl MzReflect for Exp

impl MzReflect for IsNull

impl MzReflect for IsTrue

impl MzReflect for Ln

impl MzReflect for Log10

impl MzReflect for Lower

impl MzReflect for Not

impl MzReflect for Panic

impl MzReflect for Sin

impl MzReflect for Sinh

impl MzReflect for Sleep

impl MzReflect for Tan

impl MzReflect for Tanh

impl MzReflect for Upper

impl MzReflect for RoleId

impl MzReflect for Regex