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, 'life0, 'async_trait, T>(
        &'a self,
        tx: OptTx<'a>,
        address_like: &'life0 T,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Address: TryFrom<T>,
             T: Clone + Sync + 'async_trait,
             Self: 'async_trait,
             'a: 'async_trait,
             'life0: '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, 'life0, 'async_trait, T>( &'a self, tx: OptTx<'a>, address_like: &'life0 T, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Address: TryFrom<T>, T: Clone + Sync + 'async_trait, Self: 'async_trait, 'a: 'async_trait, 'life0: '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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§