pub struct SyncEnvelopeV1 {
pub schema: String,
pub source_identity: CoreIdentity,
pub message: SyncMessage,
}Expand description
Versioned sync envelope carrying the complete distributed source identity.
Fields§
§schema: StringStable wire schema identifier.
source_identity: CoreIdentityIdentity of the Core that produced the replication batch.
message: SyncMessageReplication message protected by its existing event hash chain.
Implementations§
Source§impl SyncEnvelopeV1
impl SyncEnvelopeV1
Sourcepub fn new(
source_identity: CoreIdentity,
message: SyncMessage,
) -> SyncResult<Self>
pub fn new( source_identity: CoreIdentity, message: SyncMessage, ) -> SyncResult<Self>
Creates a v1 envelope after checking the message/source node binding.
Sourcepub fn validate_for(&self, local_identity: &CoreIdentity) -> SyncResult<()>
pub fn validate_for(&self, local_identity: &CoreIdentity) -> SyncResult<()>
Verifies schema, source binding and compatibility with the receiver.
Trait Implementations§
Source§impl Clone for SyncEnvelopeV1
impl Clone for SyncEnvelopeV1
Source§fn clone(&self) -> SyncEnvelopeV1
fn clone(&self) -> SyncEnvelopeV1
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 SyncEnvelopeV1
impl Debug for SyncEnvelopeV1
Source§impl<'de> Deserialize<'de> for SyncEnvelopeV1
impl<'de> Deserialize<'de> for SyncEnvelopeV1
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 SyncEnvelopeV1
Source§impl PartialEq for SyncEnvelopeV1
impl PartialEq for SyncEnvelopeV1
Source§impl Serialize for SyncEnvelopeV1
impl Serialize for SyncEnvelopeV1
impl StructuralPartialEq for SyncEnvelopeV1
Auto Trait Implementations§
impl Freeze for SyncEnvelopeV1
impl RefUnwindSafe for SyncEnvelopeV1
impl Send for SyncEnvelopeV1
impl Sync for SyncEnvelopeV1
impl Unpin for SyncEnvelopeV1
impl UnsafeUnpin for SyncEnvelopeV1
impl UnwindSafe for SyncEnvelopeV1
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