Trait zebra_test::mock_service::ResponseResult
source · [−]pub trait ResponseResult<Response, Error> {
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
fn into_result(self) -> Result<Response, Error>
fn into_result(self) -> Result<Response, Error>
Converts the type into a Result
that can be sent as a response.