izihawa_common_multipart/
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//! ### Hyper:
18//!
19//! ```toml
20//! [dependencies]
21//! izihawa-hyper-multipart = "1.0"
22//! ```
23//!
24//! and import:
25//!
26//! ```rust
27//! extern crate izihawa_hyper_multipart as multipart;
28//! ```
29//!
30
31mod boundary;
32mod client_;
33mod error;
34
35pub mod client {
36    pub use crate::error::Error;
37
38    /// This module contains data structures for building a multipart/form
39    /// body to send a server.
40    ///
41    pub mod multipart {
42        pub use crate::{
43            boundary::{BoundaryGenerator, RandomAsciiGenerator},
44            client_::{
45                content_disposition, Body, Form, CONTENT_TYPE_APPLICATION_X_DIRECTORY,
46                CONTENT_TYPE_MULTIPART_FORM_DATA,
47            },
48        };
49    }
50}