pub fn reply_from_error(
    error: impl std::string::ToString,
    status_code: warp::http::StatusCode,
) -> warp::reply::WithStatus<Toml> {
    warp::reply::with_status(
        toml(&crate::ErrorResponse {
            error: error.to_string(),
        }),
        status_code,
    )
}
// A more generic wrapper that takes any ToString implementation (which includes Errors) and builds
// a TOML error body with the given status code
A more generic wrapper that takes any ToString implementation (which includes Errors) and builds
a TOML error body with the given status code
A more generic wrapper that takes any ToString implementation ( which includes Errors ) and builds a TOML error body with the given status code
pub fn reply_from_error(
    error: impl std::string::ToString,
    status_code: warp::http::StatusCode,
) -> warp::reply::WithStatus<Toml> {
    warp::reply::with_status(
        toml(&crate::ErrorResponse {
            error: error.to_string(),
        }),
        status_code,
    )
}
pub fn reply_from_error ( error : impl std :: string :: ToString , status_code : warp :: http :: StatusCode , ) -> warp :: reply :: WithStatus < Toml > { warp :: reply :: with_status ( toml ( & crate :: ErrorResponse { error : error . to_string ( ) , } ) , status_code , ) }
A more generic wrapper that takes any ToString implementation (which includes Errors) and builds
a TOML error body with the given status code
A more generic wrapper that takes any ToString implementation ( which includes Errors ) and builds a TOML error body with the given status code
error
impl std::string::ToString
status_code
warp::http::StatusCode
error
impl std::string::ToString
status_code
warp::http::StatusCode