nyquest_interface/lib.rs
1//! Interface definitions for [`nyquest`] HTTP client backends.
2//!
3//! This crate provides the interface that backends must implement to be compatible with
4//! the [`nyquest`] HTTP client facade. It defines the core types and traits that are used
5//! across all nyquest implementations.
6//!
7//! ## Backend Registration
8//!
9//! Backend implementations must register themselves using the `register_backend` function
10//! before they can be used by [`nyquest`].
11//!
12//! ## Features
13//!
14//! - `async`: Enable async interface support
15//! - `async-stream`: Enable async interface and streaming upload/download support
16//! - `blocking`: Enable blocking interface support
17//! - `blocking-stream`: Enable blocking interface and streaming upload/download support
18//! - `multipart`: Enable multipart form support
19//!
20//! [`nyquest`]: https://docs.rs/nyquest
21
22#![cfg_attr(docsrs, feature(doc_cfg))]
23#![deny(missing_docs)]
24
25#[cfg(feature = "async")]
26#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
27pub mod r#async;
28#[cfg(feature = "blocking")]
29#[cfg_attr(docsrs, doc(cfg(feature = "blocking")))]
30pub mod blocking;
31pub mod body;
32pub mod client;
33mod error;
34#[doc(hidden)] // For nyquest facade only
35pub mod register;
36mod request;
37
38pub use body::Body;
39#[cfg(feature = "multipart")]
40#[cfg_attr(docsrs, doc(cfg(feature = "multipart")))]
41pub use body::{Part, PartBody};
42pub use error::{Error, Result};
43pub use register::register_backend;
44pub use request::{Method, Request};