fregate 0.17.1

Framework for services creation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//!Errors [`crate::middleware::proxy_layer::ProxyLayer`] may return in runtime.

use hyper::http;
use std::error::Error;

#[derive(thiserror::Error, Debug)]
///Errors enum.
pub enum ProxyError {
    #[error("`{0}`")]
    /// Returned if fail to build new uri for [`hyper::Request`]
    UriBuilder(http::Error),
    #[error("`{0}`")]
    /// Returned on any other error while sending [`hyper::Request`]
    SendRequest(Box<(dyn Error + Send + Sync + 'static)>),
}

/// Result Alias
pub type ProxyResult<T> = Result<T, ProxyError>;