multipart_rfc7578/
lib.rs

1// Copyright 2017 rust-hyper-multipart-rfc7578 Developers
2// Copyright 2018 rust-multipart-rfc7578 Developers
3//
4// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
5// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
6// http://opensource.org/licenses/MIT>, at your option. This file may not be
7// copied, modified, or distributed except according to those terms.
8//
9
10//! This crate contains an implementation of the multipart/form-data media
11//! type described in [RFC 7578](https://tools.ietf.org/html/rfc7578).
12//!
13//! ## Usage
14//!
15//! ```toml
16//! [dependencies]
17//! multipart-rfc7578 = "0.7"
18//! ```
19//!
20//! ```rust
21//! # extern crate multipart_rfc7578;
22//!
23//! use multipart_rfc7578::Form;
24//!
25//! # fn main() {
26//! let mut form = Form::default();
27//!
28//! form.add_text("test", "Hello World");
29//! # }
30//! ```
31//!
32mod boundary_generator;
33mod form;
34mod form_reader;
35mod part;
36
37#[cfg(feature = "futures")]
38mod body;
39
40#[cfg(feature = "futures")]
41pub use crate::body::Body;
42pub use crate::boundary_generator::{BoundaryGenerator, RandomAsciiGenerator};
43pub use crate::form::Form;
44
45pub(crate) const CRLF: &str = "\r\n";