pub struct DntHeader {Show 16 fields
pub envelope_version: u16,
pub header_length: u32,
pub flags: u32,
pub algorithm: DntAlgorithm,
pub application_id: ApplicationId,
pub tenant_id: Option<TenantId>,
pub content_type: ContentType,
pub codec_id: CodecId,
pub key_id: KeyId,
pub schema_version: u32,
pub created_at_ms: u64,
pub payload_length: u64,
pub nonce: [u8; 24],
pub payload_hash: [u8; 32],
pub public_metadata: Vec<u8>,
pub encrypted_metadata_length: u32,
}Expand description
Structurally parsed DNT header.
Fields§
§envelope_version: u16Envelope version.
header_length: u32Canonical header length in bytes.
flags: u32Extension flags reserved for future formats.
algorithm: DntAlgorithmAuthenticated encryption algorithm.
application_id: ApplicationIdApplication that owns this envelope.
tenant_id: Option<TenantId>Optional tenant boundary.
content_type: ContentTypeLogical content type.
codec_id: CodecIdPayload codec identifier.
key_id: KeyIdRotation-aware key identifier.
schema_version: u32Payload schema version, independent of envelope version.
created_at_ms: u64Creation timestamp in Unix milliseconds.
payload_length: u64Stored encoded payload length, after any authenticated compression.
nonce: [u8; 24]AEAD nonce.
payload_hash: [u8; 32]Keyed digest of the stored encoded payload.
public_metadata: Vec<u8>Authenticated public metadata bytes.
encrypted_metadata_length: u32Encrypted metadata length stored inside AEAD plaintext.
Implementations§
Source§impl DntHeader
impl DntHeader
Sourcepub fn compression(&self) -> DntCompression
pub fn compression(&self) -> DntCompression
Returns the authenticated payload compression mode.
Trait Implementations§
impl Eq for DntHeader
impl StructuralPartialEq for DntHeader
Auto Trait Implementations§
impl Freeze for DntHeader
impl RefUnwindSafe for DntHeader
impl Send for DntHeader
impl Sync for DntHeader
impl Unpin for DntHeader
impl UnsafeUnpin for DntHeader
impl UnwindSafe for DntHeader
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