pub trait SensitiveShape: Sized {
type Encrypted: Clone + Serialize + DeserializeOwned + SurrealValue;
// Required methods
fn encrypt_with_context(
&self,
context: &CryptoContext,
) -> Result<Self::Encrypted, CryptoError>;
fn decrypt_with_context(
encrypted: &Self::Encrypted,
context: &CryptoContext,
) -> Result<Self, CryptoError>;
}Expand description
Recursive runtime seam for supported #[secure] shapes.
Required Associated Types§
Sourcetype Encrypted: Clone + Serialize + DeserializeOwned + SurrealValue
type Encrypted: Clone + Serialize + DeserializeOwned + SurrealValue
Stored representation for this secure shape.
Required Methods§
Sourcefn encrypt_with_context(
&self,
context: &CryptoContext,
) -> Result<Self::Encrypted, CryptoError>
fn encrypt_with_context( &self, context: &CryptoContext, ) -> Result<Self::Encrypted, CryptoError>
Encrypts under an already-resolved effective secure-field context.
Sourcefn decrypt_with_context(
encrypted: &Self::Encrypted,
context: &CryptoContext,
) -> Result<Self, CryptoError>
fn decrypt_with_context( encrypted: &Self::Encrypted, context: &CryptoContext, ) -> Result<Self, CryptoError>
Decrypts under an already-resolved effective secure-field context.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.