pub trait BlockchainConnector {
    type ErrorType: Error + Send + Sync + 'static;

    // Required methods
    fn new(url: &str) -> Result<Self, Self::ErrorType>
       where Self: Sized;
    fn url(&self) -> &str;

    // Provided method
    fn builder() -> BlockchainConnectorBuilder<Self>
       where Self: Sized + Clone + BlockchainConnector { ... }
}
Expand description

Used to connect to a blockchain and send and receive information to and from the blockchain.

Required Associated Types§

source

type ErrorType: Error + Send + Sync + 'static

The type of error that is returned by the BlockchainConnector.

Required Methods§

source

fn new(url: &str) -> Result<Self, Self::ErrorType>where Self: Sized,

Creates a new BlockchainConnector with a given url.

source

fn url(&self) -> &str

Returns the url endpoint associated with the BlockchainConnector.

Provided Methods§

source

fn builder() -> BlockchainConnectorBuilder<Self>where Self: Sized + Clone + BlockchainConnector,

Returns the builder that can be used to build a BlockchainConnector with custom options.

Implementors§