pub struct SchemaDelta { /* private fields */ }Expand description
One immutable ordered patch between two exact managed schema states.
Implementations§
Source§impl SchemaDelta
impl SchemaDelta
Sourcepub fn new(
format: PatchFormatVersion,
source: ManagedSchemaState,
target: ManagedSchemaState,
operations: Vec<SchemaOperation>,
) -> Result<Self, Diagnostic>
pub fn new( format: PatchFormatVersion, source: ManagedSchemaState, target: ManagedSchemaState, operations: Vec<SchemaOperation>, ) -> Result<Self, Diagnostic>
Validate a complete managed-state transition and derive its capabilities.
Sourcepub const fn format(&self) -> PatchFormatVersion
pub const fn format(&self) -> PatchFormatVersion
Return the schema-patch format.
Sourcepub const fn source(&self) -> &ManagedSchemaState
pub const fn source(&self) -> &ManagedSchemaState
Return the exact source-state precondition.
Sourcepub const fn target(&self) -> &ManagedSchemaState
pub const fn target(&self) -> &ManagedSchemaState
Return the exact target state.
Sourcepub fn operations(&self) -> &[SchemaOperation]
pub fn operations(&self) -> &[SchemaOperation]
Return operations in caller-preserved transition order.
Sourcepub const fn required_capabilities(&self) -> &CapabilitySet
pub const fn required_capabilities(&self) -> &CapabilitySet
Return capabilities derived from both states and the transition table.
Sourcepub fn canonical_bytes(&self) -> Result<Vec<u8>, Diagnostic>
pub fn canonical_bytes(&self) -> Result<Vec<u8>, Diagnostic>
Encode this trusted delta as exact canonical JSON.
Trait Implementations§
Source§impl Clone for SchemaDelta
impl Clone for SchemaDelta
Source§fn clone(&self) -> SchemaDelta
fn clone(&self) -> SchemaDelta
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchemaDelta
impl Debug for SchemaDelta
impl Eq for SchemaDelta
Source§impl PartialEq for SchemaDelta
impl PartialEq for SchemaDelta
Source§impl Serialize for SchemaDelta
impl Serialize for SchemaDelta
impl StructuralPartialEq for SchemaDelta
Auto Trait Implementations§
impl Freeze for SchemaDelta
impl RefUnwindSafe for SchemaDelta
impl Send for SchemaDelta
impl Sync for SchemaDelta
impl Unpin for SchemaDelta
impl UnsafeUnpin for SchemaDelta
impl UnwindSafe for SchemaDelta
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
Mutably borrows from an owned value. Read more