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<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>, ) -> 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 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 moreSource§impl Debug for SchemaProposal
impl Debug for SchemaProposal
Source§impl<'de> Deserialize<'de> for SchemaProposal
impl<'de> Deserialize<'de> for SchemaProposal
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SchemaProposal, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SchemaProposal, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for SchemaProposal
Source§impl PartialEq for SchemaProposal
impl PartialEq for SchemaProposal
Source§impl Serialize for SchemaProposal
impl Serialize for SchemaProposal
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.