pub trait CustomObject:
ObjectView
+ Debug
+ Send
+ Sync {
// Required methods
fn as_json(&self) -> Value;
fn as_any(&self) -> &dyn Any;
}Expand description
A consumer-supplied object type that the matcher can view uniformly.
Blanket-implemented for any ObjectView that is also Serialize, so a
consumer only writes an ObjectView impl. as_json backs serialization and
equality; as_any enables downcasting back to the concrete type.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".