content_disposition

Crates.iocontent_disposition
lib.rscontent_disposition
version0.4.0
sourcesrc
created_at2024-08-16 06:45:33.682944
updated_at2024-08-16 07:53:38.755883
descriptionContent-Disposition parser
homepagehttps://github.com/y0zong/content-disposition/blob/master/README.md
repositoryhttps://github.com/y0zong/content-disposition
max_upload_size
id1339998
size14,582
yoz (y0zong)

documentation

README

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.

Commit count: 0

cargo fmt