pub trait BaseGuardianDB: Send + Sync {
type Error: Error + Send + Sync + 'static;
Show 14 methods
// Required methods
fn ipfs(&self) -> Arc<IpfsClient>;
fn identity(&self) -> Arc<Identity>;
fn open<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 str,
options: &'life2 mut CreateDBOptions,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Store<Error = GuardianError>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_store(
&self,
address: &str,
) -> Option<Arc<dyn Store<Error = GuardianError>>>;
fn create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
store_type: &'life2 str,
options: &'life3 mut CreateDBOptions,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Store<Error = GuardianError>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn determine_address<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
store_type: &'life2 str,
options: &'life3 DetermineAddressOptions,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Address>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn register_store_type(
&mut self,
store_type: &str,
constructor: StoreConstructor,
);
fn unregister_store_type(&mut self, store_type: &str);
fn register_access_controller_type(
&mut self,
constructor: AccessControllerConstructor,
) -> Result<(), Self::Error>;
fn unregister_access_controller_type(&mut self, controller_type: &str);
fn get_access_controller_type(
&self,
controller_type: &str,
) -> Option<AccessControllerConstructor>;
fn event_bus(&self) -> EventBus;
fn span(&self) -> &Span;
fn tracer(&self) -> Arc<TracerWrapper>;
}Required Associated Types§
Required Methods§
Sourcefn ipfs(&self) -> Arc<IpfsClient>
fn ipfs(&self) -> Arc<IpfsClient>
Retorna a instância da API do IPFS.
Sourcefn open<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 str,
options: &'life2 mut CreateDBOptions,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Store<Error = GuardianError>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn open<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 str,
options: &'life2 mut CreateDBOptions,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Store<Error = GuardianError>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Cria ou abre uma store com o endereço e opções fornecidos.
Sourcefn get_store(
&self,
address: &str,
) -> Option<Arc<dyn Store<Error = GuardianError>>>
fn get_store( &self, address: &str, ) -> Option<Arc<dyn Store<Error = GuardianError>>>
Retorna uma instância da store se ela já estiver aberta.
Sourcefn create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
store_type: &'life2 str,
options: &'life3 mut CreateDBOptions,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Store<Error = GuardianError>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
store_type: &'life2 str,
options: &'life3 mut CreateDBOptions,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Store<Error = GuardianError>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Cria uma nova store com o nome, tipo e opções fornecidos.
Sourcefn determine_address<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
store_type: &'life2 str,
options: &'life3 DetermineAddressOptions,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Address>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn determine_address<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
store_type: &'life2 str,
options: &'life3 DetermineAddressOptions,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Address>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Determina o endereço de um banco de dados com base nos seus parâmetros.
Sourcefn register_store_type(
&mut self,
store_type: &str,
constructor: StoreConstructor,
)
fn register_store_type( &mut self, store_type: &str, constructor: StoreConstructor, )
Registra um novo tipo de Store.
Sourcefn unregister_store_type(&mut self, store_type: &str)
fn unregister_store_type(&mut self, store_type: &str)
Desregistra um tipo de Store.
Sourcefn register_access_controller_type(
&mut self,
constructor: AccessControllerConstructor,
) -> Result<(), Self::Error>
fn register_access_controller_type( &mut self, constructor: AccessControllerConstructor, ) -> Result<(), Self::Error>
Registra um novo tipo de Access Controller.
Sourcefn unregister_access_controller_type(&mut self, controller_type: &str)
fn unregister_access_controller_type(&mut self, controller_type: &str)
Desregistra um tipo de Access Controller.
Sourcefn get_access_controller_type(
&self,
controller_type: &str,
) -> Option<AccessControllerConstructor>
fn get_access_controller_type( &self, controller_type: &str, ) -> Option<AccessControllerConstructor>
Obtém um construtor de Access Controller pelo seu tipo.
Sourcefn tracer(&self) -> Arc<TracerWrapper>
fn tracer(&self) -> Arc<TracerWrapper>
Retorna o tracer para telemetria.
Implementors§
Source§impl BaseGuardianDB for guardian_db::base_guardian::GuardianDB
Implementação da trait BaseGuardianDB para GuardianDB
impl BaseGuardianDB for guardian_db::base_guardian::GuardianDB
Implementação da trait BaseGuardianDB para GuardianDB