pub trait JsonRpcRequest{
type Output: TryFrom<Value>;
// Required method
fn method() -> &'static str;
// Provided methods
fn to_string(self, c: CommonPart) -> Result<String> { ... }
fn to_single_request(self, c: CommonPart) -> Result<Request> { ... }
fn to_call(self, c: CommonPart) -> Result<Call> { ... }
fn parse_single_response(response: Response) -> Result<Self::Output> { ... }
}
Required Associated Types§
Required Methods§
Provided Methods§
fn to_string(self, c: CommonPart) -> Result<String>
fn to_single_request(self, c: CommonPart) -> Result<Request>
fn to_call(self, c: CommonPart) -> Result<Call>
fn parse_single_response(response: Response) -> Result<Self::Output>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.