File tree 3 files changed +4
-4
lines changed 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -399,10 +399,10 @@ enum HttpMessageLength {
399
399
}
400
400
401
401
/// An HTTP response body in binary format.
402
- pub ( crate ) struct BinaryResponse ( pub ( crate ) Vec < u8 > ) ;
402
+ pub struct BinaryResponse ( pub Vec < u8 > ) ;
403
403
404
404
/// An HTTP response body in JSON format.
405
- pub ( crate ) struct JsonResponse ( pub ( crate ) serde_json:: Value ) ;
405
+ pub struct JsonResponse ( pub serde_json:: Value ) ;
406
406
407
407
/// Interprets bytes from an HTTP response body as binary data.
408
408
impl TryFrom < Vec < u8 > > for BinaryResponse {
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ impl RestClient {
24
24
}
25
25
26
26
/// Requests a resource encoded in `F` format and interpreted as type `T`.
27
- async fn request_resource < F , T > ( & mut self , resource_path : & str ) -> std:: io:: Result < T >
27
+ pub async fn request_resource < F , T > ( & mut self , resource_path : & str ) -> std:: io:: Result < T >
28
28
where F : TryFrom < Vec < u8 > , Error = std:: io:: Error > + TryInto < T , Error = std:: io:: Error > {
29
29
let host = format ! ( "{}:{}" , self . endpoint. host( ) , self . endpoint. port( ) ) ;
30
30
let uri = format ! ( "{}/{}" , self . endpoint. path( ) . trim_end_matches( "/" ) , resource_path) ;
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ impl RpcClient {
34
34
}
35
35
36
36
/// Calls a method with the response encoded in JSON format and interpreted as type `T`.
37
- async fn call_method < T > ( & mut self , method : & str , params : & [ serde_json:: Value ] ) -> std:: io:: Result < T >
37
+ pub async fn call_method < T > ( & mut self , method : & str , params : & [ serde_json:: Value ] ) -> std:: io:: Result < T >
38
38
where JsonResponse : TryFrom < Vec < u8 > , Error = std:: io:: Error > + TryInto < T , Error = std:: io:: Error > {
39
39
let host = format ! ( "{}:{}" , self . endpoint. host( ) , self . endpoint. port( ) ) ;
40
40
let uri = self . endpoint . path ( ) ;
You can’t perform that action at this time.
0 commit comments