zebra_test::mock_service

Trait ResponseResult

source
pub trait ResponseResult<Response, Error> {
    // Required method
    fn into_result(self) -> Result<Response, Error>;
}
Expand description

A helper trait to improve ergonomics when sending a response.

This allows the ResponseSender::respond method to receive either a Result or just the response type, which it automatically wraps in an Ok variant.

Required Methods§

source

fn into_result(self) -> Result<Response, Error>

Converts the type into a Result that can be sent as a response.

Implementations on Foreign Types§

source§

impl<Response, SourceError, TargetError> ResponseResult<Response, TargetError> for Result<Response, SourceError>
where SourceError: Into<TargetError>,

source§

fn into_result(self) -> Result<Response, TargetError>

Implementors§

source§

impl<Response, Error> ResponseResult<Response, Error> for Response