249 lines
95 KiB
HTML
249 lines
95 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="The URI component of a request."><title>Uri in http::uri - 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="http" 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="sidebar-items.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 struct"><!--[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="#">Uri</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../http/index.html">http</a><span class="version">1.4.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Uri</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.authority" title="authority">authority</a></li><li><a href="#method.builder" title="builder">builder</a></li><li><a href="#method.from_maybe_shared" title="from_maybe_shared">from_maybe_shared</a></li><li><a href="#method.from_parts" title="from_parts">from_parts</a></li><li><a href="#method.from_static" title="from_static">from_static</a></li><li><a href="#method.host" title="host">host</a></li><li><a href="#method.into_parts" title="into_parts">into_parts</a></li><li><a href="#method.path" title="path">path</a></li><li><a href="#method.path_and_query" title="path_and_query">path_and_query</a></li><li><a href="#method.port" title="port">port</a></li><li><a href="#method.port_u16" title="port_u16">port_u16</a></li><li><a href="#method.query" title="query">query</a></li><li><a href="#method.scheme" title="scheme">scheme</a></li><li><a href="#method.scheme_str" title="scheme_str">scheme_str</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Uri" title="Clone">Clone</a></li><li><a href="#impl-Debug-for-Uri" title="Debug">Debug</a></li><li><a href="#impl-Default-for-Uri" title="Default">Default</a></li><li><a href="#impl-Display-for-Uri" title="Display">Display</a></li><li><a href="#impl-Eq-for-Uri" title="Eq">Eq</a></li><li><a href="#impl-From%3CAuthority%3E-for-Uri" title="From<Authority>">From<Authority></a></li><li><a href="#impl-From%3CPathAndQuery%3E-for-Uri" title="From<PathAndQuery>">From<PathAndQuery></a></li><li><a href="#impl-From%3CUri%3E-for-Builder" title="From<Uri>">From<Uri></a></li><li><a href="#impl-From%3CUri%3E-for-Parts" title="From<Uri>">From<Uri></a></li><li><a href="#impl-FromStr-for-Uri" title="FromStr">FromStr</a></li><li><a href="#impl-Hash-for-Uri" title="Hash">Hash</a></li><li><a href="#impl-PartialEq-for-Uri" title="PartialEq">PartialEq</a></li><li><a href="#impl-PartialEq%3C%26str%3E-for-Uri" title="PartialEq<&'a str>">PartialEq<&'a str></a></li><li><a href="#impl-PartialEq%3CUri%3E-for-%26str" title="PartialEq<Uri>">PartialEq<Uri></a></li><li><a href="#impl-PartialEq%3CUri%3E-for-str" title="PartialEq<Uri>">PartialEq<Uri></a></li><li><a href="#impl-PartialEq%3Cstr%3E-for-Uri" title="PartialEq<str>">PartialEq<str></a></li><li><a href="#impl-TryFrom%3C%26String%3E-for-Uri" title="TryFrom<&'a String>">TryFrom<&'a String></a></li><li><a href="#impl-TryFrom%3C%26Uri%3E-for-Uri" title="TryFrom<&'a Uri>">TryFrom<&'a Uri></a></li><li><a href="#impl-TryFrom%3C%26%5Bu8%5D%3E-for-Uri" title="TryFrom<&'a [u8]>">TryFrom<&'a [u8]></a></li><li><a href="#impl-TryFrom%3C%26str%3E-for-Uri" title="TryFrom<&'a str>">TryFrom<&'a str></a></li><li><a href="#impl-TryFrom%3CParts%3E-for-Uri" title="TryFrom<Parts>">TryFrom<Parts></a></li><li><a href="#impl-TryFrom%3CString%3E-for-Uri" title="TryFrom<String>">TryFrom<String></a></li><li><a href="#impl-TryFrom%3CVec%3Cu8%3E%3E-for-Uri" title="TryFrom<Vec<u8>>">TryFrom<Vec<u8>></a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-Uri" title="!Freeze">!Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Uri" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Uri" title="Send">Send</a></li><li><a href="#impl-Sync-for-Uri" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Uri" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Uri" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></a></li><li><a href="#impl-CloneToUninit-for-T" title="CloneToUninit">CloneToUninit</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></a></li><li><a href="#impl-ToOwned-for-T" title="ToOwned">ToOwned</a></li><li><a href="#impl-ToString-for-T" title="ToString">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In http::<wbr>uri</a></h2></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"><div class="rustdoc-breadcrumbs"><a href="../index.html">http</a>::<wbr><a href="index.html">uri</a></div><h1>Struct <span class="struct">Uri</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/http/uri/mod.rs.html#96-100">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Uri { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The URI component of a request.</p>
|
||
<p>For HTTP 1, this is included as part of the request line. From Section 5.3,
|
||
Request Target:</p>
|
||
<blockquote>
|
||
<p>Once an inbound connection is obtained, the client sends an HTTP
|
||
request message (Section 3) with a request-target derived from the
|
||
target URI. There are four distinct formats for the request-target,
|
||
depending on both the method being requested and whether the request
|
||
is to a proxy.</p>
|
||
<div class="example-wrap"><pre class="language-notrust"><code>request-target = origin-form
|
||
/ absolute-form
|
||
/ authority-form
|
||
/ asterisk-form</code></pre></div></blockquote>
|
||
<p>The URI is structured as follows:</p>
|
||
<div class="example-wrap"><pre class="language-notrust"><code>abc://username:password@example.com:123/path/data?key=value&key2=value2#fragid1
|
||
|-| |-------------------------------||--------| |-------------------| |-----|
|
||
| | | | |
|
||
scheme authority path query fragment</code></pre></div>
|
||
<p>For HTTP 2.0, the URI is encoded using pseudoheaders.</p>
|
||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>http::Uri;
|
||
|
||
<span class="kw">let </span>uri = <span class="string">"/foo/bar?baz"</span>.parse::<Uri>().unwrap();
|
||
<span class="macro">assert_eq!</span>(uri.path(), <span class="string">"/foo/bar"</span>);
|
||
<span class="macro">assert_eq!</span>(uri.query(), <span class="prelude-val">Some</span>(<span class="string">"baz"</span>));
|
||
<span class="macro">assert_eq!</span>(uri.host(), <span class="prelude-val">None</span>);
|
||
|
||
<span class="kw">let </span>uri = <span class="string">"https://www.rust-lang.org/install.html"</span>.parse::<Uri>().unwrap();
|
||
<span class="macro">assert_eq!</span>(uri.scheme_str(), <span class="prelude-val">Some</span>(<span class="string">"https"</span>));
|
||
<span class="macro">assert_eq!</span>(uri.host(), <span class="prelude-val">Some</span>(<span class="string">"www.rust-lang.org"</span>));
|
||
<span class="macro">assert_eq!</span>(uri.path(), <span class="string">"/install.html"</span>);</code></pre></div></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-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#183-706">Source</a><a href="#impl-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.builder" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#201-203">Source</a><h4 class="code-header">pub fn <a href="#method.builder" class="fn">builder</a>() -> <a class="struct" href="struct.Builder.html" title="struct http::uri::Builder">Builder</a></h4></section></summary><div class="docblock"><p>Creates a new builder-style object to manufacture a <code>Uri</code>.</p>
|
||
<p>This method returns an instance of <code>Builder</code> which can be usd to
|
||
create a <code>Uri</code>.</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">use </span>http::Uri;
|
||
|
||
<span class="kw">let </span>uri = Uri::builder()
|
||
.scheme(<span class="string">"https"</span>)
|
||
.authority(<span class="string">"hyper.rs"</span>)
|
||
.path_and_query(<span class="string">"/"</span>)
|
||
.build()
|
||
.unwrap();</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.from_parts" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#239-274">Source</a><h4 class="code-header">pub fn <a href="#method.from_parts" class="fn">from_parts</a>(src: <a class="struct" href="struct.Parts.html" title="struct http::uri::Parts">Parts</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a>, <a class="struct" href="struct.InvalidUriParts.html" title="struct http::uri::InvalidUriParts">InvalidUriParts</a>></h4></section></summary><div class="docblock"><p>Attempt to convert a <code>Parts</code> into a <code>Uri</code>.</p>
|
||
<h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5>
|
||
<p>Relative URI</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>parts = Parts::default();
|
||
parts.path_and_query = <span class="prelude-val">Some</span>(<span class="string">"/foo"</span>.parse().unwrap());
|
||
|
||
<span class="kw">let </span>uri = Uri::from_parts(parts).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(uri.path(), <span class="string">"/foo"</span>);
|
||
|
||
<span class="macro">assert!</span>(uri.scheme().is_none());
|
||
<span class="macro">assert!</span>(uri.authority().is_none());</code></pre></div>
|
||
<p>Absolute URI</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>parts = Parts::default();
|
||
parts.scheme = <span class="prelude-val">Some</span>(<span class="string">"http"</span>.parse().unwrap());
|
||
parts.authority = <span class="prelude-val">Some</span>(<span class="string">"foo.com"</span>.parse().unwrap());
|
||
parts.path_and_query = <span class="prelude-val">Some</span>(<span class="string">"/foo"</span>.parse().unwrap());
|
||
|
||
<span class="kw">let </span>uri = Uri::from_parts(parts).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(uri.scheme().unwrap().as_str(), <span class="string">"http"</span>);
|
||
<span class="macro">assert_eq!</span>(uri.authority().unwrap(), <span class="string">"foo.com"</span>);
|
||
<span class="macro">assert_eq!</span>(uri.path(), <span class="string">"/foo"</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.from_maybe_shared" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#280-289">Source</a><h4 class="code-header">pub fn <a href="#method.from_maybe_shared" class="fn">from_maybe_shared</a><T>(src: T) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="struct" href="struct.InvalidUri.html" title="struct http::uri::InvalidUri">InvalidUri</a>><div class="where">where
|
||
T: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]> + 'static,</div></h4></section></summary><div class="docblock"><p>Attempt to convert a <code>Bytes</code> buffer to a <code>Uri</code>.</p>
|
||
<p>This will try to prevent a copy if the type passed is the type used
|
||
internally, and will copy the data if it is not.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_static" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#360-366">Source</a><h4 class="code-header">pub fn <a href="#method.from_static" class="fn">from_static</a>(src: &'static <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>) -> Self</h4></section></summary><div class="docblock"><p>Convert a <code>Uri</code> from a static string.</p>
|
||
<p>This function will not perform any copying, however the string is
|
||
checked to ensure that it is valid.</p>
|
||
<h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5>
|
||
<p>This function panics if the argument is an invalid URI.</p>
|
||
<h5 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri = Uri::from_static(<span class="string">"http://example.com/foo"</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(uri.host().unwrap(), <span class="string">"example.com"</span>);
|
||
<span class="macro">assert_eq!</span>(uri.path(), <span class="string">"/foo"</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.into_parts" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#389-391">Source</a><h4 class="code-header">pub fn <a href="#method.into_parts" class="fn">into_parts</a>(self) -> <a class="struct" href="struct.Parts.html" title="struct http::uri::Parts">Parts</a></h4></section></summary><div class="docblock"><p>Convert a <code>Uri</code> into <code>Parts</code>.</p>
|
||
<h5 id="note"><a class="doc-anchor" href="#note">§</a>Note</h5>
|
||
<p>This is just an inherent method providing the same functionality as
|
||
<code>let parts: Parts = uri.into()</code></p>
|
||
<h5 id="examples-4"><a class="doc-anchor" href="#examples-4">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"/foo"</span>.parse().unwrap();
|
||
|
||
<span class="kw">let </span>parts = uri.into_parts();
|
||
|
||
<span class="macro">assert_eq!</span>(parts.path_and_query.unwrap(), <span class="string">"/foo"</span>);
|
||
|
||
<span class="macro">assert!</span>(parts.scheme.is_none());
|
||
<span class="macro">assert!</span>(parts.authority.is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.path_and_query" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#395-401">Source</a><h4 class="code-header">pub fn <a href="#method.path_and_query" class="fn">path_and_query</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="struct.PathAndQuery.html" title="struct http::uri::PathAndQuery">PathAndQuery</a>></h4></section></summary><div class="docblock"><p>Returns the path & query components of the Uri</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.path" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#438-444">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/1.93.1/std/primitive.str.html">str</a></h4></section></summary><div class="docblock"><p>Get the path of this <code>Uri</code>.</p>
|
||
<p>Both relative and absolute URIs contain a path component, though it
|
||
might be the empty string. The path component is <strong>case sensitive</strong>.</p>
|
||
<div class="example-wrap"><pre class="language-notrust"><code>abc://username:password@example.com:123/path/data?key=value&key2=value2#fragid1
|
||
|--------|
|
||
|
|
||
path</code></pre></div>
|
||
<p>If the URI is <code>*</code> then the path component is equal to <code>*</code>.</p>
|
||
<h5 id="examples-5"><a class="doc-anchor" href="#examples-5">§</a>Examples</h5>
|
||
<p>A relative URI</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code>
|
||
<span class="kw">let </span>uri: Uri = <span class="string">"/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(uri.path(), <span class="string">"/hello/world"</span>);</code></pre></div>
|
||
<p>An absolute URI</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"http://example.org/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(uri.path(), <span class="string">"/hello/world"</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.scheme" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#482-488">Source</a><h4 class="code-header">pub fn <a href="#method.scheme" class="fn">scheme</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="struct.Scheme.html" title="struct http::uri::Scheme">Scheme</a>></h4></section></summary><div class="docblock"><p>Get the scheme of this <code>Uri</code>.</p>
|
||
<p>The URI scheme refers to a specification for assigning identifiers
|
||
within that scheme. Only absolute URIs contain a scheme component, but
|
||
not all absolute URIs will contain a scheme component. Although scheme
|
||
names are case-insensitive, the canonical form is lowercase.</p>
|
||
<div class="example-wrap"><pre class="language-notrust"><code>abc://username:password@example.com:123/path/data?key=value&key2=value2#fragid1
|
||
|-|
|
||
|
|
||
scheme</code></pre></div><h5 id="examples-6"><a class="doc-anchor" href="#examples-6">§</a>Examples</h5>
|
||
<p>Absolute URI</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>http::uri::{Scheme, Uri};
|
||
|
||
<span class="kw">let </span>uri: Uri = <span class="string">"http://example.org/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(uri.scheme(), <span class="prelude-val">Some</span>(<span class="kw-2">&</span>Scheme::HTTP));</code></pre></div>
|
||
<p>Relative URI</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert!</span>(uri.scheme().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.scheme_str" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#501-507">Source</a><h4 class="code-header">pub fn <a href="#method.scheme_str" class="fn">scheme_str</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>></h4></section></summary><div class="docblock"><p>Get the scheme of this <code>Uri</code> as a <code>&str</code>.</p>
|
||
<h5 id="example"><a class="doc-anchor" href="#example">§</a>Example</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"http://example.org/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(uri.scheme_str(), <span class="prelude-val">Some</span>(<span class="string">"http"</span>));</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.authority" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#547-553">Source</a><h4 class="code-header">pub fn <a href="#method.authority" class="fn">authority</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="struct.Authority.html" title="struct http::uri::Authority">Authority</a>></h4></section></summary><div class="docblock"><p>Get the authority of this <code>Uri</code>.</p>
|
||
<p>The authority is a hierarchical element for naming authority such that
|
||
the remainder of the URI is delegated to that authority. For HTTP, the
|
||
authority consists of the host and port. The host portion of the
|
||
authority is <strong>case-insensitive</strong>.</p>
|
||
<p>The authority also includes a <code>username:password</code> component, however
|
||
the use of this is deprecated and should be avoided.</p>
|
||
<div class="example-wrap"><pre class="language-notrust"><code>abc://username:password@example.com:123/path/data?key=value&key2=value2#fragid1
|
||
|-------------------------------|
|
||
|
|
||
authority</code></pre></div><h5 id="examples-7"><a class="doc-anchor" href="#examples-7">§</a>Examples</h5>
|
||
<p>Absolute URI</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"http://example.org:80/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(uri.authority().map(|a| a.as_str()), <span class="prelude-val">Some</span>(<span class="string">"example.org:80"</span>));</code></pre></div>
|
||
<p>Relative URI</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert!</span>(uri.authority().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.host" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#589-591">Source</a><h4 class="code-header">pub fn <a href="#method.host" class="fn">host</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>></h4></section></summary><div class="docblock"><p>Get the host of this <code>Uri</code>.</p>
|
||
<p>The host subcomponent of authority is identified by an IP literal
|
||
encapsulated within square brackets, an IPv4 address in dotted- decimal
|
||
form, or a registered name. The host subcomponent is <strong>case-insensitive</strong>.</p>
|
||
<div class="example-wrap"><pre class="language-notrust"><code>abc://username:password@example.com:123/path/data?key=value&key2=value2#fragid1
|
||
|---------|
|
||
|
|
||
host</code></pre></div><h5 id="examples-8"><a class="doc-anchor" href="#examples-8">§</a>Examples</h5>
|
||
<p>Absolute URI</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"http://example.org:80/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(uri.host(), <span class="prelude-val">Some</span>(<span class="string">"example.org"</span>));</code></pre></div>
|
||
<p>Relative URI</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert!</span>(uri.host().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.port" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#636-638">Source</a><h4 class="code-header">pub fn <a href="#method.port" class="fn">port</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.Port.html" title="struct http::uri::Port">Port</a><&<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>>></h4></section></summary><div class="docblock"><p>Get the port part of this <code>Uri</code>.</p>
|
||
<p>The port subcomponent of authority is designated by an optional port
|
||
number following the host and delimited from it by a single colon (“:”)
|
||
character. It can be turned into a decimal port number with the <code>as_u16</code>
|
||
method or as a <code>str</code> with the <code>as_str</code> method.</p>
|
||
<div class="example-wrap"><pre class="language-notrust"><code>abc://username:password@example.com:123/path/data?key=value&key2=value2#fragid1
|
||
|-|
|
||
|
|
||
port</code></pre></div><h5 id="examples-9"><a class="doc-anchor" href="#examples-9">§</a>Examples</h5>
|
||
<p>Absolute URI with port</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"http://example.org:80/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="kw">let </span>port = uri.port().unwrap();
|
||
<span class="macro">assert_eq!</span>(port.as_u16(), <span class="number">80</span>);</code></pre></div>
|
||
<p>Absolute URI without port</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"http://example.org/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert!</span>(uri.port().is_none());</code></pre></div>
|
||
<p>Relative URI</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert!</span>(uri.port().is_none());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.port_u16" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#651-653">Source</a><h4 class="code-header">pub fn <a href="#method.port_u16" class="fn">port_u16</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u16.html">u16</a>></h4></section></summary><div class="docblock"><p>Get the port of this <code>Uri</code> as a <code>u16</code>.</p>
|
||
<h5 id="example-1"><a class="doc-anchor" href="#example-1">§</a>Example</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"http://example.org:80/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(uri.port_u16(), <span class="prelude-val">Some</span>(<span class="number">80</span>));</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.query" class="method"><a class="src rightside" href="../../src/http/uri/mod.rs.html#699-701">Source</a><h4 class="code-header">pub fn <a href="#method.query" class="fn">query</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>></h4></section></summary><div class="docblock"><p>Get the query string of this <code>Uri</code>, starting after the <code>?</code>.</p>
|
||
<p>The query component contains non-hierarchical data that, along with data
|
||
in the path component, serves to identify a resource within the scope of
|
||
the URI’s scheme and naming authority (if any). The query component is
|
||
indicated by the first question mark (“?”) character and terminated by a
|
||
number sign (“#”) character or by the end of the URI.</p>
|
||
<div class="example-wrap"><pre class="language-notrust"><code>abc://username:password@example.com:123/path/data?key=value&key2=value2#fragid1
|
||
|-------------------|
|
||
|
|
||
query</code></pre></div><h5 id="examples-10"><a class="doc-anchor" href="#examples-10">§</a>Examples</h5>
|
||
<p>Absolute URI</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"http://example.org/hello/world?key=value"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(uri.query(), <span class="prelude-val">Some</span>(<span class="string">"key=value"</span>));</code></pre></div>
|
||
<p>Relative URI with a query string component</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"/hello/world?key=value&foo=bar"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(uri.query(), <span class="prelude-val">Some</span>(<span class="string">"key=value&foo=bar"</span>));</code></pre></div>
|
||
<p>Relative URI without a query string component</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>uri: Uri = <span class="string">"/hello/world"</span>.parse().unwrap();
|
||
|
||
<span class="macro">assert!</span>(uri.query().is_none());</code></pre></div></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-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#95">Source</a><a href="#impl-Clone-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</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/http/uri/mod.rs.html#95">Source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h4></section></summary><div class='docblock'>Returns a duplicate of the value. <a href="https://doc.rust-lang.org/1.93.1/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/1.93.1/src/core/clone.rs.html#245-247">Source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, source: &Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.93.1/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-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#1044-1048">Source</a><a href="#impl-Debug-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#1045-1047">Source</a><a href="#method.fmt-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.93.1/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/1.93.1/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#1013-1022">Source</a><a href="#impl-Default-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3><div class="docblock"><p>Returns a <code>Uri</code> representing <code>/</code></p>
|
||
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#1015-1021">Source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.93.1/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#1024-1042">Source</a><a href="#impl-Display-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</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/http/uri/mod.rs.html#1025-1041">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Display.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.93.1/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/1.93.1/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CAuthority%3E-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#772-780">Source</a><a href="#impl-From%3CAuthority%3E-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Authority.html" title="struct http::uri::Authority">Authority</a>> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3><div class="docblock"><p>Convert an <code>Authority</code> into a <code>Uri</code>.</p>
|
||
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#773-779">Source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(authority: <a class="struct" href="struct.Authority.html" title="struct http::uri::Authority">Authority</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CPathAndQuery%3E-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#783-791">Source</a><a href="#impl-From%3CPathAndQuery%3E-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.PathAndQuery.html" title="struct http::uri::PathAndQuery">PathAndQuery</a>> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3><div class="docblock"><p>Convert a <code>PathAndQuery</code> into a <code>Uri</code>.</p>
|
||
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#784-790">Source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(path_and_query: <a class="struct" href="struct.PathAndQuery.html" title="struct http::uri::PathAndQuery">PathAndQuery</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CUri%3E-for-Builder" class="impl"><a class="src rightside" href="../../src/http/uri/builder.rs.html#155-161">Source</a><a href="#impl-From%3CUri%3E-for-Builder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a>> for <a class="struct" href="struct.Builder.html" title="struct http::uri::Builder">Builder</a></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="../../src/http/uri/builder.rs.html#156-160">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(uri: <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CUri%3E-for-Parts" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#794-820">Source</a><a href="#impl-From%3CUri%3E-for-Parts" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a>> for <a class="struct" href="struct.Parts.html" title="struct http::uri::Parts">Parts</a></h3><div class="docblock"><p>Convert a <code>Uri</code> into <code>Parts</code></p>
|
||
</div></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-3" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#795-819">Source</a><a href="#method.from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(src: <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromStr-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#882-889">Source</a><a href="#impl-FromStr-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/str/traits/trait.FromStr.html" title="trait core::str::traits::FromStr">FromStr</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Err" class="associatedtype trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#883">Source</a><a href="#associatedtype.Err" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/str/traits/trait.FromStr.html#associatedtype.Err" class="associatedtype">Err</a> = <a class="struct" href="struct.InvalidUri.html" title="struct http::uri::InvalidUri">InvalidUri</a></h4></section></summary><div class='docblock'>The associated error which can be returned from parsing.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_str" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#886-888">Source</a><a href="#method.from_str" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/str/traits/trait.FromStr.html#tymethod.from_str" class="fn">from_str</a>(s: &<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a>, <a class="struct" href="struct.InvalidUri.html" title="struct http::uri::InvalidUri">InvalidUri</a>></h4></section></summary><div class='docblock'>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/1.93.1/core/str/traits/trait.FromStr.html#tymethod.from_str">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Hash-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#1096-1117">Source</a><a href="#impl-Hash-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.hash" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#1097-1116">Source</a><a href="#method.hash" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/hash/trait.Hash.html#tymethod.hash" class="fn">hash</a><H>(&self, state: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&mut H</a>)<div class="where">where
|
||
H: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,</div></h4></section></summary><div class='docblock'>Feeds this value into the given <a href="https://doc.rust-lang.org/1.93.1/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.93.1/core/hash/trait.Hash.html#tymethod.hash">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.hash_slice" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.3.0">1.3.0</span> · <a class="src" href="https://doc.rust-lang.org/1.93.1/src/core/hash/mod.rs.html#235-237">Source</a></span><a href="#method.hash_slice" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/hash/trait.Hash.html#method.hash_slice" class="fn">hash_slice</a><H>(data: &[Self], state: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&mut H</a>)<div class="where">where
|
||
H: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class='docblock'>Feeds a slice of this type into the given <a href="https://doc.rust-lang.org/1.93.1/core/hash/trait.Hasher.html" title="trait core::hash::Hasher"><code>Hasher</code></a>. <a href="https://doc.rust-lang.org/1.93.1/core/hash/trait.Hash.html#method.hash_slice">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3C%26str%3E-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#998-1002">Source</a><a href="#impl-PartialEq%3C%26str%3E-for-Uri" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-3" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#999-1001">Source</a><a href="#method.eq-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &&'a <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-3" 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/1.93.1/src/core/cmp.rs.html#264">Source</a></span><a href="#method.ne-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
|
||
and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CUri%3E-for-%26str" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#1004-1008">Source</a><a href="#impl-PartialEq%3CUri%3E-for-%26str" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a>> for &'a <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-4" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#1005-1007">Source</a><a href="#method.eq-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, uri: &<a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-4" 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/1.93.1/src/core/cmp.rs.html#264">Source</a></span><a href="#method.ne-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
|
||
and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CUri%3E-for-str" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#992-996">Source</a><a href="#impl-PartialEq%3CUri%3E-for-str" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a>> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#993-995">Source</a><a href="#method.eq-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, uri: &<a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-2" 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/1.93.1/src/core/cmp.rs.html#264">Source</a></span><a href="#method.ne-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
|
||
and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq%3Cstr%3E-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#913-990">Source</a><a href="#impl-PartialEq%3Cstr%3E-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#914-989">Source</a><a href="#method.eq-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne-1" 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/1.93.1/src/core/cmp.rs.html#264">Source</a></span><a href="#method.ne-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
|
||
and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-PartialEq-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#891-911">Source</a><a href="#impl-PartialEq-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#892-910">Source</a><a href="#method.eq" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#tymethod.eq" class="fn">eq</a>(&self, other: &<a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.ne" 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/1.93.1/src/core/cmp.rs.html#264">Source</a></span><a href="#method.ne" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html#method.ne" class="fn">ne</a>(&self, other: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.reference.html">&Rhs</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Tests for <code>!=</code>. The default implementation is almost always sufficient,
|
||
and should not be overridden without very good reason.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-TryFrom%3C%26%5Bu8%5D%3E-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#708-715">Source</a><a href="#impl-TryFrom%3C%26%5Bu8%5D%3E-for-Uri" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'a [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#709">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="struct.InvalidUri.html" title="struct http::uri::InvalidUri">InvalidUri</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="../../src/http/uri/mod.rs.html#712-714">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(t: &'a [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/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" open><summary><section id="impl-TryFrom%3C%26String%3E-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#726-733">Source</a><a href="#impl-TryFrom%3C%26String%3E-for-Uri" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'a <a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-2" class="associatedtype trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#727">Source</a><a href="#associatedtype.Error-2" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="struct.InvalidUri.html" title="struct http::uri::InvalidUri">InvalidUri</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-2" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#730-732">Source</a><a href="#method.try_from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(t: &'a <a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/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" open><summary><section id="impl-TryFrom%3C%26Uri%3E-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#762-769">Source</a><a href="#impl-TryFrom%3C%26Uri%3E-for-Uri" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'a <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a>> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-6" class="associatedtype trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#763">Source</a><a href="#associatedtype.Error-6" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="../struct.Error.html" title="struct http::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_from-6" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#766-768">Source</a><a href="#method.try_from-6" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(src: &'a <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/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" open><summary><section id="impl-TryFrom%3C%26str%3E-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#717-724">Source</a><a href="#impl-TryFrom%3C%26str%3E-for-Uri" class="anchor">§</a><h3 class="code-header">impl<'a> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><&'a <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#718">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="struct.InvalidUri.html" title="struct http::uri::InvalidUri">InvalidUri</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-1" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#721-723">Source</a><a href="#method.try_from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(t: &'a <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/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" open><summary><section id="impl-TryFrom%3CParts%3E-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#753-760">Source</a><a href="#impl-TryFrom%3CParts%3E-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><<a class="struct" href="struct.Parts.html" title="struct http::uri::Parts">Parts</a>> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-5" class="associatedtype trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#754">Source</a><a href="#associatedtype.Error-5" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="struct.InvalidUriParts.html" title="struct http::uri::InvalidUriParts">InvalidUriParts</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-5" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#757-759">Source</a><a href="#method.try_from-5" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(src: <a class="struct" href="struct.Parts.html" title="struct http::uri::Parts">Parts</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/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" open><summary><section id="impl-TryFrom%3CString%3E-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#735-742">Source</a><a href="#impl-TryFrom%3CString%3E-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><<a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-3" class="associatedtype trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#736">Source</a><a href="#associatedtype.Error-3" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="struct.InvalidUri.html" title="struct http::uri::InvalidUri">InvalidUri</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-3" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#739-741">Source</a><a href="#method.try_from-3" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(t: <a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/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" open><summary><section id="impl-TryFrom%3CVec%3Cu8%3E%3E-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#744-751">Source</a><a href="#impl-TryFrom%3CVec%3Cu8%3E%3E-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><<a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>>> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-4" class="associatedtype trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#745">Source</a><a href="#associatedtype.Error-4" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="struct" href="struct.InvalidUri.html" title="struct http::uri::InvalidUri">InvalidUri</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-4" class="method trait-impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#748-750">Source</a><a href="#method.try_from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(vec: <a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>>) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, Self::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/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><section id="impl-Eq-for-Uri" class="impl"><a class="src rightside" href="../../src/http/uri/mod.rs.html#1010">Source</a><a href="#impl-Eq-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></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-Uri" class="impl"><a href="#impl-Freeze-for-Uri" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section><section id="impl-RefUnwindSafe-for-Uri" class="impl"><a href="#impl-RefUnwindSafe-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section><section id="impl-Send-for-Uri" class="impl"><a href="#impl-Send-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section><section id="impl-Sync-for-Uri" class="impl"><a href="#impl-Sync-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section><section id="impl-Unpin-for-Uri" class="impl"><a href="#impl-Unpin-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section><section id="impl-UnwindSafe-for-Uri" class="impl"><a href="#impl-UnwindSafe-for-Uri" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Uri.html" title="struct http::uri::Uri">Uri</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
|
||
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/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/1.93.1/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.93.1/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/1.93.1/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/1.93.1/src/core/borrow.rs.html#212">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/1.93.1/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/1.93.1/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/1.93.1/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/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/1.93.1/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/1.93.1/src/core/borrow.rs.html#221">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/1.93.1/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/1.93.1/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/1.93.1/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.93.1/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/1.93.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-CloneToUninit-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/clone.rs.html#547">Source</a><a href="#impl-CloneToUninit-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.CloneToUninit.html" title="trait core::clone::CloneToUninit">CloneToUninit</a> for T<div class="where">where
|
||
T: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone_to_uninit" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/clone.rs.html#549">Source</a><a href="#method.clone_to_uninit" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit" class="fn">clone_to_uninit</a>(&self, dest: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>clone_to_uninit</code>)</span></div></span><div class='docblock'>Performs copy-assignment from <code>self</code> to <code>dest</code>. <a href="https://doc.rust-lang.org/1.93.1/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit">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/1.93.1/src/core/convert/mod.rs.html#785">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/1.93.1/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-4" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from-4" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/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-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#767-769">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/1.93.1/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/1.93.1/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/1.93.1/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/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/1.93.1/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-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/alloc/borrow.rs.html#85-87">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/1.93.1/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/1.93.1/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 class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/alloc/borrow.rs.html#89">Source</a><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/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/1.93.1/src/alloc/borrow.rs.html#90">Source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/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/1.93.1/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/1.93.1/src/alloc/borrow.rs.html#94">Source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/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/1.93.1/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToString-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/alloc/string.rs.html#2864">Source</a><a href="#impl-ToString-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.93.1/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<div class="where">where
|
||
T: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/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.to_string" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/alloc/string.rs.html#2866">Source</a><a href="#method.to_string" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/alloc/string/trait.ToString.html#tymethod.to_string" class="fn">to_string</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.93.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/1.93.1/alloc/string/trait.ToString.html#tymethod.to_string">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/1.93.1/src/core/convert/mod.rs.html#827-829">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/1.93.1/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/1.93.1/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-8" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-8" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.93.1/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-7" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from-7" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/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/1.93.1/src/core/convert/mod.rs.html#811-813">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/1.93.1/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/1.93.1/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-7" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.93.1/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error-7" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/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/1.93.1/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.93.1/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></div></section></div></main></body></html> |