Skip to main content

Versioned

Trait Versioned 

Source
pub trait Versioned: Sized {
    const CURRENT_VERSION: u8;
    const CRDT_TYPE: CrdtType;
}
Expand description

Trait for CRDT types that support versioned serialization.

Types implementing this trait can be serialized with a 3-byte version envelope, enabling automatic migration when data schemas change.

Required Associated Constants§

Source

const CURRENT_VERSION: u8

Current schema version for this CRDT type’s serialization format.

Source

const CRDT_TYPE: CrdtType

The CRDT type identifier for the envelope.

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§