Trait Endpoint

Source
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§

Required Methods§

Trait Implementations§

Source§

impl<RenderRequestError, ParseResponseOutput, ParseResponseError> Debug for dyn Endpoint<ParseResponseError = ParseResponseError, ParseResponseOutput = ParseResponseOutput, RenderRequestError = RenderRequestError>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<RenderRequestError, ParseResponseOutput, ParseResponseError> Debug for dyn Endpoint<ParseResponseError = ParseResponseError, ParseResponseOutput = ParseResponseOutput, RenderRequestError = RenderRequestError> + Send + Sync

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Implementors§