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§
Sourcefn add_to_reflected_type_info(rti: &mut ReflectedTypeInfo)
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.