braid_http/protocol/
parser.rs1use crate::error::Result;
4use crate::types::Version;
5
6pub struct HeaderParser;
8
9impl HeaderParser {
10 pub fn parse_version(value: &str) -> Result<Vec<Version>> {
11 crate::protocol::parse_version_header(value)
12 }
13 pub fn parse_content_range(value: &str) -> Result<(String, String)> {
14 crate::protocol::parse_content_range(value)
15 }
16 pub fn format_version(versions: &[Version]) -> String {
17 crate::protocol::format_version_header(versions)
18 }
19 pub fn format_content_range(unit: &str, range: &str) -> String {
20 crate::protocol::format_content_range(unit, range)
21 }
22}