Skip to main content

nyquest_backend_winhttp/
lib.rs

1//! <style>
2//! .rustdoc-hidden { display: none; }
3//! </style>
4
5#![doc = include_str!("../README.md")]
6#![cfg_attr(docsrs, feature(doc_cfg))]
7
8cfg_if::cfg_if! {
9    if #[cfg(windows)] {
10        #[cfg(feature = "async")]
11        #[cfg_attr(docsrs, doc(cfg(feature = "async")))]
12        mod r#async;
13        #[cfg(feature = "blocking")]
14        #[cfg_attr(docsrs, doc(cfg(feature = "blocking")))]
15        mod blocking;
16
17        mod error;
18        mod handle;
19        #[cfg(feature = "multipart")]
20        #[cfg_attr(docsrs, doc(cfg(feature = "multipart")))]
21        mod multipart;
22        mod request;
23        mod session;
24        mod stream;
25        mod url;
26    }
27}
28
29/// The backend implementation using WinHTTP.
30#[derive(Clone)]
31pub struct WinHttpBackend;
32
33#[cfg(windows)]
34/// Registers [`WinHttpBackend`] as global default.
35pub fn register() {
36    nyquest_interface::register_backend(WinHttpBackend);
37}