Skip to main content

SchemaDomain

Struct SchemaDomain 

Source
pub struct SchemaDomain {
    pub name: &'static str,
    pub migrations: &'static [Migration],
    pub initialize_current: fn(&Transaction<'_>) -> Result<(), Error>,
    pub allowed_existing_versions: &'static [i64],
    pub released_predecessors: &'static [SchemaPredecessor],
    pub owned_objects: &'static [SchemaObject],
    pub retired_objects: &'static [SchemaObject],
}
Expand description

A store’s schema domain: its ledger name plus the ordered migration list.

Fields§

§name: &'static str

Ledger key. Kebab-case, stable forever (it is persisted in files).

§migrations: &'static [Migration]

Ordered migrations, versions contiguous from 1.

§initialize_current: fn(&Transaction<'_>) -> Result<(), Error>

Initialize a genuinely fresh domain directly at the current schema.

This is intentionally separate from historical upgrades. A current base initializer may already contain objects that a released predecessor transition creates or rebuilds; replaying the transition on fresh state would either collide or weaken strict collision detection with idempotent DDL.

§allowed_existing_versions: &'static [i64]

Exact existing released versions that this binary may open. The current supported version is included for an explicit manifest even though it needs no migration.

§released_predecessors: &'static [SchemaPredecessor]

Exact catalog verifiers for every allowed version below current.

§owned_objects: &'static [SchemaObject]

Complete set of catalog objects owned by this domain across its current schema. Foreign co-tenant objects are deliberately absent.

§retired_objects: &'static [SchemaObject]

Names owned by supported predecessors but intentionally absent from the current schema. They remain reserved for fresh-domain detection and predecessor fingerprints.

Implementations§

Source§

impl SchemaDomain

Source

pub fn supported_version(&self) -> i64

Highest version this binary knows for the domain.

Trait Implementations§

Source§

impl Debug for SchemaDomain

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.