pub trait ComparableSchema<S>: Clone + VecSbor<<S as CustomSchema>::DefaultCustomExtension>where
S: CustomSchema,{
// Required method
fn compare_with<'s>(
&'s self,
compared: &'s Self,
settings: &SchemaComparisonSettings,
) -> SchemaComparisonResult<'s, S>;
// Provided methods
fn encode_to_bytes(&self) -> Vec<u8> ⓘ { ... }
fn encode_to_hex(&self) -> String { ... }
fn decode_from_bytes(bytes: &[u8]) -> Self { ... }
fn decode_from_hex(hex: &str) -> Self { ... }
}
Expand description
Marker trait for SingleTypeSchema
and TypeCollectionSchema
which
includes named pointers to types, and can be used for comparisons of
different versions of the same schema.
Required Methods§
fn compare_with<'s>( &'s self, compared: &'s Self, settings: &SchemaComparisonSettings, ) -> SchemaComparisonResult<'s, S>
Provided Methods§
fn encode_to_bytes(&self) -> Vec<u8> ⓘ
fn encode_to_hex(&self) -> String
fn decode_from_bytes(bytes: &[u8]) -> Self
fn decode_from_hex(hex: &str) -> Self
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.