pub fn check_compat(
old: &SchemaDocument,
new: &SchemaDocument,
role: Role,
) -> Result<bool, CompatibilityError>Expand description
Return whether new is backward-compatible with old under role.
The checker is a structural subset proof over the documents’ resolved schema graphs:
Role::Serializerchecksnew ⊆ old: every value produced under the new schema must still be accepted by clients using the old schema.Role::Deserializerchecksold ⊆ new: every previously accepted value must still be accepted by the new schema.Role::Bothrequires both directions.
A return value of Ok(false) is a proven or conservative incompatibility.
A return value of Err(_) means the checker cannot soundly run on the input
schema or feature set.