pub fn from_status(status: StatusCode) -> Self {
        #[derive(Debug, thiserror::Error)]
        #[error("{0}")]
        struct StatusError(StatusCode);

        impl ResponseError for StatusError {
            fn status(&self) -> StatusCode {
                self.0
            }
        }

        StatusError(status).into()
    }
/// create a new error object from status code.
create a new error object from status code.
create a new error object from status code .
pub fn from_status(status: StatusCode) -> Self {
        #[derive(Debug, thiserror::Error)]
        #[error("{0}")]
        struct StatusError(StatusCode);
        impl ResponseError for StatusError {
            fn status(&self) -> StatusCode {
                self.0
            }
        }
        StatusError(status).into()
    }
pub fn from_status ( status : StatusCode ) -> Self { # [ derive ( Debug thiserror Error ) ] # [ error ( " " ) ] struct StatusError ( StatusCode ) ; impl ResponseError for StatusError { fn status ( & self ) -> StatusCode { self . 0 } } StatusError ( status ) . into ( ) }
create a new error object from status code.
create a new error object from status code .
status
StatusCode