4 releases (breaking)

0.4.0 Aug 16, 2024
0.3.0 Aug 16, 2024
0.2.0 Aug 16, 2024
0.1.0 Aug 16, 2024

#1052 in Parser implementations

Download history 5/week @ 2024-10-16 9/week @ 2024-10-30 8/week @ 2024-11-06 5/week @ 2024-11-13 6/week @ 2024-11-20 49/week @ 2024-11-27 163/week @ 2024-12-04 186/week @ 2024-12-11 164/week @ 2024-12-18 126/week @ 2024-12-25 238/week @ 2025-01-01 933/week @ 2025-01-08 1351/week @ 2025-01-15 878/week @ 2025-01-22 917/week @ 2025-01-29

4,156 downloads per month

MIT OR 0BSD

15KB
226 lines

Content-Disposition

Crate

Documentation

See the rustdoc at docs.rs.

API

The primary entry point for this library is the following function:

    fn parse_content_disposition(header: &str) -> ParsedContentDisposition

Example

    let dis = parse_content_disposition(" form-data; name=\"cover\"; filename=\"exif.jpg\"");

    assert_eq!(dis.disposition, DispositionType::FormData);
    assert_eq!(dis.name(), Some("cover".to_string()));
    assert_eq!(dis.filename(), Some("exif.jpg".to_string()));

MSRV policy

Currently the minimum supported Rust version (MSRV) is 1.51.0. MSRV increases will be kept to a minimum, and will always be accompanied with a minor version bump.

Dependencies

~3.5MB
~124K SLoC