16 lines
6.3 KiB
HTML
16 lines
6.3 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="httparse"><title>httparse - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="httparse" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Crate httparse</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../httparse/index.html">httparse</a><span class="version">1.10.1</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#httparse" title="httparse">httparse</a></li></ul><h3><a href="#structs">Crate Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#functions" title="Functions">Functions</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>httparse</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/httparse/lib.rs.html#1-2798">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="httparse"><a class="doc-anchor" href="#httparse">§</a>httparse</h2>
|
|
<p>A push library for parsing HTTP/1.x requests and responses.</p>
|
|
<p>The focus is on speed and safety. Unsafe code is used to keep parsing fast,
|
|
but unsafety is contained in a submodule, with invariants enforced. The
|
|
parsing internals use an <code>Iterator</code> instead of direct indexing, while
|
|
skipping bounds checks.</p>
|
|
<p>With Rust 1.27.0 or later, support for SIMD is enabled automatically.
|
|
If building an executable to be run on multiple platforms, and thus
|
|
not passing <code>target_feature</code> or <code>target_cpu</code> flags to the compiler,
|
|
runtime detection can still detect SSE4.2 or AVX2 support to provide
|
|
massive wins.</p>
|
|
<p>If compiling for a specific target, remembering to include
|
|
<code>-C target_cpu=native</code> allows the detection to become compile time checks,
|
|
making it <em>even</em> faster.</p>
|
|
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Header.html" title="struct httparse::Header">Header</a></dt><dd>Represents a parsed header.</dd><dt><a class="struct" href="struct.InvalidChunkSize.html" title="struct httparse::InvalidChunkSize">Invalid<wbr>Chunk<wbr>Size</a></dt><dd>An error in parsing a chunk size.</dd><dt><a class="struct" href="struct.ParserConfig.html" title="struct httparse::ParserConfig">Parser<wbr>Config</a></dt><dd>Parser configuration.</dd><dt><a class="struct" href="struct.Request.html" title="struct httparse::Request">Request</a></dt><dd>A parsed Request.</dd><dt><a class="struct" href="struct.Response.html" title="struct httparse::Response">Response</a></dt><dd>A parsed Response.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.Error.html" title="enum httparse::Error">Error</a></dt><dd>An error in parsing.</dd><dt><a class="enum" href="enum.Status.html" title="enum httparse::Status">Status</a></dt><dd>The result of a successful parse pass.</dd></dl><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.EMPTY_HEADER.html" title="constant httparse::EMPTY_HEADER">EMPTY_<wbr>HEADER</a></dt><dd>An empty header, useful for constructing a <code>Header</code> array to pass in for
|
|
parsing.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.parse_chunk_size.html" title="fn httparse::parse_chunk_size">parse_<wbr>chunk_<wbr>size</a></dt><dd>Parse a buffer of bytes as a chunk size.</dd><dt><a class="fn" href="fn.parse_headers.html" title="fn httparse::parse_headers">parse_<wbr>headers</a></dt><dd>Parse a buffer of bytes as headers.</dd></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.Result.html" title="type httparse::Result">Result</a></dt><dd>A Result of any parsing action.</dd></dl></section></div></main></body></html> |