Skip to main content

app_api_response

Function app_api_response 

Source
pub(super) fn app_api_response<T: Serialize>(
    result: Result<T, impl Into<ApiError>>,
) -> Response
Expand description

A MuxAPI result as its HTTP answer: the value, or the error under the status of its kind (api_error::ApiError). An error that is still a plain String gets its kind from its text.