Skip to main content

SchemaProposal

Struct SchemaProposal 

Source
pub struct SchemaProposal { /* private fields */ }
Expand description

Canonical current-form database-scoped proposal.

Implementations§

Source§

impl SchemaProposal

Source

pub fn try_compose( capabilities: Vec<SchemaCapability>, target_database: TargetDatabaseIdentity, submission_key: SchemaSubmissionKey, expected_head: ExpectedAcceptedHead, fragments: Vec<SchemaFragment>, assignments: Vec<EntityStoreAssignment>, removals: Vec<SchemaRemoval>, migration: Option<SchemaMigrationPlan>, ) -> Result<SchemaProposal, SchemaContractError>

Compose the public transport form from already selected fragments.

This validates contract-local closure only. IcyDB still treats the result as untrusted and resolves target ownership, accepted references, capabilities, and catalog-native mutation semantics during application.

§Errors

Returns a typed contract error for bounds, duplicate definitions, ambiguous routing, removal conflicts, or malformed nested data.

Source

pub const fn version(&self) -> ProposalContractVersion

Return the contract version.

Source

pub fn capabilities(&self) -> &[SchemaCapability]

Borrow required capabilities in canonical order.

Source

pub const fn target_database(&self) -> TargetDatabaseIdentity

Return the target database identity.

Source

pub const fn submission_key(&self) -> &SchemaSubmissionKey

Borrow the submission key.

Source

pub const fn expected_head(&self) -> &ExpectedAcceptedHead

Borrow the optimistic accepted-head condition.

Source

pub fn fragments(&self) -> &[SchemaFragment]

Borrow reusable fragments.

Source

pub fn assignments(&self) -> &[EntityStoreAssignment]

Borrow canonical entity-to-store assignments.

Source

pub fn removals(&self) -> &[SchemaRemoval]

Borrow explicit removals.

Source

pub const fn migration(&self) -> Option<&SchemaMigrationPlan>

Borrow the optional coordinated source migration plan.

Source

pub fn digest(&self) -> Result<SchemaProposalDigest, SchemaContractError>

Compute the canonical proposal digest.

§Errors

Returns a typed encoding error if the proposal no longer satisfies the current bounded contract.

Source§

impl SchemaProposal

Source

pub fn entity_source_digest( &self, source: &EntitySourceKey, ) -> Result<EntitySourceDigest, SchemaContractError>

Compute the canonical generated-owned meaning for one current entity.

The digest excludes the declared entity version and migration plan. It includes the complete entity contract, its reachable named-type closure, and the exact target-field contracts referenced by relations.

§Errors

Returns a typed reference or encoding error when the requested entity or one of its current relation/type dependencies is absent.

Source

pub fn entity_source_digest_before_entity_renames( &self, source: &EntitySourceKey, ) -> Result<EntitySourceDigest, SchemaContractError>

Compute source meaning with relation targets mapped to the explicit predecessor entity names in this proposal’s migration plan.

This comparison proof changes only target names, not target fields or reachable type contracts. The planner compares it to accepted lineage to admit a dependency-only transition; it is not runtime schema authority.

§Errors

Returns a typed reference or encoding error for invalid dependencies or colliding predecessor target names.

Trait Implementations§

Source§

impl Clone for SchemaProposal

Source§

fn clone(&self) -> SchemaProposal

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SchemaProposal

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for SchemaProposal

Source§

impl PartialEq for SchemaProposal

Source§

fn eq(&self, other: &SchemaProposal) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SchemaProposal

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.