Trait NetworkRepository

Source
pub trait NetworkRepository: Repository<NetworkRepoModel, String> {
    // Required methods
    fn get_by_name<'life0, 'life1, 'async_trait>(
        &'life0 self,
        network_type: NetworkType,
        name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<NetworkRepoModel>, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_by_chain_id<'life0, 'async_trait>(
        &'life0 self,
        network_type: NetworkType,
        chain_id: u64,
    ) -> Pin<Box<dyn Future<Output = Result<Option<NetworkRepoModel>, RepositoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn get_by_name<'life0, 'life1, 'async_trait>( &'life0 self, network_type: NetworkType, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<NetworkRepoModel>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a network by network type and name

Source

fn get_by_chain_id<'life0, 'async_trait>( &'life0 self, network_type: NetworkType, chain_id: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<NetworkRepoModel>, RepositoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a network by network type and chain ID

Implementors§