Skip to main content

DataStoreFactory

Trait DataStoreFactory 

Source
pub trait DataStoreFactory {
    type Error: Debug;
    type AccountId: Debug + ConditionallySelectable + Default + Hash + Eq + Send + Sync + 'static;
    type Account: Account<AccountId = Self::AccountId> + Clone;
    type DsError: Debug;
    type DataStore: InputSource<AccountId = Self::AccountId, Error = Self::DsError> + WalletRead<AccountId = Self::AccountId, Account = Self::Account, Error = Self::DsError> + WalletTest + WalletWrite + WalletCommitmentTrees;

    // Required method
    fn new_data_store(
        &self,
        network: LocalNetwork,
        anchor_retention_interval: Option<AnchorRetentionInterval>,
        gap_limits: Option<GapLimits>,
    ) -> Result<Self::DataStore, Self::Error>;
}
Available on crate features test-dependencies only.
Expand description

Trait representing the ability to construct a new data store for use in a test.

Required Associated Types§

Source

type Error: Debug

Source

type AccountId: Debug + ConditionallySelectable + Default + Hash + Eq + Send + Sync + 'static

Source

type Account: Account<AccountId = Self::AccountId> + Clone

Source

type DsError: Debug

Source

type DataStore: InputSource<AccountId = Self::AccountId, Error = Self::DsError> + WalletRead<AccountId = Self::AccountId, Account = Self::Account, Error = Self::DsError> + WalletTest + WalletWrite + WalletCommitmentTrees

Required Methods§

Source

fn new_data_store( &self, network: LocalNetwork, anchor_retention_interval: Option<AnchorRetentionInterval>, gap_limits: Option<GapLimits>, ) -> Result<Self::DataStore, Self::Error>

Available on crate feature transparent-inputs only.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§