Files
google-apis-rs/hyper/client/connect/trait.Connect.html
2021-04-02 00:20:57 +08:00

12 lines
8.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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 `Connect` trait in crate `hyper`."><meta name="keywords" content="rust, rustlang, rust-lang, Connect"><title>hyper::client::connect::Connect - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../hyper/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Trait Connect</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../../index.html">hyper</a>::<wbr><a href="../index.html">client</a>::<wbr><a href="index.html">connect</a></p><div id="sidebar-vars" data-name="Connect" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="../../index.html">hyper</a>::<wbr><a href="../index.html">client</a>::<wbr><a href="index.html">connect</a>::<wbr><a class="trait" href="">Connect</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">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/hyper/client/connect/mod.rs.html#292-297" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait Connect: Sealed + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> { }</pre></div><div class="docblock"><p>Connect to a destination, returning an IO transport.</p>
<p>A connector receives a <a href="../../../hyper/struct.Uri.html"><code>Uri</code></a> and returns a <code>Future</code> of the
ready connection.</p>
<h1 id="trait-alias" class="section-header"><a href="#trait-alias">Trait Alias</a></h1>
<p>This is really just an <em>alias</em> for the <code>tower::Service</code> trait, with
additional bounds set for convenience <em>inside</em> hyper. You don't actually
implement this trait, but <code>tower::Service&lt;Uri&gt;</code> instead.</p>
</div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><h3 id="impl-Connect" class="impl"><code class="in-band">impl&lt;S, T&gt; Connect for S <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="../../../hyper/service/trait.Service.html" title="trait hyper::service::Service">Service</a>&lt;<a class="struct" href="../../../hyper/struct.Uri.html" title="struct hyper::Uri">Uri</a>, Response = T&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,<br>&nbsp;&nbsp;&nbsp;&nbsp;S::<a class="type" href="../../../hyper/service/trait.Service.html#associatedtype.Error" title="type hyper::service::Service::Error">Error</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">StdError</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>&gt;&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;S::<a class="type" href="../../../hyper/service/trait.Service.html#associatedtype.Future" title="type hyper::service::Service::Future">Future</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../../tokio/io/async_read/trait.AsyncRead.html" title="trait tokio::io::async_read::AsyncRead">AsyncRead</a> + <a class="trait" href="../../../tokio/io/async_write/trait.AsyncWrite.html" title="trait tokio::io::async_write::AsyncWrite">AsyncWrite</a> + <a class="trait" href="../../../hyper/client/connect/trait.Connection.html" title="trait hyper::client::connect::Connection">Connection</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,&nbsp;</span></code><a href="#impl-Connect" class="anchor"></a><a class="srclink" href="../../../src/hyper/client/connect/mod.rs.html#307-319" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype._Svc" class="type"><code>type <a href="#associatedtype._Svc" class="type">_Svc</a> = S</code></h4><h4 id="method.connect" class="method hidden"><code>fn <a href="#method.connect" class="fnname">connect</a>(self, _: Internal, dst: <a class="struct" href="../../../hyper/struct.Uri.html" title="struct hyper::Uri">Uri</a>) -&gt; Oneshot&lt;S, <a class="struct" href="../../../hyper/struct.Uri.html" title="struct hyper::Uri">Uri</a>&gt;</code><a class="srclink" href="../../../src/hyper/client/connect/mod.rs.html#316-318" title="goto source code">[src]</a></h4></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../../implementors/hyper/client/connect/trait.Connect.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="hyper"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>