pub struct EncryptedPayload {
pub key_id: String,
pub nonce: String,
pub ciphertext: String,
pub encrypted: bool,
}Expand description
Encrypted payload envelope stored in event.payload
Fields§
§key_id: StringIdentifies which key was used for encryption
nonce: StringBase64-encoded nonce (96-bit for AES-256-GCM)
ciphertext: StringBase64-encoded ciphertext
encrypted: boolMarker to identify encrypted payloads
Implementations§
Source§impl EncryptedPayload
impl EncryptedPayload
Sourcepub fn is_encrypted(value: &Value) -> bool
pub fn is_encrypted(value: &Value) -> bool
Check if a JSON value is an encrypted payload
Trait Implementations§
Source§impl Clone for EncryptedPayload
impl Clone for EncryptedPayload
Source§fn clone(&self) -> EncryptedPayload
fn clone(&self) -> EncryptedPayload
Returns a duplicate of the value. Read more
1.0.0 · 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 EncryptedPayload
impl Debug for EncryptedPayload
Source§impl<'de> Deserialize<'de> for EncryptedPayload
impl<'de> Deserialize<'de> for EncryptedPayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EncryptedPayload
impl RefUnwindSafe for EncryptedPayload
impl Send for EncryptedPayload
impl Sync for EncryptedPayload
impl Unpin for EncryptedPayload
impl UnsafeUnpin for EncryptedPayload
impl UnwindSafe for EncryptedPayload
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