Trait RelayerRepository

Source
pub trait RelayerRepository:
    Repository<RelayerRepoModel, String>
    + Send
    + Sync {
    // Required methods
    fn list_active<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<RelayerRepoModel>, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_by_signer_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        signer_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<RelayerRepoModel>, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list_by_notification_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        notification_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<RelayerRepoModel>, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn partial_update<'life0, 'async_trait>(
        &'life0 self,
        id: String,
        update: UpdateRelayerRequest,
    ) -> Pin<Box<dyn Future<Output = Result<RelayerRepoModel, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn enable_relayer<'life0, 'async_trait>(
        &'life0 self,
        relayer_id: String,
    ) -> Pin<Box<dyn Future<Output = Result<RelayerRepoModel, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn disable_relayer<'life0, 'async_trait>(
        &'life0 self,
        relayer_id: String,
        reason: DisabledReason,
    ) -> Pin<Box<dyn Future<Output = Result<RelayerRepoModel, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_policy<'life0, 'async_trait>(
        &'life0 self,
        id: String,
        policy: RelayerNetworkPolicy,
    ) -> Pin<Box<dyn Future<Output = Result<RelayerRepoModel, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_persistent_storage(&self) -> bool;

    // Provided method
    fn connection_info(&self) -> Option<(Arc<Pool>, String)> { ... }
}

Required Methods§

Source

fn list_active<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<RelayerRepoModel>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_by_signer_id<'life0, 'life1, 'async_trait>( &'life0 self, signer_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<RelayerRepoModel>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn list_by_notification_id<'life0, 'life1, 'async_trait>( &'life0 self, notification_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<RelayerRepoModel>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn partial_update<'life0, 'async_trait>( &'life0 self, id: String, update: UpdateRelayerRequest, ) -> Pin<Box<dyn Future<Output = Result<RelayerRepoModel, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn enable_relayer<'life0, 'async_trait>( &'life0 self, relayer_id: String, ) -> Pin<Box<dyn Future<Output = Result<RelayerRepoModel, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn disable_relayer<'life0, 'async_trait>( &'life0 self, relayer_id: String, reason: DisabledReason, ) -> Pin<Box<dyn Future<Output = Result<RelayerRepoModel, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn update_policy<'life0, 'async_trait>( &'life0 self, id: String, policy: RelayerNetworkPolicy, ) -> Pin<Box<dyn Future<Output = Result<RelayerRepoModel, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn is_persistent_storage(&self) -> bool

Returns true if this repository uses persistent storage (e.g., Redis). Returns false for in-memory storage.

Provided Methods§

Source

fn connection_info(&self) -> Option<(Arc<Pool>, String)>

Returns connection info for distributed operations.

This method provides access to the underlying connection and key prefix when using persistent storage. This is useful for distributed locking and other coordination operations that need direct storage access.

§Returns
  • Some((pool, prefix)) - If using persistent storage (e.g., Redis)
  • None - If using in-memory storage (default)

Implementors§