#[non_exhaustive]pub struct SecretEncryptedData;Expand description
Encrypted data for a secret storage encryption algorithm.
This type cannot be constructed, it is only used for its semantic value and is meant to be used
with the Raw::cast() and Raw::deserialize_as() APIs.
It can be cast to or from the following types:
Convenience methods are also available for casting encrypted data from or to known compatible types.
Implementations§
Source§impl SecretEncryptedData
impl SecretEncryptedData
Sourcepub fn new<T: JsonCastable<Self>>(encrypted_data: Raw<T>) -> Raw<Self>
pub fn new<T: JsonCastable<Self>>(encrypted_data: Raw<T>) -> Raw<Self>
Construct a Raw<SecretEncryptedData> by casting the given serialized encrypted data.
Sourcepub fn serialize<T: Serialize + JsonCastable<Self>>(
encrypted_data: &T,
) -> Result<Raw<Self>, Error>
pub fn serialize<T: Serialize + JsonCastable<Self>>( encrypted_data: &T, ) -> Result<Raw<Self>, Error>
Serialize the given encrypted data as a Raw<SecretEncryptedData>.
Sourcepub fn deserialize_as_aes_hmac_sha2(
encrypted_data: &Raw<Self>,
) -> Result<AesHmacSha2EncryptedData, Error>
pub fn deserialize_as_aes_hmac_sha2( encrypted_data: &Raw<Self>, ) -> Result<AesHmacSha2EncryptedData, Error>
Deserialize the given data encrypted with the m.secret_storage.v1.aes-hmac-sha2 algorithm.
Trait Implementations§
impl JsonCastable<AesHmacSha2EncryptedData> for SecretEncryptedData
impl JsonCastable<SecretEncryptedData> for AesHmacSha2EncryptedData
Auto Trait Implementations§
impl Freeze for SecretEncryptedData
impl RefUnwindSafe for SecretEncryptedData
impl Send for SecretEncryptedData
impl Sync for SecretEncryptedData
impl Unpin for SecretEncryptedData
impl UnsafeUnpin for SecretEncryptedData
impl UnwindSafe for SecretEncryptedData
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
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more