Reserved for implementation-defined server-errors.
(code: i64, message: T)
| 359 | impl RpcError { |
| 360 | /// Reserved for implementation-defined server-errors. |
| 361 | pub fn custom_error<T: core::fmt::Display>(code: i64, message: T) -> Self { |
| 362 | RpcError { |
| 363 | code, |
| 364 | message: message.to_string(), |
| 365 | data: None, |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | /// Reserved for implementation-defined server-errors. |
| 370 | pub fn custom_error_with_data<T: core::fmt::Display>( |