api_builder 0.1.2

A simple client-agnostic API builder, inspired by the GitLab crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/// Errors that can occur when adding headers.
#[derive(Debug, thiserror::Error)]
pub enum HeaderError {
    #[error(transparent)]
    Parse(#[from] http::header::InvalidHeaderValue),
    #[error("missing expected header: {0}")]
    MissingHeader(&'static str),
    #[error(transparent)]
    ToStr(#[from] http::header::ToStrError),
    #[error("invalid header data, missing name")]
    MissingHeaderName,
    #[error(transparent)]
    Other(#[from] anyhow::Error),
}