pub struct SchemaMetadataRecord { /* private fields */ }Expand description
SchemaMetadataRecord
Schema metadata observed in one committed generation.
Schema metadata is diagnostic ledger history. It is validated for bounded
durable encoding, but ic-memory does not prove application schema
compatibility or data migration correctness.
Implementations§
Source§impl SchemaMetadataRecord
impl SchemaMetadataRecord
Sourcepub fn new(
generation: u64,
schema: SchemaMetadata,
) -> Result<Self, SchemaMetadataError>
pub fn new( generation: u64, schema: SchemaMetadata, ) -> Result<Self, SchemaMetadataError>
Build a schema metadata history record after validating the metadata.
Sourcepub const fn generation(&self) -> u64
pub const fn generation(&self) -> u64
Return the generation that declared this schema metadata.
Sourcepub const fn schema(&self) -> &SchemaMetadata
pub const fn schema(&self) -> &SchemaMetadata
Return the schema metadata declared by that generation.
Trait Implementations§
Source§impl Clone for SchemaMetadataRecord
impl Clone for SchemaMetadataRecord
Source§fn clone(&self) -> SchemaMetadataRecord
fn clone(&self) -> SchemaMetadataRecord
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 SchemaMetadataRecord
impl Debug for SchemaMetadataRecord
Source§impl<'de> Deserialize<'de> for SchemaMetadataRecord
impl<'de> Deserialize<'de> for SchemaMetadataRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SchemaMetadataRecord
impl PartialEq for SchemaMetadataRecord
Source§fn eq(&self, other: &SchemaMetadataRecord) -> bool
fn eq(&self, other: &SchemaMetadataRecord) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SchemaMetadataRecord
impl Serialize for SchemaMetadataRecord
impl Eq for SchemaMetadataRecord
impl StructuralPartialEq for SchemaMetadataRecord
Auto Trait Implementations§
impl Freeze for SchemaMetadataRecord
impl RefUnwindSafe for SchemaMetadataRecord
impl Send for SchemaMetadataRecord
impl Sync for SchemaMetadataRecord
impl Unpin for SchemaMetadataRecord
impl UnsafeUnpin for SchemaMetadataRecord
impl UnwindSafe for SchemaMetadataRecord
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