Trait SerializedPayloadSchema
pub trait SerializedPayloadSchema {
// Required method
fn serialized_payload_schema() -> &'static str;
}Expand description
Describes the serialized JSON representation of a reusable payload type.
Implement this next to a payload’s Serialize implementation when its
wire representation cannot be inferred accurately from reflected fields.
Add SerializedPayloadSchema to the type’s #[reflect(...)] attribute so
reflection-based exporters discover the implementation automatically.
Exporters can then consume the schema without the payload depending on a
particular export format such as MCAP.
Required Methods§
fn serialized_payload_schema() -> &'static str
fn serialized_payload_schema() -> &'static str
Returns a JSON Schema for the value emitted by Serialize.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".