client: expose creating `RpcClient`s with custom `RpcSender` impls

This commit is contained in:
Trent Nelson 2022-02-28 11:49:37 -07:00 committed by mergify[bot]
parent f0a235d16f
commit 6666f23c01
2 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ impl RpcClient {
/// `RpcSender`. Most applications should use one of the other constructors,
/// such as [`new`] and [`new_mock`], which create an `RpcClient`
/// encapsulating an [`HttpSender`] and [`MockSender`] respectively.
fn new_sender<T: RpcSender + Send + Sync + 'static>(
pub fn new_sender<T: RpcSender + Send + Sync + 'static>(
sender: T,
config: RpcClientConfig,
) -> Self {

View File

@ -29,7 +29,7 @@ pub struct RpcTransportStats {
/// [`HttpSender`]: crate::http_sender::HttpSender
/// [`MockSender`]: crate::mock_sender::MockSender
#[async_trait]
pub(crate) trait RpcSender {
pub trait RpcSender {
async fn send(
&self,
request: RpcRequest,