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>, ) -> 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 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

Source§

fn _ty() -> Type

Source§

fn _ty_doc() -> TypeDoc

Source§

fn id() -> TypeId

Source§

fn idl_serialize<__S>( &self, __serializer: __S, ) -> Result<(), <__S as Serializer>::Error>
where __S: Serializer,

Source§

fn ty() -> Type

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<'de> Deserialize<'de> for SchemaProposal

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<SchemaProposal, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. 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 Serialize for SchemaProposal

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.