| Crates.io | nom-rfc8288 |
| lib.rs | nom-rfc8288 |
| version | 0.4.0 |
| created_at | 2023-05-10 07:04:08.358368+00 |
| updated_at | 2025-08-12 01:09:26.392105+00 |
| description | A nom based parser for RFC 8288 |
| homepage | https://github.com/mishazharov/nom-rfc8288 |
| repository | https://github.com/mishazharov/nom-rfc8288 |
| max_upload_size | |
| id | 861139 |
| size | 32,060 |
RFC 8288 specifies the convention for parsing the Link header.
use nom_rfc8288::complete::{link_strict, LinkData, LinkParam};
let link_data = r#"<https://example.com>; rel="origin"; csv="one,two""#;
let parsed = link_strict(link_data).unwrap();
assert_eq!(
parsed,
vec![
Some(
LinkData {
url: "https://example.com",
params: vec![
LinkParam {
key: "rel",
val: Some("origin".to_owned()),
},
LinkParam {
key: "csv",
val: Some("one,two".to_owned()),
}
],
}
),
]
);
See the pre-commit quick start guide for how to setup pre-commit.