Skip to main content

register

Function register 

Source
pub fn register(
    store: &UnifiedStore,
    event_name: &str,
    schema_json: &str,
) -> Result<u32, SchemaError>
Expand description

Register a schema for event_name.

  • First registration → returns version 1.
  • Additive successor → returns previous_version + 1.
  • Anything else → SchemaError::BreakingChange { offenders } with every break the diff turned up so the caller can fix them all in one round-trip.