Skip to main content

parse_content_length_header

Function parse_content_length_header 

Source
pub fn parse_content_length_header(value: &str) -> Result<i64, i32>
Expand description

Parses a decimal Content-Length header using the runtime’s non-negative bounds.

§Parameters

§Returns

Returns the successful value produced by crate::http::parse_content_length_header or an error when the operation fails.

§Errors

Returns an error value when crate::http::parse_content_length_header cannot complete successfully.

§Performance

Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by crate::http::parse_content_length_header.

§Examples

ⓘ
let _result = pharos_runtime_core::http::parse_content_length_header("value");
  • crate::http for adjacent helpers that share the same runtime surface.