nyquest_backend_curl/
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
8#[cfg(feature = "async")]
9#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
10mod r#async;
11#[cfg(feature = "blocking")]
12#[cfg_attr(docsrs, doc(cfg(feature = "blocking")))]
13mod blocking;
14mod curl_ng;
15mod error;
16mod request;
17mod state;
18mod url;
19
20/// The backend implementation using libcurl.
21pub struct CurlBackend;
22
23/// Initializes libcurl.
24pub fn init() {
25    curl::init();
26}
27
28/// Initializes libcurl and registers the backend as global default.
29pub fn register() {
30    init();
31    nyquest_interface::register_backend(CurlBackend);
32}