mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-30 10:42:55 +01:00
115 lines
62 KiB
HTML
115 lines
62 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="An incoming request."><title>HttpRequest in actix_web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc struct"><!--[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" title="show sidebar"></button><a class="logo-container" href="../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../actix_web/index.html">actix_web</a><span class="version">4.6.0</span></h2></div><h2 class="location"><a href="#">HttpRequest</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.app_config">app_config</a></li><li><a href="#method.app_data">app_data</a></li><li><a href="#method.conn_data">conn_data</a></li><li><a href="#method.connection_info">connection_info</a></li><li><a href="#method.cookie">cookie</a></li><li><a href="#method.cookies">cookies</a></li><li><a href="#method.head">head</a></li><li><a href="#method.headers">headers</a></li><li><a href="#method.match_info">match_info</a></li><li><a href="#method.match_name">match_name</a></li><li><a href="#method.match_pattern">match_pattern</a></li><li><a href="#method.method">method</a></li><li><a href="#method.path">path</a></li><li><a href="#method.peer_addr">peer_addr</a></li><li><a href="#method.query_string">query_string</a></li><li><a href="#method.resource_map">resource_map</a></li><li><a href="#method.uri">uri</a></li><li><a href="#method.url_for">url_for</a></li><li><a href="#method.url_for_static">url_for_static</a></li><li><a href="#method.version">version</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-HttpRequest">Clone</a></li><li><a href="#impl-Debug-for-HttpRequest">Debug</a></li><li><a href="#impl-Drop-for-HttpRequest">Drop</a></li><li><a href="#impl-FromRequest-for-HttpRequest">FromRequest</a></li><li><a href="#impl-HttpMessage-for-HttpRequest">HttpMessage</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-HttpRequest">!RefUnwindSafe</a></li><li><a href="#impl-Send-for-HttpRequest">!Send</a></li><li><a href="#impl-Sync-for-HttpRequest">!Sync</a></li><li><a href="#impl-UnwindSafe-for-HttpRequest">!UnwindSa
|
|||
|
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-HttpRequest" class="impl"><a class="src rightside" href="../src/actix_web/request.rs.html#74-347">source</a><a href="#impl-HttpRequest" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.head" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#77-79">source</a><h4 class="code-header">pub fn <a href="#method.head" class="fn">head</a>(&self) -> &<a class="struct" href="dev/struct.RequestHead.html" title="struct actix_web::dev::RequestHead">RequestHead</a></h4></section></summary><div class="docblock"><p>This method returns reference to the request head</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.uri" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#90-92">source</a><h4 class="code-header">pub fn <a href="#method.uri" class="fn">uri</a>(&self) -> &<a class="struct" href="http/struct.Uri.html" title="struct actix_web::http::Uri">Uri</a></h4></section></summary><div class="docblock"><p>Request’s uri.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.method" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#96-98">source</a><h4 class="code-header">pub fn <a href="#method.method" class="fn">method</a>(&self) -> &<a class="struct" href="http/struct.Method.html" title="struct actix_web::http::Method">Method</a></h4></section></summary><div class="docblock"><p>Read the Request method.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.version" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#102-104">source</a><h4 class="code-header">pub fn <a href="#method.version" class="fn">version</a>(&self) -> <a class="struct" href="http/struct.Version.html" title="struct actix_web::http::Version">Version</a></h4></section></summary><div class="docblock"><p>Read the Request Version.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.headers" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#108-110">source</a><h4 class="code-header">pub fn <a href="#method.headers" class="fn">headers</a>(&self) -> &<a class="struct" href="http/header/struct.HeaderMap.html" title="struct actix_web::http::header::HeaderMap">HeaderMap</a></h4></section></summary><div class="docblock"><p>Returns request’s headers.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.path" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#114-116">source</a><h4 class="code-header">pub fn <a href="#method.path" class="fn">path</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h4></section></summary><div class="docblock"><p>The target path of this request.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.query_string" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#122-124">source</a><h4 class="code-header">pub fn <a href="#method.query_string" class="fn">query_string</a>(&self) -> &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h4></section></summary><div class="docblock"><p>The query string in the URL.</p>
|
|||
|
<p>Example: <code>id=10</code></p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.match_info" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#138-140">source</a><h4 class="code-header">pub fn <a href="#method.match_info" class="fn">match_info</a>(&self) -> &<a class="struct" href="dev/struct.Path.html" title="struct actix_web::dev::Path">Path</a><<a class="struct" href="dev/struct.Url.html" title="struct actix_web::dev::Url">Url</a>></h4></section></summary><div class="docblock"><p>Returns a reference to the URL parameters container.</p>
|
|||
|
<p>A URL parameter is specified in the form <code>{identifier}</code>, where the identifier can be used
|
|||
|
later in a request handler to access the matched value for that parameter.</p>
|
|||
|
<h5 id="percent-encoding-and-url-parameters"><a class="doc-anchor" href="#percent-encoding-and-url-parameters">§</a>Percent Encoding and URL Parameters</h5>
|
|||
|
<p>Because each URL parameter is able to capture multiple path segments, none of
|
|||
|
<code>["%2F", "%25", "%2B"]</code> found in the request URI are decoded into <code>["/", "%", "+"]</code> in order
|
|||
|
to preserve path integrity. If a URL parameter is expected to contain these characters, then
|
|||
|
it is on the user to decode them or use the <a href="web/struct.Path.html" title="struct actix_web::web::Path"><code>web::Path</code></a> extractor which
|
|||
|
<em>will</em> decode these special sequences.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.match_pattern" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#158-160">source</a><h4 class="code-header">pub fn <a href="#method.match_pattern" class="fn">match_pattern</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></h4></section></summary><div class="docblock"><p>The resource definition pattern that matched the path. Useful for logging and metrics.</p>
|
|||
|
<p>For example, when a resource with pattern <code>/user/{id}/profile</code> is defined and a call is made
|
|||
|
to <code>/user/123/profile</code> this function would return <code>Some("/user/{id}/profile")</code>.</p>
|
|||
|
<p>Returns a None when no resource is fully matched, including default services.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.match_name" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#166-168">source</a><h4 class="code-header">pub fn <a href="#method.match_name" class="fn">match_name</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></h4></section></summary><div class="docblock"><p>The resource name that matched the path. Useful for logging and metrics.</p>
|
|||
|
<p>Returns a None when no resource is fully matched, including default services.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.conn_data" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#177-182">source</a><h4 class="code-header">pub fn <a href="#method.conn_data" class="fn">conn_data</a><T: 'static>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>></h4></section></summary><div class="docblock"><p>Returns a reference a piece of connection data set in an <a href="struct.HttpServer.html#method.on_connect" title="method actix_web::HttpServer::on_connect">on-connect</a> callback.</p>
|
|||
|
|
|||
|
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">let </span>opt_t = req.conn_data::<PeerCertificate>();</code></pre></div>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.url_for" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#208-214">source</a><h4 class="code-header">pub fn <a href="#method.url_for" class="fn">url_for</a><U, I>(
|
|||
|
&self,
|
|||
|
name: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
|||
|
elements: U
|
|||
|
) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://docs.rs/url/2.5.0/url/struct.Url.html" title="struct url::Url">Url</a>, <a class="enum" href="error/enum.UrlGenerationError.html" title="enum actix_web::error::UrlGenerationError">UrlGenerationError</a>><div class="where">where
|
|||
|
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = I>,
|
|||
|
I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>,</div></h4></section></summary><div class="docblock"><p>Generates URL for a named resource.</p>
|
|||
|
<p>This substitutes in sequence all URL parameters that appear in the resource itself and in
|
|||
|
parent <a href="web/fn.scope.html" title="fn actix_web::web::scope">scopes</a>, if any.</p>
|
|||
|
<p>It is worth noting that the characters <code>['/', '%']</code> are not escaped and therefore a single
|
|||
|
URL parameter may expand into multiple path segments and <code>elements</code> can be percent-encoded
|
|||
|
beforehand without worrying about double encoding. Any other character that is not valid in
|
|||
|
a URL path context is escaped using percent-encoding.</p>
|
|||
|
<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5>
|
|||
|
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">fn </span>index(req: HttpRequest) -> HttpResponse {
|
|||
|
<span class="kw">let </span>url = req.url_for(<span class="string">"foo"</span>, <span class="kw-2">&</span>[<span class="string">"1"</span>, <span class="string">"2"</span>, <span class="string">"3"</span>]); <span class="comment">// <- generate URL for "foo" resource
|
|||
|
</span>HttpResponse::Ok().into()
|
|||
|
}
|
|||
|
|
|||
|
<span class="kw">let </span>app = App::new()
|
|||
|
.service(web::resource(<span class="string">"/test/{one}/{two}/{three}"</span>)
|
|||
|
.name(<span class="string">"foo"</span>) <span class="comment">// <- set resource name so it can be used in `url_for`
|
|||
|
</span>.route(web::get().to(|| HttpResponse::Ok()))
|
|||
|
);</code></pre></div>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.url_for_static" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#220-223">source</a><h4 class="code-header">pub fn <a href="#method.url_for_static" class="fn">url_for_static</a>(&self, name: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://docs.rs/url/2.5.0/url/struct.Url.html" title="struct url::Url">Url</a>, <a class="enum" href="error/enum.UrlGenerationError.html" title="enum actix_web::error::UrlGenerationError">UrlGenerationError</a>></h4></section></summary><div class="docblock"><p>Generate URL for named resource</p>
|
|||
|
<p>This method is similar to <code>HttpRequest::url_for()</code> but it can be used
|
|||
|
for urls that do not contain variable parts.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.resource_map" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#227-229">source</a><h4 class="code-header">pub fn <a href="#method.resource_map" class="fn">resource_map</a>(&self) -> &<a class="struct" href="dev/struct.ResourceMap.html" title="struct actix_web::dev::ResourceMap">ResourceMap</a></h4></section></summary><div class="docblock"><p>Get a reference to a <code>ResourceMap</code> of current application.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.peer_addr" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#243-245">source</a><h4 class="code-header">pub fn <a href="#method.peer_addr" class="fn">peer_addr</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>></h4></section></summary><div class="docblock"><p>Returns peer socket address.</p>
|
|||
|
<p>Peer address is the directly connected peer’s socket address. If a proxy is used in front of
|
|||
|
the Actix Web server, then it would be address of this proxy.</p>
|
|||
|
<p>For expanded client connection information, use <a href="struct.HttpRequest.html#method.connection_info" title="method actix_web::HttpRequest::connection_info"><code>connection_info</code></a> instead.</p>
|
|||
|
<p>Will only return None when called in unit tests unless <a href="test/struct.TestRequest.html#method.peer_addr" title="method actix_web::test::TestRequest::peer_addr"><code>TestRequest::peer_addr</code></a> is used.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.connection_info" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#254-261">source</a><h4 class="code-header">pub fn <a href="#method.connection_info" class="fn">connection_info</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.Ref.html" title="struct core::cell::Ref">Ref</a><'_, <a class="struct" href="dev/struct.ConnectionInfo.html" title="struct actix_web::dev::ConnectionInfo">ConnectionInfo</a>></h4></section></summary><div class="docblock"><p>Returns connection info for the current request.</p>
|
|||
|
<p>The return type, <a href="dev/struct.ConnectionInfo.html" title="struct actix_web::dev::ConnectionInfo"><code>ConnectionInfo</code></a>, can also be used as an extractor.</p>
|
|||
|
<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5>
|
|||
|
<p>Panics if request’s extensions container is already borrowed.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.app_config" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#265-267">source</a><h4 class="code-header">pub fn <a href="#method.app_config" class="fn">app_config</a>(&self) -> &<a class="struct" href="dev/struct.AppConfig.html" title="struct actix_web::dev::AppConfig">AppConfig</a></h4></section></summary><div class="docblock"><p>Returns a reference to the application’s connection configuration.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.app_data" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#297-305">source</a><h4 class="code-header">pub fn <a href="#method.app_data" class="fn">app_data</a><T: 'static>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a>></h4></section></summary><div class="docblock"><p>Retrieves a piece of application state.</p>
|
|||
|
<p>Extracts any object stored with <a href="struct.App.html#method.app_data" title="method actix_web::App::app_data"><code>App::app_data()</code></a> (or the
|
|||
|
counterpart methods on <a href="struct.Scope.html#method.app_data" title="method actix_web::Scope::app_data"><code>Scope</code></a> and
|
|||
|
<a href="struct.Resource.html#method.app_data" title="method actix_web::Resource::app_data"><code>Resource</code></a>) during application configuration.</p>
|
|||
|
<p>Since the Actix Web router layers application data, the returned object will reference the
|
|||
|
“closest” instance of the type. For example, if an <code>App</code> stores a <code>u32</code>, a nested <code>Scope</code>
|
|||
|
also stores a <code>u32</code>, and the delegated request handler falls within that <code>Scope</code>, then
|
|||
|
calling <code>.app_data::<u32>()</code> on an <code>HttpRequest</code> within that handler will return the
|
|||
|
<code>Scope</code>’s instance. However, using the same router set up and a request that does not get
|
|||
|
captured by the <code>Scope</code>, <code>.app_data::<u32>()</code> would return the <code>App</code>’s instance.</p>
|
|||
|
<p>If the state was stored using the <a href="web/struct.Data.html" title="struct actix_web::web::Data"><code>Data</code></a> wrapper, then it must also be retrieved using
|
|||
|
this same type.</p>
|
|||
|
<p>See also the <a href="web/struct.Data.html" title="struct actix_web::web::Data"><code>Data</code></a> extractor.</p>
|
|||
|
<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
|
|||
|
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>opt_t: <span class="prelude-ty">Option</span><<span class="kw-2">&</span>Data<T>> = req.app_data::<Data<T>>();</code></pre></div>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.cookies" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#314-333">source</a><h4 class="code-header">pub fn <a href="#method.cookies" class="fn">cookies</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.Ref.html" title="struct core::cell::Ref">Ref</a><'_, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="cookie/struct.Cookie.html" title="struct actix_web::cookie::Cookie">Cookie</a><'static>>>, <a class="enum" href="cookie/enum.ParseError.html" title="enum actix_web::cookie::ParseError">CookieParseError</a>></h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>cookies</code></strong> only.</div></span></summary><div class="docblock"><p>Load request cookies.</p>
|
|||
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.cookie" class="method"><a class="src rightside" href="../src/actix_web/request.rs.html#337-346">source</a><h4 class="code-header">pub fn <a href="#method.cookie" class="fn">cookie</a>(&self, name: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="cookie/struct.Cookie.html" title="struct actix_web::cookie::Cookie">Cookie</a><'static>></h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>cookies</code></strong> only.</div></span></summary><div class="docblock"><p>Return request cookie.</p>
|
|||
|
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-HttpRequest" class="impl"><a class="src rightside" href="../src/actix_web/request.rs.html#30">source</a><a href="#impl-Clone-for-HttpRequest" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../src/actix_web/request.rs.html#30">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a></h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#169">source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-HttpRequest" class="impl"><a class="src rightside" href="../src/actix_web/request.rs.html#429-462">source</a><a href="#impl-Debug-for-HttpRequest" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/actix_web/request.rs.html#430-461">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Drop-for-HttpRequest" class="impl"><a class="src rightside" href="../src/actix_web/request.rs.html#373-400">source</a><a href="#impl-Drop-for-HttpRequest" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/cor
|
|||
|
<h4 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h4>
|
|||
|
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{web, App, HttpRequest};
|
|||
|
<span class="kw">use </span>serde::Deserialize;
|
|||
|
|
|||
|
<span class="doccomment">/// extract `Thing` from request
|
|||
|
</span><span class="kw">async fn </span>index(req: HttpRequest) -> String {
|
|||
|
<span class="macro">format!</span>(<span class="string">"Got thing: {:?}"</span>, req)
|
|||
|
}
|
|||
|
|
|||
|
<span class="kw">let </span>app = App::new().service(
|
|||
|
web::resource(<span class="string">"/users/{first}"</span>).route(
|
|||
|
web::get().to(index))
|
|||
|
);</code></pre></div>
|
|||
|
</div><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="trait.FromRequest.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="error/struct.Error.html" title="struct actix_web::error::Error">Error</a></h4></section></summary><div class='docblock'>The associated error which can be returned.</div></details><details class="toggle" open><summary><section id="associatedtype.Future" class="associatedtype trait-impl"><a href="#associatedtype.Future" class="anchor">§</a><h4 class="code-header">type <a href="trait.FromRequest.html#associatedtype.Future" class="associatedtype">Future</a> = Ready<<a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>, <a class="struct" href="error/struct.Error.html" title="struct actix_web::error::Error">Error</a>>></h4></section></summary><div class='docblock'>Future that resolves to a <code>Self</code>. <a href="trait.FromRequest.html#associatedtype.Future">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.from_request" class="method trait-impl"><a class="src rightside" href="../src/actix_web/request.rs.html#424-426">source</a><a href="#method.from_request" class="anchor">§</a><h4 class="code-header">fn <a href="trait.FromRequest.html#tymethod.from_request" class="fn">from_request</a>(req: &<a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>, _: &mut <a class="enum" href="dev/enum.Payload.html" title="enum actix_web::dev::Payload">Payload</a>) -> Self::<a class="associatedtype" href="trait.FromRequest.html#associatedtype.Future" title="type actix_web::FromRequest::Future">Future</a></h4></section></summary><div class='docblock'>Create a <code>Self</code> from request parts asynchronously.</div></details><details class="toggle method-toggle" open><summary><section id="method.extract" class="method trait-impl"><a class="src rightside" href="../src/actix_web/extract.rs.html#94-96">source</a><a href="#method.extract" class="anchor">§</a><h4 class="code-header">fn <a href="trait.FromRequest.html#method.extract" class="fn">extract</a>(req: &<a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a>) -> Self::<a class="associatedtype" href="trait.FromRequest.html#associatedtype.Future" title="type actix_web::FromRequest::Future">Future</a></h4></section></summary><div class='docblock'>Create a <code>Self</code> from request head asynchronously. <a href="trait.FromRequest.html#method.extract">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-HttpMessage-for-HttpRequest" class="impl"><a class="src rightside" href="../src/actix_web/request.rs.html#349-371">source</a><a href="#impl-HttpMessage-for-HttpRequest" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.HttpMessage.html" title="trait actix_web::HttpMessage">HttpMessage</a> for <a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Stream" class="associatedtype trait-impl"><a href="#associatedtype.Stream" class="anchor">§</a><h4 class="code-header">type <a href="trait.HttpMessage.html#associatedtype.Stream" class="associatedtype">Stream</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></h4></section></summary><div class='docblock'>Type of message payload stream</div></details><details class="toggle method-toggle" open><summary><section id="method.headers-1" class="method trait-impl"><a class="
|
|||
|
string is returned.</div></details><details class="toggle method-toggle" open><summary><section id="method.encoding" class="method trait-impl"><a class="src rightside" href="../src/actix_http/http_message.rs.html#61">source</a><a href="#method.encoding" class="anchor">§</a><h4 class="code-header">fn <a href="trait.HttpMessage.html#method.encoding" class="fn">encoding</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&'static Encoding, <a class="enum" href="error/enum.ContentTypeError.html" title="enum actix_web::error::ContentTypeError">ContentTypeError</a>></h4></section></summary><div class='docblock'>Get content type encoding. <a href="trait.HttpMessage.html#method.encoding">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.mime_type" class="method trait-impl"><a class="src rightside" href="../src/actix_http/http_message.rs.html#78">source</a><a href="#method.mime_type" class="anchor">§</a><h4 class="code-header">fn <a href="trait.HttpMessage.html#method.mime_type" class="fn">mime_type</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://docs.rs/mime/0.3.17/mime/struct.Mime.html" title="struct mime::Mime">Mime</a>>, <a class="enum" href="error/enum.ContentTypeError.html" title="enum actix_web::error::ContentTypeError">ContentTypeError</a>></h4></section></summary><div class='docblock'>Convert the request content type to a known mime type.</div></details><details class="toggle method-toggle" open><summary><section id="method.chunked" class="method trait-impl"><a class="src rightside" href="../src/actix_http/http_message.rs.html#93">source</a><a href="#method.chunked" class="anchor">§</a><h4 class="code-header">fn <a href="trait.HttpMessage.html#method.chunked" class="fn">chunked</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <a class="enum" href="error/enum.ParseError.html" title="enum actix_web::error::ParseError">ParseError</a>></h4></section></summary><div class='docblock'>Check if request has chunked transfer encoding.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-HttpRequest" class="impl"><a href="#impl-Freeze-for-HttpRequest" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a></h3></section><section id="impl-RefUnwindSafe-for-HttpRequest" class="impl"><a href="#impl-RefUnwindSafe-for-HttpRequest" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a></h3></section><section id="impl-Send-for-HttpRequest" class="impl"><a href="#impl-Send-for-HttpRequest" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.HttpRequest.html" title="struct actix_web::HttpRequest">HttpRequest</a></h3></section><section id="impl
|
|||
|
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
|||
|
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
|||
|
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#765">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#768">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
|
|||
|
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Instrument-for-T" class="impl"><a href="#impl-Instrument-for-T" class="anchor">§</a><h3 class="code-header">impl<T> Instrument for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl"><a href="#method.instrument" class="anchor">§</a><h4 class="code-header">fn <a class="fn">instrument</a>(self, span: Span) -> Instrumented<Self></h4></section></summary><div class='docblock'>Instruments this type with the provided [<code>Span</code>], returning an
|
|||
|
<code>Instrumented</code> wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl"><a href="#method.in_current_span" class="anchor">§</a><h4 class="code-header">fn <a class="fn">in_current_span</a>(self) -> Instrumented<Self></h4></section></summary><div class='docblock'>Instruments this type with the <a href="super::Span::current()">current</a> <a href="crate::Span"><code>Span</code></a>, returning an
|
|||
|
<code>Instrumented</code> wrapper. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#748-750">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
|||
|
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#758">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
|
|||
|
<p>That is, this conversion is whatever the implementation of
|
|||
|
<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
|||
|
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Same-for-T" class="impl"><a class="src rightside" href="https://docs.rs/typenum/1.17.0/src/typenum/type_operators.rs.html#34">source</a><a href="#impl-Same-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://docs.rs/typenum/1.17.0/typenum/type_operators/trait.Same.html" title="trait typenum::type_operators::Same">Same</a> for T</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://docs.rs/typenum/1.17.0/typenum/type_operators/trait.Same.html#associatedtype.Output" class="associatedtype">Output</a> = T</h4></section></summary><div class='docblock'>Should always be <code>Self</code></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where
|
|||
|
T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#805-807">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
|||
|
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#812">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#790-792">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
|||
|
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#797">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-VZip%3CV%3E-for-T" class="impl"><a href="#impl-VZip%3CV%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<V, T> VZip<V> for T<div class="where">where
|
|||
|
V: MultiLane<T>,</div></h3></section></summary><div class="impl-items"><section id="method.vzip" class="method trait-impl"><a href="#method.vzip" class="anchor">§</a><h4 class="code-header">fn <a class="fn">vzip</a>(self) -> V</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-WithSubscriber-for-T" class="impl"><a href="#impl-WithSubscriber-for-T" class="anchor">§</a><h3 class="code-header">impl<T> WithSubscriber for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_subscriber" class="method trait-impl"><a href="#method.with_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_subscriber</a><S>(self, subscriber: S) -> WithDispatch<Self><div class="where">where
|
|||
|
S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><Dispatch>,</div></h4></section></summary><div class='docblock'>Attaches the provided <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
|
|||
|
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl"><a href="#method.with_current_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_current_subscriber</a>(self) -> WithDispatch<Self></h4></section></summary><div class='docblock'>Attaches the current <a href="crate::dispatcher#setting-the-default-subscriber">default</a> <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
|
|||
|
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details></div></details></div></section></div></main></body></html>
|