SchemaVersioningExt

Trait SchemaVersioningExt 

Source
pub trait SchemaVersioningExt: SchemaRegistryExt {
    // Required methods
    fn check_compatibility(
        &self,
        name: &str,
        old_version: u32,
        new_version: u32,
        mode: CompatibilityMode,
    ) -> impl Future<Output = Result<CompatibilityCheck>> + Send;
    fn register_versioned_schema(
        &self,
        schema: &MessageSchema,
        mode: CompatibilityMode,
    ) -> impl Future<Output = Result<CompatibilityCheck>> + Send;
    fn get_version_info(
        &self,
        name: &str,
    ) -> impl Future<Output = Result<Option<MessageVersionInfo>>> + Send;
    fn deprecate_version(
        &self,
        name: &str,
        version: u32,
        message: String,
    ) -> impl Future<Output = Result<()>> + Send;
    fn is_version_deprecated(
        &self,
        name: &str,
        version: u32,
    ) -> impl Future<Output = Result<bool>> + Send;
}
Expand description

Extension trait for versioned schema operations

Required Methods§

Source

fn check_compatibility( &self, name: &str, old_version: u32, new_version: u32, mode: CompatibilityMode, ) -> impl Future<Output = Result<CompatibilityCheck>> + Send

Check compatibility between two schema versions

Source

fn register_versioned_schema( &self, schema: &MessageSchema, mode: CompatibilityMode, ) -> impl Future<Output = Result<CompatibilityCheck>> + Send

Register a new schema version with compatibility check

Source

fn get_version_info( &self, name: &str, ) -> impl Future<Output = Result<Option<MessageVersionInfo>>> + Send

Get version info for a message type

Source

fn deprecate_version( &self, name: &str, version: u32, message: String, ) -> impl Future<Output = Result<()>> + Send

Mark a schema version as deprecated

Source

fn is_version_deprecated( &self, name: &str, version: u32, ) -> impl Future<Output = Result<bool>> + Send

Check if using a deprecated version

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.

Implementors§