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>,
) -> 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>, ) -> 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 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.
Trait Implementations§
Source§impl CandidType for SchemaProposal
impl CandidType for SchemaProposal
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