pub struct OpaqueContentEnvelopeV1 {
pub schema: String,
pub tenant_id: TenantId,
pub sender_instance_id: InstanceId,
pub message_id: String,
pub correlation_id: Option<String>,
pub capability: CapabilityName,
pub content_envelope: Vec<u8>,
pub envelope_version: u16,
pub created_at_ms: u64,
pub expires_at_ms: u64,
pub priority: Option<u8>,
}Expand description
Gateway/sync transport metadata for an opaque encrypted content envelope.
Fields§
§schema: StringStable schema label.
tenant_id: TenantIdTenant routing boundary.
sender_instance_id: InstanceIdRuntime instance that produced this envelope.
message_id: StringIdempotency and deduplication identifier, bounded by
MAX_OPAQUE_MESSAGE_ID_BYTES at validation boundaries.
correlation_id: Option<String>Optional correlation identifier.
capability: CapabilityNameCapability required to consume this envelope.
content_envelope: Vec<u8>Opaque encrypted content envelope, usually DNT bytes.
envelope_version: u16Content-envelope format version, such as DNT envelope version.
created_at_ms: u64Creation timestamp in Unix milliseconds.
expires_at_ms: u64Expiration timestamp in Unix milliseconds.
priority: Option<u8>Optional transport priority. Lower values are higher priority.
Implementations§
Source§impl OpaqueContentEnvelopeV1
impl OpaqueContentEnvelopeV1
Sourcepub fn new(
tenant_id: TenantId,
sender_instance_id: InstanceId,
message_id: impl Into<String>,
correlation_id: Option<String>,
capability: CapabilityName,
content_envelope: Vec<u8>,
envelope_version: u16,
created_at_ms: u64,
expires_at_ms: u64,
priority: Option<u8>,
) -> OpaqueContentEnvelopeV1
pub fn new( tenant_id: TenantId, sender_instance_id: InstanceId, message_id: impl Into<String>, correlation_id: Option<String>, capability: CapabilityName, content_envelope: Vec<u8>, envelope_version: u16, created_at_ms: u64, expires_at_ms: u64, priority: Option<u8>, ) -> OpaqueContentEnvelopeV1
Creates a versioned opaque content envelope.
Sourcepub fn validate_transport(
&self,
policy: &OpaqueEnvelopePolicy,
now_ms: u64,
) -> OpaqueEnvelopeDecision
pub fn validate_transport( &self, policy: &OpaqueEnvelopePolicy, now_ms: u64, ) -> OpaqueEnvelopeDecision
Validates transport metadata without opening the opaque payload.
Trait Implementations§
Source§impl Clone for OpaqueContentEnvelopeV1
impl Clone for OpaqueContentEnvelopeV1
Source§fn clone(&self) -> OpaqueContentEnvelopeV1
fn clone(&self) -> OpaqueContentEnvelopeV1
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 OpaqueContentEnvelopeV1
impl Debug for OpaqueContentEnvelopeV1
Source§impl<'de> Deserialize<'de> for OpaqueContentEnvelopeV1
impl<'de> Deserialize<'de> for OpaqueContentEnvelopeV1
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OpaqueContentEnvelopeV1, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OpaqueContentEnvelopeV1, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OpaqueContentEnvelopeV1
Source§impl PartialEq for OpaqueContentEnvelopeV1
impl PartialEq for OpaqueContentEnvelopeV1
Source§impl Serialize for OpaqueContentEnvelopeV1
impl Serialize for OpaqueContentEnvelopeV1
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for OpaqueContentEnvelopeV1
Auto Trait Implementations§
impl Freeze for OpaqueContentEnvelopeV1
impl RefUnwindSafe for OpaqueContentEnvelopeV1
impl Send for OpaqueContentEnvelopeV1
impl Sync for OpaqueContentEnvelopeV1
impl Unpin for OpaqueContentEnvelopeV1
impl UnsafeUnpin for OpaqueContentEnvelopeV1
impl UnwindSafe for OpaqueContentEnvelopeV1
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