pub struct SchemaActivation { /* private fields */ }Expand description
The atomic publication marker for a complete staged migration.
Implementations§
Source§impl SchemaActivation
impl SchemaActivation
Sourcepub fn new(
migration_id: MigrationId,
from: SchemaDescriptor,
to: SchemaDescriptor,
staged_records: u64,
staging_digest: BlobHash,
) -> Result<Self, MigrationCodecError>
pub fn new( migration_id: MigrationId, from: SchemaDescriptor, to: SchemaDescriptor, staged_records: u64, staging_digest: BlobHash, ) -> Result<Self, MigrationCodecError>
Validates and constructs an activation marker.
Sourcepub const fn migration_id(&self) -> MigrationId
pub const fn migration_id(&self) -> MigrationId
Returns the migration identifier.
Sourcepub const fn from(&self) -> &SchemaDescriptor
pub const fn from(&self) -> &SchemaDescriptor
Returns the exact predecessor schema.
Sourcepub const fn to(&self) -> &SchemaDescriptor
pub const fn to(&self) -> &SchemaDescriptor
Returns the exact target schema.
Sourcepub const fn staged_records(&self) -> u64
pub const fn staged_records(&self) -> u64
Returns the exact number of selected stage records.
Sourcepub const fn staging_digest(&self) -> BlobHash
pub const fn staging_digest(&self) -> BlobHash
Returns the digest committing to the complete ordered staging set.
Sourcepub fn encode_canonical(&self) -> Vec<u8> ⓘ
pub fn encode_canonical(&self) -> Vec<u8> ⓘ
Encodes the activation into its unique durable representation.
Sourcepub fn decode_canonical(bytes: &[u8]) -> Result<Self, MigrationCodecError>
pub fn decode_canonical(bytes: &[u8]) -> Result<Self, MigrationCodecError>
Strictly decodes one canonical activation.
Trait Implementations§
Source§impl Clone for SchemaActivation
impl Clone for SchemaActivation
Source§fn clone(&self) -> SchemaActivation
fn clone(&self) -> SchemaActivation
Returns a duplicate of the value. Read more
1.0.0 · 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 SchemaActivation
impl Debug for SchemaActivation
Source§impl PartialEq for SchemaActivation
impl PartialEq for SchemaActivation
impl Eq for SchemaActivation
impl StructuralPartialEq for SchemaActivation
Auto Trait Implementations§
impl Freeze for SchemaActivation
impl RefUnwindSafe for SchemaActivation
impl Send for SchemaActivation
impl Sync for SchemaActivation
impl Unpin for SchemaActivation
impl UnwindSafe for SchemaActivation
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