mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-25 04:35:18 +01:00
44 lines
10 KiB
HTML
44 lines
10 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="hyper"><title>hyper - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="hyper" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../hyper/index.html">hyper</a><span class="version">0.14.27</span></h2></div><div class="sidebar-elems"><ul class="block">
|
||
<li><a id="all-types" href="all.html">All Items</a></li></ul><section><ul class="block"><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#types">Type Aliases</a></li></ul></section></div></nav><div class="sidebar-resizer"></div>
|
||
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../hyper/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Crate <a class="mod" href="#">hyper</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/hyper/lib.rs.html#1-111">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="hyper"><a href="#hyper">hyper</a></h2>
|
||
<p>hyper is a <strong>fast</strong> and <strong>correct</strong> HTTP implementation written in and for Rust.</p>
|
||
<h3 id="features"><a href="#features">Features</a></h3>
|
||
<ul>
|
||
<li>HTTP/1 and HTTP/2</li>
|
||
<li>Asynchronous design</li>
|
||
<li>Leading in performance</li>
|
||
<li>Tested and <strong>correct</strong></li>
|
||
<li>Extensive production use</li>
|
||
<li><a href="client/index.html">Client</a> and <a href="server/index.html">Server</a> APIs</li>
|
||
</ul>
|
||
<p>If just starting out, <strong>check out the <a href="https://hyper.rs/guides">Guides</a>
|
||
first.</strong></p>
|
||
<h3 id="low-level"><a href="#low-level">“Low-level”</a></h3>
|
||
<p>hyper is a lower-level HTTP library, meant to be a building block
|
||
for libraries and applications.</p>
|
||
<p>If looking for just a convenient HTTP client, consider the
|
||
<a href="https://crates.io/crates/reqwest">reqwest</a> crate.</p>
|
||
<h2 id="optional-features"><a href="#optional-features">Optional Features</a></h2>
|
||
<p>hyper uses a set of <a href="https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section">feature flags</a> to reduce the amount of compiled code.
|
||
It is possible to just enable certain features over others. By default,
|
||
hyper does not enable any features but allows one to enable a subset for
|
||
their use case. Below is a list of the available feature flags. You may
|
||
also notice above each function, struct and trait there is listed one or
|
||
more feature flags that are required for that item to be used.</p>
|
||
<p>If you are new to hyper it is possible to enable the <code>full</code> feature flag
|
||
which will enable all public APIs. Beware though that this will pull in
|
||
many extra dependencies that you may not need.</p>
|
||
<p>The following optional features are available:</p>
|
||
<ul>
|
||
<li><code>http1</code>: Enables HTTP/1 support.</li>
|
||
<li><code>http2</code>: Enables HTTP/2 support.</li>
|
||
<li><code>client</code>: Enables the HTTP <code>client</code>.</li>
|
||
<li><code>server</code>: Enables the HTTP <code>server</code>.</li>
|
||
<li><code>runtime</code>: Enables convenient integration with <code>tokio</code>, providing
|
||
connectors and acceptors for TCP, and a default executor.</li>
|
||
<li><code>tcp</code>: Enables convenient implementations over TCP (using tokio).</li>
|
||
<li><code>stream</code>: Provides <code>futures::Stream</code> capabilities.</li>
|
||
<li><code>backports</code>: 1.0 functionality backported to 0.14.</li>
|
||
<li><code>deprecated</code>: opt-in to deprecation warnings to prepare you for 1.0.</li>
|
||
</ul>
|
||
</div></details><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2><ul class="item-table"><li><div class="item-name" id="reexport.HeaderMap"><code>pub use crate::http::<a class="struct" href="header/struct.HeaderMap.html" title="struct hyper::header::HeaderMap">HeaderMap</a>;</code></div></li><li><div class="item-name" id="reexport.Body"><code>pub use crate::body::<a class="struct" href="body/struct.Body.html" title="struct hyper::body::Body">Body</a>;</code></div></li><li><div class="item-name" id="reexport.Client"><code>pub use crate::client::<a class="struct" href="client/struct.Client.html" title="struct hyper::client::Client">Client</a>;</code></div></li><li><div class="item-name" id="reexport.Server"><code>pub use crate::server::<a class="struct" href="server/struct.Server.html" title="struct hyper::server::Server">Server</a>;</code></div></li></ul><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="body/index.html" title="mod hyper::body">body</a></div><div class="desc docblock-short">Streaming bodies for Requests and Responses</div></li><li><div class="item-name"><a class="mod" href="client/index.html" title="mod hyper::client">client</a></div><div class="desc docblock-short">HTTP Client</div></li><li><div class="item-name"><a class="mod" href="ext/index.html" title="mod hyper::ext">ext</a></div><div class="desc docblock-short">HTTP extensions.</div></li><li><div class="item-name"><a class="mod" href="header/index.html" title="mod hyper::header">header</a></div><div class="desc docblock-short">HTTP header types</div></li><li><div class="item-name"><a class="mod" href="rt/index.html" title="mod hyper::rt">rt</a></div><div class="desc docblock-short">Runtime components</div></li><li><div class="item-name"><a class="mod" href="server/index.html" title="mod hyper::server">server</a></div><div class="desc docblock-short">HTTP Server</div></li><li><div class="item-name"><a class="mod" href="service/index.html" title="mod hyper::service">service</a></div><div class="desc docblock-short">Asynchronous Services</div></li><li><div class="item-name"><a class="mod" href="upgrade/index.html" title="mod hyper::upgrade">upgrade</a></div><div class="desc docblock-short">HTTP Upgrades</div></li></ul><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Error.html" title="struct hyper::Error">Error</a></div><div class="desc docblock-short">Represents errors that can occur handling HTTP streams.</div></li><li><div class="item-name"><a class="struct" href="struct.Method.html" title="struct hyper::Method">Method</a></div><div class="desc docblock-short">The Request Method (VERB)</div></li><li><div class="item-name"><a class="struct" href="struct.Request.html" title="struct hyper::Request">Request</a></div><div class="desc docblock-short">Represents an HTTP request.</div></li><li><div class="item-name"><a class="struct" href="struct.Response.html" title="struct hyper::Response">Response</a></div><div class="desc docblock-short">Represents an HTTP response</div></li><li><div class="item-name"><a class="struct" href="struct.StatusCode.html" title="struct hyper::StatusCode">StatusCode</a></div><div class="desc docblock-short">An HTTP status code (<code>status-code</code> in RFC 7230 et al.).</div></li><li><div class="item-name"><a class="struct" href="struct.Uri.html" title="struct hyper::Uri">Uri</a></div><div class="desc docblock-short">The URI component of a request.</div></li><li><div class="item-name"><a class="struct" href="struct.Version.html" title="struct hyper::Version">Version</a></div><div class="desc docblock-short">Represents a version of the HTTP spec.</div></li></ul><h2 id="types" class="section-header"><a href="#types">Type Aliases</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.Result.html" title="type hyper::Result">Result</a></div><div class="desc docblock-short">Result type often returned from methods that can have hyper <code>Error</code>s.</div></li></ul></section></div></main></body></html> |