pub trait TypedResponse: Sized {
// Required method
fn from_bpsv(doc: &BpsvDocument<'_>) -> Result<Self>;
// Provided method
fn from_response(response: &Response) -> Result<Self> { ... }
}
Expand description
Trait for typed responses that can be parsed from BPSV documents
Required Methods§
Sourcefn from_bpsv(doc: &BpsvDocument<'_>) -> Result<Self>
fn from_bpsv(doc: &BpsvDocument<'_>) -> Result<Self>
Parse the response from a BPSV document
§Errors
Returns an error if parsing the BPSV document fails.
Provided Methods§
Sourcefn from_response(response: &Response) -> Result<Self>
fn from_response(response: &Response) -> Result<Self>
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.