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<SchemaProposal, 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<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.
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 moreSource§impl Debug for SchemaProposal
impl Debug for SchemaProposal
impl Eq for SchemaProposal
Source§impl PartialEq for SchemaProposal
impl PartialEq for SchemaProposal
impl StructuralPartialEq for SchemaProposal
Auto Trait Implementations§
impl Freeze for SchemaProposal
impl RefUnwindSafe for SchemaProposal
impl Send for SchemaProposal
impl Sync for SchemaProposal
impl Unpin for SchemaProposal
impl UnsafeUnpin for SchemaProposal
impl UnwindSafe for SchemaProposal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.