Trait jsonrpc_client_http::ClientCreator [−][src]
pub trait ClientCreator: Send + 'static { type Connect: Connect; type Error: Error + Send; fn create(
&self,
handle: &Handle
) -> Result<Client<Self::Connect, Body>, Self::Error>; }
Trait for types able to produce Hyper Client
s for use in HttpTransport
.
Associated Types
type Connect: Connect
The connector type inside the Client
created by this type.
type Error: Error + Send
The error emitted by this type in case creating the Client
failed.
Required Methods
fn create(
&self,
handle: &Handle
) -> Result<Client<Self::Connect, Body>, Self::Error>
&self,
handle: &Handle
) -> Result<Client<Self::Connect, Body>, Self::Error>
Tries to create a Hyper Client
based on the given Tokio Handle
.