#![deny(
missing_docs,
missing_debug_implementations,
unused_extern_crates,
unused_qualifications
)]
#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg))]
use std::error;
use std::fmt;
pub mod base64_format;
pub use base64_format::ByteArray;
pub mod nullable_format;
pub use nullable_format::Nullable;
mod body;
pub use body::BodyExt;
pub mod auth;
pub use auth::{AuthData, Authorization};
pub mod context;
pub use context::{ContextBuilder, ContextWrapper, EmptyContext, Has, Pop, Push};
#[cfg(feature = "client")]
pub mod connector;
#[cfg(feature = "client")]
pub use connector::Connector;
#[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))]
pub mod composites;
#[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))]
pub use composites::{CompositeMakeService, CompositeMakeServiceEntry, CompositeService, NotFound};
pub mod add_context;
pub use add_context::{AddContextMakeService, AddContextService};
pub mod drop_context;
pub use drop_context::{DropContextMakeService, DropContextService};
pub mod request_parser;
pub use request_parser::RequestParser;
mod header;
pub use header::{XSpanIdString, X_SPAN_ID};
pub mod multipart;
mod one_any_of;
pub use one_any_of::*;
pub trait ErrorBound: Into<Box<dyn error::Error + Send + Sync>> {}
impl<T> ErrorBound for T where T: Into<Box<dyn error::Error + Send + Sync>> {}
#[derive(Clone, Debug)]
pub struct ApiError(pub String);
impl fmt::Display for ApiError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let debug: &dyn fmt::Debug = self;
debug.fmt(f)
}
}
impl error::Error for ApiError {
fn description(&self) -> &str {
"Failed to produce a valid response."
}
}