pub struct DynamicMappingProposalV1 {
pub format_version: u16,
pub collection_index_ref: CollectionIndexRef,
pub base_generation: SchemaGeneration,
pub field_path: String,
pub first_non_null_candidate: MappingScalar,
pub proposed_type: DynamicProposedTypeV1,
pub proposal_digest: u64,
}Expand description
Canonical proposal-v1 identity frozen by EC4. Attempt fencing is supplied out of band by the coordinated command and is deliberately not serialized here.
Fields§
§format_version: u16§collection_index_ref: CollectionIndexRef§base_generation: SchemaGeneration§field_path: String§first_non_null_candidate: MappingScalar§proposed_type: DynamicProposedTypeV1§proposal_digest: u64Implementations§
Source§impl DynamicMappingProposalV1
impl DynamicMappingProposalV1
pub fn new( collection_index_ref: CollectionIndexRef, base_generation: SchemaGeneration, field_path: String, first_non_null_candidate: MappingScalar, ) -> Result<Self, DynamicMappingProposalError>
pub fn exact_digest(&self) -> Result<u64, DynamicMappingProposalError>
pub fn validate(&self) -> Result<(), DynamicMappingProposalError>
Sourcepub fn matches_successor(
&self,
predecessor: &Mapping,
successor: &Mapping,
) -> bool
pub fn matches_successor( &self, predecessor: &Mapping, successor: &Mapping, ) -> bool
Verifies that successor is exactly the one-field (or text plus
generated keyword child) additive delta described by this proposal.
pub fn encode_canonical(&self) -> Result<Vec<u8>, DynamicMappingProposalError>
pub fn decode_canonical( bytes: &[u8], ) -> Result<Self, DynamicMappingProposalError>
Trait Implementations§
Source§impl Clone for DynamicMappingProposalV1
impl Clone for DynamicMappingProposalV1
Source§impl Debug for DynamicMappingProposalV1
impl Debug for DynamicMappingProposalV1
Source§impl<'de> Deserialize<'de> for DynamicMappingProposalV1
impl<'de> Deserialize<'de> for DynamicMappingProposalV1
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
impl Eq for DynamicMappingProposalV1
Source§impl PartialEq for DynamicMappingProposalV1
impl PartialEq for DynamicMappingProposalV1
Source§impl Serialize for DynamicMappingProposalV1
impl Serialize for DynamicMappingProposalV1
impl StructuralPartialEq for DynamicMappingProposalV1
Auto Trait Implementations§
impl Freeze for DynamicMappingProposalV1
impl RefUnwindSafe for DynamicMappingProposalV1
impl Send for DynamicMappingProposalV1
impl Sync for DynamicMappingProposalV1
impl Unpin for DynamicMappingProposalV1
impl UnsafeUnpin for DynamicMappingProposalV1
impl UnwindSafe for DynamicMappingProposalV1
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