<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="API documentation for the Rust `StatusCode` struct in crate `actix_web`."><metaname="keywords"content="rust, rustlang, rust-lang, StatusCode"><title>actix_web::http::StatusCode - Rust</title><linkrel="stylesheet"type="text/css"href="../../normalize.css"><linkrel="stylesheet"type="text/css"href="../../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../../dark.css"><linkrel="stylesheet"type="text/css"href="../../light.css"id="themeStyle"><scriptsrc="../../storage.js"></script></head><bodyclass="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="sidebar"><divclass="sidebar-menu">☰</div><pclass='location'>Struct StatusCode</p><divclass="sidebar-elems"><divclass="block items"><aclass="sidebar-title"href="#methods">Methods</a><divclass="sidebar-links"><ahref="#method.from_u16">from_u16</a><ahref="#method.from_bytes">from_bytes</a><ahref="#method.as_u16">as_u16</a><ahref="#method.as_str">as_str</a><ahref="#method.canonical_reason">canonical_reason</a><ahref="#method.is_informational">is_informational</a><ahref="#method.is_success">is_success</a><ahref="#method.is_redirection">is_redirection</a><ahref="#method.is_client_error">is_client_error</a><ahref="#method.is_server_error">is_server_error</a></div><aclass="sidebar-title"href="#implementations">Trait Implementations</a><divclass="sidebar-links"><ahref="#impl-Default">Default</a><ahref="#impl-Eq">Eq</a><ahref="#impl-PartialEq%3CStatusCode%3E">PartialEq<StatusCode></a><ahref="#impl-PartialEq%3Cu16%3E">PartialEq<u16></a><ahref="#impl-Hash">Hash</a><ahref="#impl-FromStr">FromStr</a><ahref="#impl-Ord">Ord</a><ahref="#impl-PartialOrd%3CStatusCode%3E">PartialOrd<StatusCode></a><ahref="#impl-Display">Display</a><ahref="#impl-From%3CStatusCode%3E">From<StatusCode></a><ahref="#impl-Copy">Copy</a><ahref="#impl-Clone">Clone</a><ahref="#impl-HttpTryFrom%3CStatusCode%3E">HttpTryFrom<StatusCode></a><ahref="#impl-HttpTryFrom%3C%26%27a%20%5Bu8%5D%3E">HttpTryFrom<&'a [u8]></a><ahref="#impl-HttpTryFrom%3C%26%27a%20str%3E">HttpTryFrom<&'a str></a><ahref="#impl-HttpTryFrom%3Cu16%3E">HttpTryFrom<u16></a><ahref="#impl-Debug">Debug</a></div><aclass="sidebar-title"href="#synthetic-implementations">Auto Trait Implementations</a><divclass="sidebar-links"><ahref="#impl-Send">Send</a><ahref="#impl-Sync">Sync</a></div></div><pclass='location'><ahref='../index.html'>actix_web</a>::<wbr><ahref='index.html'>http</a></p><script>window.sidebarCurrent={name:'StatusCode',ty:'struct',relpath:''};</script><scriptdefersrc="sidebar-items.js"></script></div></nav><divclass="theme-picker"><buttonid="theme-picker"aria-label="Pick another theme!"><imgsrc="../../brush.svg"width="18"alt="Pick another theme!"></button><divid="theme-choices"></div></div><scriptsrc="../../theme.js"></script><navclass="sub"><formclass="search-form js-only"><divclass="search-container"><inputclass="search-input"name="search"autocomplete="off"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><aid="settings-menu"href="../../settings.html"><imgsrc="../../wheel.svg"width="18"alt="Change settings"></a></div></form></nav><sectionid="main"class="content"><h1class='fqn'><spanclass='in-band'>Struct <ahref='../index.html'>actix_web</a>::<wbr><ahref='index.html'>http</a>::<wbr><aclass="struct"href=''>StatusCode</a></span><spanclass='out-of-band'><spanid='render-detail'><aid="toggle-all-docs"href="javascript:void(0)"title="collapse all docs">[<spanclass='inner'>−</span>]</a></span><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#43'title='goto source code'>[src]</a></span></h
</div><h4id='method.from_bytes'class="method"><spanid='from_bytes.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.from_bytes'class='fnname'>from_bytes</a>(src: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>, <aclass="struct"href="https://docs.rs/http/0.1.8/http/status/struct.InvalidStatusCode.html"title="struct http::status::InvalidStatusCode">InvalidStatusCode</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#81-96'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Converts a &<ahref="https://docs.rs/http/0.1.8/std/primitive.u8.html"title="u8">u8</a> to a status code</p>
</div><h4id='method.as_u16'class="method"><spanid='as_u16.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.as_u16'class='fnname'>as_u16</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#114-116'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the <code>u16</code> corresponding to this <code>StatusCode</code>.</p>
</div><h4id='method.as_str'class="method"><spanid='as_str.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.as_str'class='fnname'>as_str</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#130-132'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns a &str representation of the <code>StatusCode</code></p>
</div><h4id='method.canonical_reason'class="method"><spanid='canonical_reason.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.canonical_reason'class='fnname'>canonical_reason</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&'static <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#151-153'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Get the standardised <code>reason-phrase</code> for this status code.</p>
</div><h4id='method.is_informational'class="method"><spanid='is_informational.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.is_informational'class='fnname'>is_informational</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#158-160'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Check if status is within 100-199.</p>
</div><h4id='method.is_success'class="method"><spanid='is_success.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.is_success'class='fnname'>is_success</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#164-166'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Check if status is within 200-299.</p>
</div><h4id='method.is_redirection'class="method"><spanid='is_redirection.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.is_redirection'class='fnname'>is_redirection</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#170-172'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Check if status is within 300-399.</p>
</div><h4id='method.is_client_error'class="method"><spanid='is_client_error.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.is_client_error'class='fnname'>is_client_error</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#176-178'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Check if status is within 400-499.</p>
</div><h4id='method.is_server_error'class="method"><spanid='is_server_error.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.is_server_error'class='fnname'>is_server_error</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#182-184'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Check if status is within 500-599.</p>
<divid='implementations-list'><h3id='impl-Default'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html"title="trait core::default::Default">Default</a> for <aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code><ahref='#impl-Default'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#208-213'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.default'class="method"><spanid='default.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default'class='fnname'>default</a>() -><aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#210-212'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the "default value" for a type. <ahref="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
</div></div><h3id='impl-Eq'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a> for <aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code><ahref='#impl-Eq'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'></div><h3id='impl-PartialEq%3CStatusCode%3E'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>> for <aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code><ahref='#impl-PartialEq%3CStatusCode%3E'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.eq'class="method"><spanid='eq.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq'class='fnname'>eq</a>(&self, other: &<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div></div><h3id='impl-PartialEq%3CStatusCode%3E-1'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>> for <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code><ahref='#impl-PartialEq%3CStatusCode%3E-1'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#222-227'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.eq-1'class="method"><spanid='eq.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq'class='fnname'>eq</a>(&self, other: &<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#224-226'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne'class='fnname'>ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#126'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3id='impl-PartialEq%3Cu16%3E'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>> for <aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code><ahref='#impl-PartialEq%3Cu16%3E'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#215-220'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.eq-2'class="method"><spanid='eq.v-2'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq'class='fnname'>eq</a>(&self, other: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#217-219'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne'class='fnname'>ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#126'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3id='impl-Hash'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html"title="trait core::hash::Hash">Hash</a> for <aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code><ahref='#impl-Hash'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.hash'class="method"><spanid='hash.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash'class='fnname'>hash</a><__H>(&self, state: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>__H) <spanclass="where fmt-newline">where<br> __H: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html"title="trait core::hash::Hasher">Hasher</a>, </span></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Feeds this value into the given [<code>Hasher</code>]. <ahref="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></p>
</div><h4id='method.hash_slice'class="method"><spanid='hash_slice.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice'class='fnname'>hash_slice</a><H>(data: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[Self]</a>, state: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>H) <spanclass="where fmt-newline">where<br> H: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html"title="trait core::hash::Hasher">Hasher</a>, </span></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><divclass='since'title='Stable since Rust version 1.3.0'>1.3.0</div><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#203-209'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Feeds a slice of this type into the given [<code>Hasher</code>]. <ahref="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></p>
<divclass='docblock'><p>The associated error which can be returned from parsing.</p>
</div><h4id='method.from_str'class="method"><spanid='from_str.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str'class='fnname'>from_str</a>(s: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>, <aclass="struct"href="https://docs.rs/http/0.1.8/http/status/struct.InvalidStatusCode.html"title="struct http::status::InvalidStatusCode">InvalidStatusCode</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#239-241'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses a string <code>s</code> to return a value of this type. <ahref="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str">Read more</a></p>
</div></div><h3id='impl-Ord'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html"title="trait core::cmp::Ord">Ord</a> for <aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code><ahref='#impl-Ord'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.cmp'class="method"><spanid='cmp.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp'class='fnname'>cmp</a>(&self, other: &<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>This method returns an <code>Ordering</code> between <code>self</code> and <code>other</code>. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></p>
</div><h4id='method.max'class="method"><spanid='max.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max'class='fnname'>max</a>(self, other: Self) -> Self</code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><divclass='since'title='Stable since Rust version 1.21.0'>1.21.0</div><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#472-475'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Compares and returns the maximum of two values. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></p>
</div><h4id='method.min'class="method"><spanid='min.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min'class='fnname'>min</a>(self, other: Self) -> Self</code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><divclass='since'title='Stable since Rust version 1.21.0'>1.21.0</div><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#488-491'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Compares and returns the minimum of two values. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></p>
</div></div><h3id='impl-PartialOrd%3CStatusCode%3E'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html"title="trait core::cmp::PartialOrd">PartialOrd</a><<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>> for <aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code><ahref='#impl-PartialOrd%3CStatusCode%3E'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.partial_cmp'class="method"><spanid='partial_cmp.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp'class='fnname'>partial_cmp</a>(&self, other: &<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="enum"href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html"title="enum core::cmp::Ordering">Ordering</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></p>
</div><h4id='method.lt'class="method"><spanid='lt.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt'class='fnname'>lt</a>(&self, other: &<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code><</code> operator. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></p>
</div><h4id='method.le'class="method"><spanid='le.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le'class='fnname'>le</a>(&self, other: &<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code><=</code> operator. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></p>
</div><h4id='method.gt'class="method"><spanid='gt.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt'class='fnname'>gt</a>(&self, other: &<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>></code> operator. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></p>
</div><h4id='method.ge'class="method"><spanid='ge.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge'class='fnname'>ge</a>(&self, other: &<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>>=</code> operator. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></p>
</div></div><h3id='impl-Display'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html"title="trait core::fmt::Display">Display</a> for <aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code><ahref='#impl-Display'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#201-206'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='docblock'><p>Formats the status code, <em>including</em> the canonical reason.</p>
</div><divclass='impl-items'><h4id='method.fmt'class="method"><spanid='fmt.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt'class='fnname'>fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <aclass="struct"href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html"title="struct core::fmt::Error">Error</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#202-205'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Formats the value using the given formatter. <ahref="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
</div></div><h3id='impl-From%3CStatusCode%3E'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html"title="trait core::convert::From">From</a><<aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>> for <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code><ahref='#impl-From%3CStatusCode%3E'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#229-234'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.from'class="method"><spanid='from.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from'class='fnname'>from</a>(status: <aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#231-233'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Performs the conversion.</p>
</div></div><h3id='impl-Copy'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html"title="trait core::marker::Copy">Copy</a> for <aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code><ahref='#impl-Copy'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'></div><h3id='impl-Clone'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a> for <aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code><ahref='#impl-Clone'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.clone'class="method"><spanid='clone.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone'class='fnname'>clone</a>(&self) -><aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/http/0.1.8/src/http/status.rs.html#42'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns a copy of the value. <ahref="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4id='method.clone_from'class="method"><spanid='clone_from.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from'class='fnname'>clone_from</a>(&mut self, source: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#130-132'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Performs copy-assignment from <code>source</code>. <ahref="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
Auto Trait Implementations<ahref='#synthetic-implementations'class='anchor'></a>
</h2>
<divid='synthetic-implementations-list'>
<h3id='impl-Send'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> for <aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code><ahref='#impl-Send'class='anchor'></a></span></td><td><spanclass='out-of-band'></span></td></tr></tbody></table></h3><divclass='impl-items'></div><h3id='impl-Sync'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> for <aclass="struct"href="../../actix_web/http/struct.StatusCode.html"title="struct actix_web::http::StatusCode">StatusCode</a></code><ahref='#impl-Sync'class='anchor'></a></span></td><td><spanclass='out-of-band'></span></td></tr></tbody></table></h3><divclass='impl-items'></div></div></section><sectionid="search"class="content hidden"></section><sectionclass="footer"></section><asideid="help"class="hidden"><div><h1class="hidden">Help</h1><divclass="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><divclass="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath="../../";window.currentCrate="actix_web";</script><scriptsrc="../../aliases.js"></script><scriptsrc="../../main.js"></script><scriptdefersrc="../../search-index.js"></script></body></html>