ipfs_api_backend_hyper/lib.rs
1// Copyright 2021 rust-ipfs-api Developers
2//
3// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
4// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
5// http://opensource.org/licenses/MIT>, at your option. This file may not be
6// copied, modified, or distributed except according to those terms.
7
8//! Connect to an IPFS API using a client implemented with hyper.
9//!
10//! # Example
11//!
12//! ```rust
13//! use ipfs_api_backend_hyper::{IpfsApi, IpfsClient};
14//! use ipfs_api_backend_hyper::response::VersionResponse;
15//!
16//! async fn example() -> Result<VersionResponse, ipfs_api_backend_hyper::Error> {
17//! let client = IpfsClient::default();
18//!
19//! client.version().await
20//! }
21//! ```
22
23extern crate hyper_multipart_rfc7578 as multipart;
24
25mod backend;
26mod error;
27
28pub use crate::{backend::HyperBackend as IpfsClient, error::Error};
29pub use ipfs_api_prelude::{
30 request::{self, KeyType, Logger, LoggingLevel, ObjectTemplate},
31 response, ApiError, BackendWithGlobalOptions, GlobalOptions, IpfsApi, TryFromUri,
32};
33pub use multipart::client::multipart::Form;