pub trait SynchronizedCertificateStorer: Send + Sync {
// Required methods
fn insert_or_replace_many<'life0, 'async_trait>(
&'life0 self,
certificates: Vec<Certificate>,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_latest_genesis<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StdResult<Option<Certificate>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Define how to store the synchronized certificate and retrieve details about the actual local chain
Required Methods§
Sourcefn insert_or_replace_many<'life0, 'async_trait>(
&'life0 self,
certificates: Vec<Certificate>,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn insert_or_replace_many<'life0, 'async_trait>(
&'life0 self,
certificates: Vec<Certificate>,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Insert a list of Certificates in the database, if some already exists, they will be deleted before inserting
Sourcefn get_latest_genesis<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StdResult<Option<Certificate>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_genesis<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StdResult<Option<Certificate>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the latest genesis Certificate