pub trait WalletAPI {
// Required methods
fn encrypt(
&self,
data: Vec<u8>,
nonce: impl Into<Nonce>,
private_key: &SecretKey,
) -> Result<Vec<u8>, Error>;
fn decrypt(
&self,
data: Vec<u8>,
nonce: impl Into<Nonce>,
private_key: &SecretKey,
) -> Result<Vec<u8>, Error>;
}Required Methods§
fn encrypt( &self, data: Vec<u8>, nonce: impl Into<Nonce>, private_key: &SecretKey, ) -> Result<Vec<u8>, Error>
fn decrypt( &self, data: Vec<u8>, nonce: impl Into<Nonce>, private_key: &SecretKey, ) -> Result<Vec<u8>, Error>
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.