client: expose creating RpcClients with custom RpcSender impls
				
					
				
			This commit is contained in:
		
				
					committed by
					
						
						mergify[bot]
					
				
			
			
				
	
			
			
			
						parent
						
							f0a235d16f
						
					
				
				
					commit
					6666f23c01
				
			@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
@@ -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,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user