/// Opens the associated implementation of [Consensus].
Opens the associated implementation of [Consensus].
Opens the associated implementation of [ Consensus ] .
pub async fn open(self) -> Result<Arc<dyn Consensus + Send + Sync>, ExternalError> {
        match self {
            ConsensusConfig::Sqlite(config) => SqliteConsensus::open(config)
                .await
                .map(|x| Arc::new(x) as Arc<dyn Consensus + Send + Sync>),
            ConsensusConfig::Postgres(config) => PostgresConsensus::open(config)
                .await
                .map(|x| Arc::new(x) as Arc<dyn Consensus + Send + Sync>),
        }
    }
pub async fn open ( self ) -> Result < Arc < dyn Consensus + Send + Sync > , ExternalError > { match self { ConsensusConfig :: Sqlite ( config ) => SqliteConsensus :: open ( config ) . await . map ( | x | Arc :: new ( x ) as Arc < dyn Consensus + Send + Sync > ) , ConsensusConfig :: Postgres ( config ) => PostgresConsensus :: open ( config ) . await . map ( | x | Arc :: new ( x ) as Arc < dyn Consensus + Send + Sync > ) , } }
Opens the associated implementation of [Consensus].
Opens the associated implementation of [ Consensus ] .
self