pub struct DntSealOptions {
pub application_id: ApplicationId,
pub tenant_id: Option<TenantId>,
pub content_type: ContentType,
pub schema_version: u32,
pub key_id: KeyId,
pub created_at_ms: u64,
pub public_metadata: Vec<u8>,
pub encrypted_metadata: Vec<u8>,
pub flags: u32,
pub max_payload_bytes: Option<u64>,
}Expand description
Options used when sealing a payload.
Fields§
§application_id: ApplicationIdApplication that owns the envelope.
tenant_id: Option<TenantId>Optional tenant boundary.
content_type: ContentTypeLogical content type.
schema_version: u32Payload schema version.
key_id: KeyIdRotation-aware key identifier.
created_at_ms: u64Creation timestamp in Unix milliseconds.
public_metadata: Vec<u8>Authenticated public metadata.
encrypted_metadata: Vec<u8>Metadata stored inside the encrypted plaintext.
flags: u32Reserved flags for future envelope behavior.
max_payload_bytes: Option<u64>Optional maximum encoded payload size.
Implementations§
Source§impl DntSealOptions
impl DntSealOptions
Sourcepub fn compact_payload(self) -> Self
pub fn compact_payload(self) -> Self
Enables compact payload storage for this write.
The codec output is compressed with zlib-wrapped DEFLATE before AEAD encryption. The compression flag is part of the authenticated header.
Sourcepub fn with_user_flag(self, index: u8) -> DntResult<Self>
pub fn with_user_flag(self, index: u8) -> DntResult<Self>
Adds one caller-owned user flag by relative index 0..16.
Trait Implementations§
Source§impl Clone for DntSealOptions
impl Clone for DntSealOptions
Source§fn clone(&self) -> DntSealOptions
fn clone(&self) -> DntSealOptions
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 DntSealOptions
impl Debug for DntSealOptions
impl Eq for DntSealOptions
Source§impl PartialEq for DntSealOptions
impl PartialEq for DntSealOptions
impl StructuralPartialEq for DntSealOptions
Auto Trait Implementations§
impl Freeze for DntSealOptions
impl RefUnwindSafe for DntSealOptions
impl Send for DntSealOptions
impl Sync for DntSealOptions
impl Unpin for DntSealOptions
impl UnsafeUnpin for DntSealOptions
impl UnwindSafe for DntSealOptions
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