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//! - `blocking`: Enable blocking interface support
16//! - `multipart`: Enable multipart form support
17//!
18//! [`nyquest`]: https://docs.rs/nyquest
19
20#![cfg_attr(docsrs, feature(doc_cfg))]
21#![deny(missing_docs)]
22
23#[cfg(feature = "async")]
24#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
25pub mod r#async;
26#[cfg(feature = "blocking")]
27#[cfg_attr(docsrs, doc(cfg(feature = "blocking")))]
28pub mod blocking;
29pub mod body;
30pub mod client;
31mod error;
32#[doc(hidden)] // For nyquest facade only
33pub mod register;
34mod request;
35
36pub use body::{Body, StreamReader};
37#[cfg(feature = "multipart")]
38#[cfg_attr(docsrs, doc(cfg(feature = "multipart")))]
39pub use body::{Part, PartBody};
40pub use error::{Error, Result};
41pub use register::register_backend;
42pub use request::{Method, Request};