diff --git a/src/rpc/client/blobs.rs b/src/rpc/client/blobs.rs index 633034c8..e5f5acee 100644 --- a/src/rpc/client/blobs.rs +++ b/src/rpc/client/blobs.rs @@ -74,6 +74,7 @@ use iroh::NodeAddr; use portable_atomic::{AtomicU64, Ordering}; use quic_rpc::{ client::{BoxStreamSync, BoxedConnector}, + transport::boxed::BoxableConnector, Connector, RpcClient, }; use serde::{Deserialize, Serialize}; @@ -87,7 +88,7 @@ use crate::{ format::collection::{Collection, SimpleStore}, get::db::DownloadProgress as BytesDownloadProgress, net_protocol::BlobDownloadRequest, - rpc::proto::RpcService, + rpc::proto::{Request, Response, RpcService}, store::{BaoBlobSize, ConsistencyCheckProgress, ExportFormat, ExportMode, ValidateProgress}, util::SetTagOption, BlobFormat, Hash, Tag, @@ -108,7 +109,7 @@ use crate::rpc::proto::blobs::{ #[derive(Debug, Clone)] #[repr(transparent)] pub struct Client> { - pub(super) rpc: RpcClient, + pub(crate) rpc: RpcClient, } /// Type alias for a memory-backed client. @@ -123,6 +124,14 @@ where Self { rpc } } + /// Box the client to avoid having to provide the connector type. + pub fn boxed(&self) -> Client> + where + C: BoxableConnector, + { + Client::new(self.rpc.clone().boxed()) + } + /// Get a tags client. pub fn tags(&self) -> tags::Client { tags::Client::new(self.rpc.clone())