pub struct PayloadEnvelope {
pub cipher: i32,
pub key_id: String,
pub data: Vec<u8>,
pub compression: i32,
pub metadata: HashMap<String, Vec<u8>>,
}Expand description
An SDK-encrypted Value, stored as EncodedObject.payload with encoding “dex/1”. The Server never reads it.
Fields§
§cipher: i32The algorithm that produced data.
key_id: StringThe key that encrypted data. Visible in clear; 1 to 64 bytes, each 0x21 to 0x7e.
data: Vec<u8>For PAYLOAD_CIPHER_AES256_GCM: nonce, then ciphertext, then tag.
compression: i32The compression applied before encryption.
metadata: HashMap<String, Vec<u8>>Custom codec parameters; the codec must authenticate or reject them. Empty for PAYLOAD_CIPHER_AES256_GCM.
Implementations§
Source§impl PayloadEnvelope
impl PayloadEnvelope
Sourcepub fn cipher(&self) -> PayloadCipher
pub fn cipher(&self) -> PayloadCipher
Returns the enum value of cipher, or the default if the field is set to an invalid enum value.
Sourcepub fn set_cipher(&mut self, value: PayloadCipher)
pub fn set_cipher(&mut self, value: PayloadCipher)
Sets cipher to the provided enum value.
Sourcepub fn compression(&self) -> PayloadCompression
pub fn compression(&self) -> PayloadCompression
Returns the enum value of compression, or the default if the field is set to an invalid enum value.
Sourcepub fn set_compression(&mut self, value: PayloadCompression)
pub fn set_compression(&mut self, value: PayloadCompression)
Sets compression to the provided enum value.
Trait Implementations§
Source§impl Clone for PayloadEnvelope
impl Clone for PayloadEnvelope
Source§impl Debug for PayloadEnvelope
impl Debug for PayloadEnvelope
Source§impl Default for PayloadEnvelope
impl Default for PayloadEnvelope
Source§impl Message for PayloadEnvelope
impl Message for PayloadEnvelope
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for PayloadEnvelope
impl PartialEq for PayloadEnvelope
impl StructuralPartialEq for PayloadEnvelope
Auto Trait Implementations§
impl Forget for PayloadEnvelope
impl Freeze for PayloadEnvelope
impl Move for PayloadEnvelope
impl RefUnwindSafe for PayloadEnvelope
impl Send for PayloadEnvelope
impl Sync for PayloadEnvelope
impl Unpin for PayloadEnvelope
impl UnsafeUnpin for PayloadEnvelope
impl UnwindSafe for PayloadEnvelope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request