hopr_db_sql::registry

Trait HoprDbRegistryOperations

Source
pub trait HoprDbRegistryOperations {
    // Required methods
    fn set_access_in_network_registry<'a, 'async_trait>(
        &'a self,
        tx: OptTx<'a>,
        address: Address,
        allowed: bool,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait;
    fn is_allowed_in_network_registry<'a, 'async_trait>(
        &'a self,
        tx: OptTx<'a>,
        address: Address,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait;
    fn set_safe_eligibility<'a, 'async_trait>(
        &'a self,
        tx: OptTx<'a>,
        address: Address,
        eligible: bool,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait;
    fn is_safe_eligible<'a, 'async_trait>(
        &'a self,
        tx: OptTx<'a>,
        address: Address,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait;
}
Expand description

Defines DB access API for network registry operations.

Required Methods§

Source

fn set_access_in_network_registry<'a, 'async_trait>( &'a self, tx: OptTx<'a>, address: Address, allowed: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait,

Sets the given node as allowed or denied in network registry.

Source

fn is_allowed_in_network_registry<'a, 'async_trait>( &'a self, tx: OptTx<'a>, address: Address, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait,

Returns true if the given node is allowed in network registry.

Source

fn set_safe_eligibility<'a, 'async_trait>( &'a self, tx: OptTx<'a>, address: Address, eligible: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait,

Sets or unsets Safe NR eligibility.

Source

fn is_safe_eligible<'a, 'async_trait>( &'a self, tx: OptTx<'a>, address: Address, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait,

Returns true if the given Safe is NR eligible.

Implementors§