common_multipart_rfc7578/lib.rs
1// Copyright 2017 rust-multipart-rfc7578 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
9//! This crate contains an implementation of the multipart/form-data media
10//! type described in [RFC 7578](https://tools.ietf.org/html/rfc7578).
11//!
12//! ## Usage
13//!
14//! Add either the Hyper implementation or the Actix implementation to
15//! your Cargo.toml file:
16//!
17//! ### Actix:
18//!
19//! ```toml
20//! [dependencies]
21//! actix-multipart-rfc7578 = "0.10"
22//! ```
23//!
24//! and import:
25//!
26//! ```rust
27//! use actix_multipart_rfc7578 as multipart;
28//! ```
29//!
30//! ### Hyper:
31//!
32//! ```toml
33//! [dependencies]
34//! hyper-multipart-rfc7578 = "0.8"
35//! ```
36//!
37//! and import:
38//!
39//! ```rust
40//! use hyper_multipart_rfc7578 as multipart;
41//! ```
42
43mod boundary;
44mod client_;
45mod error;
46
47pub mod client {
48 pub use crate::error::Error;
49
50 /// This module contains data structures for building a multipart/form
51 /// body to send a server.
52 pub mod multipart {
53 pub use crate::{
54 boundary::BoundaryGenerator,
55 client_::{Body, Form},
56 };
57 }
58}