pub trait ShieldedUtils:
Sized
+ BorshDeserialize
+ BorshSerialize
+ Default
+ Clone {
// Required methods
fn local_tx_prover(&self) -> LocalTxProver;
fn load<'life0, 'life1, 'async_trait, U>(
&'life0 self,
ctx: &'life1 mut ShieldedWallet<U>,
force_confirmed: bool,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
U: 'async_trait + ShieldedUtils + MaybeSend,
Self: 'async_trait;
fn save<'a, 'async_trait, U>(
&'a self,
ctx: VersionedWalletRef<'a, U>,
sync_status: ContextSyncStatus,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where 'a: 'async_trait,
U: 'async_trait + ShieldedUtils + MaybeSync,
Self: 'async_trait;
fn cache_save<'life0, 'life1, 'async_trait>(
&'life0 self,
_cache: &'life1 DispatcherCache,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn cache_load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DispatcherCache, Error>> + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Abstracts platform specific details away from the logic of shielded pool operations.
Required Methods§
Sourcefn local_tx_prover(&self) -> LocalTxProver
fn local_tx_prover(&self) -> LocalTxProver
Get a MASP transaction prover
Sourcefn load<'life0, 'life1, 'async_trait, U>(
&'life0 self,
ctx: &'life1 mut ShieldedWallet<U>,
force_confirmed: bool,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
U: 'async_trait + ShieldedUtils + MaybeSend,
Self: 'async_trait,
fn load<'life0, 'life1, 'async_trait, U>(
&'life0 self,
ctx: &'life1 mut ShieldedWallet<U>,
force_confirmed: bool,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
U: 'async_trait + ShieldedUtils + MaybeSend,
Self: 'async_trait,
Load up the currently saved ShieldedContext
Sourcefn save<'a, 'async_trait, U>(
&'a self,
ctx: VersionedWalletRef<'a, U>,
sync_status: ContextSyncStatus,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'a: 'async_trait,
U: 'async_trait + ShieldedUtils + MaybeSync,
Self: 'async_trait,
fn save<'a, 'async_trait, U>(
&'a self,
ctx: VersionedWalletRef<'a, U>,
sync_status: ContextSyncStatus,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'a: 'async_trait,
U: 'async_trait + ShieldedUtils + MaybeSync,
Self: 'async_trait,
Save the given ShieldedContext for future loads
Sourcefn cache_save<'life0, 'life1, 'async_trait>(
&'life0 self,
_cache: &'life1 DispatcherCache,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn cache_save<'life0, 'life1, 'async_trait>(
&'life0 self,
_cache: &'life1 DispatcherCache,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Save a cache of data as part of shielded sync if that process gets interrupted.
Sourcefn cache_load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DispatcherCache, Error>> + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn cache_load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DispatcherCache, Error>> + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Load a cache of data as part of shielded sync if that process gets interrupted.
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.