pub trait Endpoint {
type RenderRequestError: Error + Send + Sync + 'static;
type ParseResponseOutput;
type ParseResponseError: Error + Send + Sync + 'static;
// Required methods
fn render_request(
&self,
) -> Result<Request<Vec<u8>>, Self::RenderRequestError>;
fn parse_response(
&self,
response: Response<Vec<u8>>,
) -> Result<Self::ParseResponseOutput, Self::ParseResponseError>;
}Required Associated Types§
type RenderRequestError: Error + Send + Sync + 'static
type ParseResponseOutput
type ParseResponseError: Error + Send + Sync + 'static
Required Methods§
fn render_request(&self) -> Result<Request<Vec<u8>>, Self::RenderRequestError>
fn parse_response( &self, response: Response<Vec<u8>>, ) -> Result<Self::ParseResponseOutput, Self::ParseResponseError>
Trait Implementations§
Source§impl<RenderRequestError, ParseResponseOutput, ParseResponseError> Debug for dyn Endpoint<ParseResponseOutput = ParseResponseOutput, RenderRequestError = RenderRequestError, ParseResponseError = ParseResponseError>
impl<RenderRequestError, ParseResponseOutput, ParseResponseError> Debug for dyn Endpoint<ParseResponseOutput = ParseResponseOutput, RenderRequestError = RenderRequestError, ParseResponseError = ParseResponseError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".