pub trait WalletManager:
Send
+ Sync
+ Clone {
// Required methods
fn get_wallet(
&self,
user_id: &str,
) -> Pin<Box<dyn Future<Output = Result<Wallet, String>> + Send + Sync>>;
fn get_wallets(
&self,
user_id: &str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Wallet>, String>> + Send + Sync>>;
fn create_wallet(
&self,
user_id: &str,
) -> Pin<Box<dyn Future<Output = Result<Wallet, String>> + Send + Sync>>;
}Required Methods§
fn get_wallet( &self, user_id: &str, ) -> Pin<Box<dyn Future<Output = Result<Wallet, String>> + Send + Sync>>
fn get_wallets( &self, user_id: &str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Wallet>, String>> + Send + Sync>>
fn create_wallet( &self, user_id: &str, ) -> Pin<Box<dyn Future<Output = Result<Wallet, String>> + Send + Sync>>
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.