Skip to main content

MeshDialer

Trait MeshDialer 

Source
pub trait MeshDialer:
    Send
    + Sync
    + 'static {
    // Required methods
    fn standing(&self, node_id: &str) -> Option<Grant>;
    fn dial<'life0, 'life1, 'async_trait>(
        &'life0 self,
        node_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn MeshStream>, ProxyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn is_admitted(&self, node_id: &str) -> bool { ... }
}
Expand description

The mesh side of the proxy. The implementation is the only authority on who is admitted: dial must return a stream only to a peer that passed admission and whose id was verified against the connection (an authenticated Noise channel), never to an address a client named.

Required Methods§

Source

fn standing(&self, node_id: &str) -> Option<Grant>

The admission grant of the connected peer node_id, if any.

Source

fn dial<'life0, 'life1, 'async_trait>( &'life0 self, node_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn MeshStream>, ProxyError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

An authenticated stream to the peer.

Provided Methods§

Source

fn is_admitted(&self, node_id: &str) -> bool

Whether node_id is an enforced-admission full node with a trusted scope right now.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§