Struct SecretEncryptedData
#[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§
§impl SecretEncryptedData
impl SecretEncryptedData
pub fn new<T>(encrypted_data: Raw<T>) -> Raw<SecretEncryptedData>where
T: JsonCastable<SecretEncryptedData>,
pub fn new<T>(encrypted_data: Raw<T>) -> Raw<SecretEncryptedData>where
T: JsonCastable<SecretEncryptedData>,
Construct a Raw<SecretEncryptedData> by casting the given serialized encrypted data.
pub fn serialize<T>(
encrypted_data: &T,
) -> Result<Raw<SecretEncryptedData>, Error>where
T: Serialize + JsonCastable<SecretEncryptedData>,
pub fn serialize<T>(
encrypted_data: &T,
) -> Result<Raw<SecretEncryptedData>, Error>where
T: Serialize + JsonCastable<SecretEncryptedData>,
Serialize the given encrypted data as a Raw<SecretEncryptedData>.
pub fn deserialize_as_aes_hmac_sha2(
encrypted_data: &Raw<SecretEncryptedData>,
) -> Result<AesHmacSha2EncryptedData, Error>
pub fn deserialize_as_aes_hmac_sha2( encrypted_data: &Raw<SecretEncryptedData>, ) -> 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<AesHmacSha2EncryptedData> for SecretEncryptedData
impl JsonCastable<SecretEncryptedData> for AesHmacSha2EncryptedData
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> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more