pub trait SchemaDecode<'de>: Sized {
const SCHEMA_ID: u64;
// Required method
fn decode_fields(
decoder: &mut FieldDecoder<'de>,
encoded_version: u32,
) -> Result<Self>;
}Available on crate feature
schema-evolution only.Expand description
Decoding contract for a type that accepts compatible schema revisions.
Required Associated Constants§
Required Methods§
Sourcefn decode_fields(
decoder: &mut FieldDecoder<'de>,
encoded_version: u32,
) -> Result<Self>
fn decode_fields( decoder: &mut FieldDecoder<'de>, encoded_version: u32, ) -> Result<Self>
Constructs a value from stable-ID fields.
encoded_version is available for explicit migrations. Unknown fields
remain accessible through FieldDecoder::unknown_fields.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".