186 lines
No EOL
8.6 KiB
HTML
186 lines
No EOL
8.6 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="API documentation for the Rust `connection` mod in crate `solicit`.">
|
||
<meta name="keywords" content="rust, rustlang, rust-lang, connection">
|
||
|
||
<title>solicit::http::connection - Rust</title>
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
|
||
<link rel="stylesheet" type="text/css" href="../../../main.css">
|
||
|
||
|
||
|
||
|
||
</head>
|
||
<body class="rustdoc">
|
||
<!--[if lte IE 8]>
|
||
<div class="warning">
|
||
This old browser is unsupported and will most likely display funky
|
||
things.
|
||
</div>
|
||
<![endif]-->
|
||
|
||
|
||
|
||
<nav class="sidebar">
|
||
|
||
<p class='location'><a href='../../index.html'>solicit</a>::<wbr><a href='../index.html'>http</a></p><script>window.sidebarCurrent = {name: 'connection', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script>
|
||
</nav>
|
||
|
||
<nav class="sub">
|
||
<form class="search-form js-only">
|
||
<div class="search-container">
|
||
<input class="search-input" name="search"
|
||
autocomplete="off"
|
||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||
type="search">
|
||
</div>
|
||
</form>
|
||
</nav>
|
||
|
||
<section id='main' class="content mod">
|
||
<h1 class='fqn'><span class='in-band'>Module <a href='../../index.html'>solicit</a>::<wbr><a href='../index.html'>http</a>::<wbr><a class='mod' href=''>connection</a></span><span class='out-of-band'><span id='render-detail'>
|
||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||
[<span class='inner'>−</span>]
|
||
</a>
|
||
</span><a id='src-625' class='srclink' href='../../../src/solicit/http/connection.rs.html#1-1121' title='goto source code'>[src]</a></span></h1>
|
||
<div class='docblock'><p>The module contains the implementation of an HTTP/2 connection.</p>
|
||
|
||
<p>This provides an API to read and write raw HTTP/2 frames, as well as a way to hook into
|
||
higher-level events arising on an HTTP/2 connection, such as the receipt of headers on a
|
||
particular stream or a new data chunk.</p>
|
||
|
||
<p>The <code>SendFrame</code> and <code>ReceiveFrame</code> traits are the API to sending and receiving frames off of an
|
||
HTTP/2 connection. The module includes default implementations of those traits for <code>io::Write</code>
|
||
and <code>solicit::http::transport::TransportStream</code> types.</p>
|
||
|
||
<p>The <code>HttpConnection</code> struct builds on top of these traits and provides an API for sending
|
||
messages of a higher level to the peer (such as writing data or headers, while automatically
|
||
handling the framing and header encoding), as well as for handling incoming events of that
|
||
type. The <code>Session</code> trait is the bridge between the connection layer (i.e. the
|
||
<code>HttpConnection</code>) and the higher layers that handle these events and pass them on to the
|
||
application.</p>
|
||
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||
<table>
|
||
<tr class=' module-item'>
|
||
<td><a class='struct' href='struct.DataChunk.html'
|
||
title='solicit::http::connection::DataChunk'>DataChunk</a></td>
|
||
<td class='docblock short'>
|
||
<p>The struct represents a chunk of data that should be sent to the peer on a particular stream.</p>
|
||
</td>
|
||
</tr>
|
||
<tr class=' module-item'>
|
||
<td><a class='struct' href='struct.HttpConnection.html'
|
||
title='solicit::http::connection::HttpConnection'>HttpConnection</a></td>
|
||
<td class='docblock short'>
|
||
<p>The struct implements the HTTP/2 connection level logic.</p>
|
||
</td>
|
||
</tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
|
||
<table>
|
||
<tr class=' module-item'>
|
||
<td><a class='enum' href='enum.EndStream.html'
|
||
title='solicit::http::connection::EndStream'>EndStream</a></td>
|
||
<td class='docblock short'>
|
||
<p>An enum indicating whether the <code>HttpConnection</code> send operation should end the stream.</p>
|
||
</td>
|
||
</tr>
|
||
<tr class=' module-item'>
|
||
<td><a class='enum' href='enum.HttpFrame.html'
|
||
title='solicit::http::connection::HttpFrame'>HttpFrame</a></td>
|
||
<td class='docblock short'>
|
||
<p>An enum representing all frame variants that can be returned by an
|
||
<code>HttpConnection</code>.</p>
|
||
</td>
|
||
</tr>
|
||
<tr class=' module-item'>
|
||
<td><a class='enum' href='enum.SendStatus.html'
|
||
title='solicit::http::connection::SendStatus'>SendStatus</a></td>
|
||
<td class='docblock short'>
|
||
<p>The enum represents the success status of the operation of sending a next data chunk on an
|
||
HTTP/2 connection.</p>
|
||
</td>
|
||
</tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
|
||
<table>
|
||
<tr class=' module-item'>
|
||
<td><a class='trait' href='trait.ReceiveFrame.html'
|
||
title='solicit::http::connection::ReceiveFrame'>ReceiveFrame</a></td>
|
||
<td class='docblock short'>
|
||
<p>A trait that should be implemented by types that can provide the functionality
|
||
of receiving HTTP/2 frames.</p>
|
||
</td>
|
||
</tr>
|
||
<tr class=' module-item'>
|
||
<td><a class='trait' href='trait.SendFrame.html'
|
||
title='solicit::http::connection::SendFrame'>SendFrame</a></td>
|
||
<td class='docblock short'>
|
||
<p>A trait that should be implemented by types that can provide the functionality
|
||
of sending HTTP/2 frames.</p>
|
||
</td>
|
||
</tr></table></section>
|
||
<section id='search' class="content hidden"></section>
|
||
|
||
<section class="footer"></section>
|
||
|
||
<aside id="help" class="hidden">
|
||
<div>
|
||
<h1 class="hidden">Help</h1>
|
||
|
||
<div class="shortcuts">
|
||
<h2>Keyboard Shortcuts</h2>
|
||
|
||
<dl>
|
||
<dt>?</dt>
|
||
<dd>Show this help dialog</dd>
|
||
<dt>S</dt>
|
||
<dd>Focus the search field</dd>
|
||
<dt>⇤</dt>
|
||
<dd>Move up in search results</dd>
|
||
<dt>⇥</dt>
|
||
<dd>Move down in search results</dd>
|
||
<dt>⏎</dt>
|
||
<dd>Go to active search result</dd>
|
||
<dt>+</dt>
|
||
<dd>Collapse/expand all sections</dd>
|
||
</dl>
|
||
</div>
|
||
|
||
<div class="infos">
|
||
<h2>Search Tricks</h2>
|
||
|
||
<p>
|
||
Prefix searches with a type followed by a colon (e.g.
|
||
<code>fn:</code>) to restrict the search to a given type.
|
||
</p>
|
||
|
||
<p>
|
||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||
<code>struct</code>, <code>enum</code>,
|
||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||
and <code>const</code>.
|
||
</p>
|
||
|
||
<p>
|
||
Search functions by type signature (e.g.
|
||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</aside>
|
||
|
||
|
||
|
||
<script>
|
||
window.rootPath = "../../../";
|
||
window.currentCrate = "solicit";
|
||
window.playgroundUrl = "";
|
||
</script>
|
||
<script src="../../../jquery.js"></script>
|
||
<script src="../../../main.js"></script>
|
||
|
||
<script defer src="../../../search-index.js"></script>
|
||
</body>
|
||
</html> |