pub struct ObjectEnvelope {
pub object_type: ObjectType,
pub schema_version: u32,
pub canonical_payload: Vec<u8>,
pub signatures: Vec<Signature>,
}Expand description
Object envelope containing unsigned canonical payload bytes plus external signatures.
Fields§
§object_type: ObjectTypeObject type.
schema_version: u32Schema version.
canonical_payload: Vec<u8>Unsigned canonical payload bytes.
signatures: Vec<Signature>Signatures over the object ID. Signatures are not part of the object ID preimage.
Implementations§
Source§impl ObjectEnvelope
impl ObjectEnvelope
Sourcepub fn unsigned(
object_type: ObjectType,
schema_version: u32,
canonical_payload: Vec<u8>,
) -> Self
pub fn unsigned( object_type: ObjectType, schema_version: u32, canonical_payload: Vec<u8>, ) -> Self
Construct a new unsigned envelope.
Sourcepub fn object_id(&self) -> ObjectId
pub fn object_id(&self) -> ObjectId
Compute this envelope’s object ID from its unsigned payload.
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validate envelope metadata and signatures structurally for legacy decoding.
Sourcepub fn signature_issues(&self) -> Result<SignatureEnvelopeIssues>
pub fn signature_issues(&self) -> Result<SignatureEnvelopeIssues>
Classify signature conditions after structural validation without changing the envelope.
Sourcepub fn validate_strict(&self) -> Result<()>
pub fn validate_strict(&self) -> Result<()>
Validate the envelope for canonical serialization, new writes, and current-format reads.
Sourcepub fn add_signature(&mut self, signature: Signature) -> Result<()>
pub fn add_signature(&mut self, signature: Signature) -> Result<()>
Append a signature without changing the object ID.
Trait Implementations§
Source§impl CanonicalEncode for ObjectEnvelope
impl CanonicalEncode for ObjectEnvelope
Source§fn encode_canonical(&self, writer: &mut CanonicalWriter) -> Result<()>
fn encode_canonical(&self, writer: &mut CanonicalWriter) -> Result<()>
Encode this value into canonical bytes.
Source§impl Clone for ObjectEnvelope
impl Clone for ObjectEnvelope
Source§fn clone(&self) -> ObjectEnvelope
fn clone(&self) -> ObjectEnvelope
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 ObjectEnvelope
impl Debug for ObjectEnvelope
impl Eq for ObjectEnvelope
Source§impl PartialEq for ObjectEnvelope
impl PartialEq for ObjectEnvelope
impl StructuralPartialEq for ObjectEnvelope
Auto Trait Implementations§
impl Freeze for ObjectEnvelope
impl RefUnwindSafe for ObjectEnvelope
impl Send for ObjectEnvelope
impl Sync for ObjectEnvelope
impl Unpin for ObjectEnvelope
impl UnsafeUnpin for ObjectEnvelope
impl UnwindSafe for ObjectEnvelope
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