Skip to content

Commit f77efbb

Browse files
committed
removed doc-test example
1 parent 189f80e commit f77efbb

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

src/rpc.rs

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -87,47 +87,6 @@ pub struct JsonRpcError {
8787
}
8888

8989
/// Unified RPC client for calling host functions
90-
///
91-
/// # Example Usage
92-
///
93-
/// ```rust
94-
/// use blockless_sdk::rpc::RpcClient;
95-
/// use serde::{Serialize, Deserialize};
96-
///
97-
/// #[derive(Serialize, Deserialize)]
98-
/// struct HttpRequest {
99-
/// url: String,
100-
/// method: String,
101-
/// }
102-
///
103-
/// #[derive(Serialize, Deserialize)]
104-
/// struct HttpResponse {
105-
/// status: u16,
106-
/// body: String,
107-
/// }
108-
///
109-
/// // Create client with default 4KB buffer
110-
/// let mut client = RpcClient::new();
111-
///
112-
/// // Create client with custom buffer size (e.g., 10MB for HTTP responses)
113-
/// let mut client = RpcClient::with_buffer_size(10 * 1024 * 1024);
114-
///
115-
/// // Type-safe method call
116-
/// let request = HttpRequest {
117-
/// url: "https://api.example.com".to_string(),
118-
/// method: "GET".to_string(),
119-
/// };
120-
///
121-
/// let response: JsonRpcResponse<HttpResponse> = client.call("http.request", Some(request))?;
122-
///
123-
/// // Convenience methods
124-
/// let pong = client.ping()?;
125-
/// let echo_result = client.echo("Hello World!")?;
126-
/// let version = client.version()?;
127-
///
128-
/// // Modify buffer size after creation
129-
/// client.set_buffer_size(1024 * 1024); // 1MB buffer
130-
/// ```
13190
pub struct RpcClient {
13291
next_id: u32,
13392
buffer_size: usize,

0 commit comments

Comments
 (0)