pub struct SchemaProposal { /* private fields */ }Expand description
Canonical current-form database-scoped proposal.
Implementations§
Source§impl SchemaProposal
impl SchemaProposal
Sourcepub 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<Self, SchemaContractError>
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<Self, 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.
Sourcepub const fn version(&self) -> ProposalContractVersion
pub const fn version(&self) -> ProposalContractVersion
Return the contract version.
Sourcepub fn capabilities(&self) -> &[SchemaCapability]
pub fn capabilities(&self) -> &[SchemaCapability]
Borrow required capabilities in canonical order.
Sourcepub const fn target_database(&self) -> TargetDatabaseIdentity
pub const fn target_database(&self) -> TargetDatabaseIdentity
Return the target database identity.
Sourcepub const fn submission_key(&self) -> &SchemaSubmissionKey
pub const fn submission_key(&self) -> &SchemaSubmissionKey
Borrow the submission key.
Sourcepub const fn expected_head(&self) -> &ExpectedAcceptedHead
pub const fn expected_head(&self) -> &ExpectedAcceptedHead
Borrow the optimistic accepted-head condition.
Sourcepub fn fragments(&self) -> &[SchemaFragment]
pub fn fragments(&self) -> &[SchemaFragment]
Borrow reusable fragments.
Sourcepub fn assignments(&self) -> &[EntityStoreAssignment]
pub fn assignments(&self) -> &[EntityStoreAssignment]
Borrow canonical entity-to-store assignments.
Sourcepub fn removals(&self) -> &[SchemaRemoval]
pub fn removals(&self) -> &[SchemaRemoval]
Borrow explicit removals.
Sourcepub const fn migration(&self) -> Option<&SchemaMigrationPlan>
pub const fn migration(&self) -> Option<&SchemaMigrationPlan>
Borrow the optional coordinated source migration plan.
Sourcepub fn digest(&self) -> Result<SchemaProposalDigest, SchemaContractError>
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
impl SchemaProposal
Sourcepub fn entity_source_digest(
&self,
source: &EntitySourceKey,
) -> Result<EntitySourceDigest, SchemaContractError>
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.
Trait Implementations§
Source§impl Clone for SchemaProposal
impl Clone for SchemaProposal
Source§fn clone(&self) -> SchemaProposal
fn clone(&self) -> SchemaProposal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more