[][src]Trait splinter::service::ServiceNetworkRegistry

pub trait ServiceNetworkRegistry: Send {
    fn connect(
        &self,
        service_id: &str
    ) -> Result<Box<dyn ServiceNetworkSender>, ServiceConnectionError>;
fn disconnect(
        &self,
        service_id: &str
    ) -> Result<(), ServiceDisconnectionError>; }

The ServiceNetworkRegistry trait provides functions to register and unregister the service on the network. It does not expose the circuit membership information directly.

Required methods

fn connect(
    &self,
    service_id: &str
) -> Result<Box<dyn ServiceNetworkSender>, ServiceConnectionError>

fn disconnect(&self, service_id: &str) -> Result<(), ServiceDisconnectionError>

Loading content...

Implementors

impl ServiceNetworkRegistry for StandardServiceNetworkRegistry[src]

fn connect(
    &self,
    service_id: &str
) -> Result<Box<dyn ServiceNetworkSender>, ServiceConnectionError>
[src]

Sends a ServiceConnectRequest for the provided service_id and blocks until the connection response is returned from the splinter node

fn disconnect(&self, service_id: &str) -> Result<(), ServiceDisconnectionError>[src]

Sends a ServiceDisconnectRequest for the provided service_id and blocks until the disconnection response is returned from the splinter node

Loading content...