43 lines
35 KiB
HTML
43 lines
35 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `ResponseError` trait in crate `actix_web`."><meta name="keywords" content="rust, rustlang, rust-lang, ResponseError"><title>actix_web::ResponseError - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../actix_web/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Trait ResponseError</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.error_response">error_response</a><a href="#method.render_response">render_response</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-ResponseError-for-Canceled">Canceled</a><a href="#impl-ResponseError-for-Error">Error</a><a href="#impl-ResponseError-for-Error">Error</a><a href="#impl-ResponseError-for-Error">Error</a><a href="#impl-ResponseError-for-Error">Error</a><a href="#impl-ResponseError-for-Error">Error</a><a href="#impl-ResponseError-for-Error">Error</a><a href="#impl-ResponseError-for-HandshakeError">HandshakeError</a><a href="#impl-ResponseError-for-JsonPayloadError">JsonPayloadError</a><a href="#impl-ResponseError-for-ProtocolError">ProtocolError</a><a href="#impl-ResponseError-for-TimeoutError%3CE%3E">TimeoutError<E></a><a href="#impl-ResponseError-for-Utf8Error">Utf8Error</a></div><a class="sidebar-title" href="#implementors">Implementors</a><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.downcast_ref">downcast_ref</a></div></div><p class='location'><a href='index.html'>actix_web</a></p><script>window.sidebarCurrent = {name: 'ResponseError', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/actix_http/error.rs.html#63-90' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='index.html'>actix_web</a>::<wbr><a class="trait" href=''>ResponseError</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait ResponseError: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> {
|
||
fn <a href='#method.error_response' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>> { ... }
|
||
<div class='item-spacer'></div> fn <a href='#method.render_response' class='fnname'>render_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>> { ... }
|
||
}</pre></div><div class='docblock'><p>Error that can be converted to <code>Response</code></p>
|
||
</div>
|
||
<h2 id='provided-methods' class='small-section-header'>Provided methods<a href='#provided-methods' class='anchor'></a></h2><div class='methods'><h3 id='method.error_response' class='method'><code id='error_response.v'>fn <a href='#method.error_response' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code></h3><div class='docblock'><p>Create response for error</p>
|
||
<p>Internal server error is generated by default.</p>
|
||
</div><h3 id='method.render_response' class='method'><code id='render_response.v'>fn <a href='#method.render_response' class='fnname'>render_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code></h3><div class='docblock'><p>Constructs an error response</p>
|
||
</div></div><span class='loading-content'>Loading content...</span><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl dyn <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a> + 'static</code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#92-101' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.downcast_ref' class="method"><code id='downcast_ref.v'>pub fn <a href='#method.downcast_ref' class='fnname'>downcast_ref</a><T>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T> <span class="where fmt-newline">where<br> T: 'static + <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a>, </span></code><a class='srclink' href='../src/actix_http/error.rs.html#94-100' title='goto source code'>[src]</a></h4><div class='docblock'><p>Downcasts a response error to a specific type.</p>
|
||
</div></div>
|
||
<h2 id='foreign-impls' class='small-section-header'>Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a></h2><h3 id='impl-ResponseError-for-Error' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a> for <a class="struct" href="../serde/de/value/struct.Error.html" title="struct serde::de::value::Error">Error</a></code><a href='#impl-ResponseError-for-Error' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#194-198' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>BAD_REQUEST</code> for <code>de::value::Error</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-1' class="method hidden"><code id='error_response.v-1'>fn <a href='#method.error_response' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/error.rs.html#195-197' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-for-Error-1' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a> for <a class="struct" href="../serde_json/error/struct.Error.html" title="struct serde_json::error::Error">Error</a></code><a href='#impl-ResponseError-for-Error-1' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#177' title='goto source code'>[src]</a></h3><div class='docblock'><p><code>InternalServerError</code> for <code>JsonError</code></p>
|
||
</div><div class='impl-items'></div><h3 id='impl-ResponseError-for-Error-2' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a></code><a href='#impl-ResponseError-for-Error-2' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#215-223' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>InternalServerError</code> for <code>io::Error</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-2' class="method hidden"><code id='error_response.v-2'>fn <a href='#method.error_response' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/error.rs.html#216-222' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-for-HandshakeError' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a> for <a class="enum" href="../actix_http/ws/enum.HandshakeError.html" title="enum actix_http::ws::HandshakeError">HandshakeError</a></code><a href='#impl-ResponseError-for-HandshakeError' class='anchor'></a><a class='srclink' href='../src/actix_http/ws/mod.rs.html#83-106' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.error_response-3' class="method hidden"><code id='error_response.v-3'>fn <a href='#method.error_response' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/ws/mod.rs.html#84-105' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-for-Canceled' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a> for <a class="struct" href="../futures/sync/oneshot/struct.Canceled.html" title="struct futures::sync::oneshot::Canceled">Canceled</a></code><a href='#impl-ResponseError-for-Canceled' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#240' title='goto source code'>[src]</a></h3><div class='docblock'><p><code>InternalServerError</code> for <code>futures::Canceled</code></p>
|
||
</div><div class='impl-items'></div><h3 id='impl-ResponseError-for-TimeoutError%3CE%3E' class='impl'><code class='in-band'>impl<E> <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a> for <a class="enum" href="../actix_utils/timeout/enum.TimeoutError.html" title="enum actix_utils::timeout::TimeoutError">TimeoutError</a><E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a>, </span></code><a href='#impl-ResponseError-for-TimeoutError%3CE%3E' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#160-167' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>GATEWAY_TIMEOUT</code> for <code>TimeoutError</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-4' class="method hidden"><code id='error_response.v-4'>fn <a href='#method.error_response' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/error.rs.html#161-166' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-for-ProtocolError' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a> for <a class="enum" href="../actix_http/ws/enum.ProtocolError.html" title="enum actix_http::ws::ProtocolError">ProtocolError</a></code><a href='#impl-ResponseError-for-ProtocolError' class='anchor'></a><a class='srclink' href='../src/actix_http/ws/mod.rs.html#58' title='goto source code'>[src]</a></h3><div class='impl-items'></div><h3 id='impl-ResponseError-for-Error-3' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a> for <a class="enum" href="../serde_urlencoded/ser/enum.Error.html" title="enum serde_urlencoded::ser::Error">Error</a></code><a href='#impl-ResponseError-for-Error-3' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#180' title='goto source code'>[src]</a></h3><div class='docblock'><p><code>InternalServerError</code> for <code>FormError</code></p>
|
||
</div><div class='impl-items'></div><h3 id='impl-ResponseError-for-Error-4' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a> for <a class="struct" href="../tokio_timer/error/struct.Error.html" title="struct tokio_timer::error::Error">Error</a></code><a href='#impl-ResponseError-for-Error-4' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#183' title='goto source code'>[src]</a></h3><div class='docblock'><p><code>InternalServerError</code> for <code>TimerError</code></p>
|
||
</div><div class='impl-items'></div><h3 id='impl-ResponseError-for-Error-5' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a> for <a class="struct" href="../failure/error/struct.Error.html" title="struct failure::error::Error">Error</a></code><a href='#impl-ResponseError-for-Error-5' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#961-965' title='goto source code'>[src]</a></h3><div class='docblock'><p>Compatibility for <code>failure::Error</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-5' class="method hidden"><code id='error_response.v-5'>fn <a href='#method.error_response' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/error.rs.html#962-964' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-for-Utf8Error' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/core/str/struct.Utf8Error.html" title="struct core::str::Utf8Error">Utf8Error</a></code><a href='#impl-ResponseError-for-Utf8Error' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#204-208' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>BAD_REQUEST</code> for <code>Utf8Error</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-6' class="method hidden"><code id='error_response.v-6'>fn <a href='#method.error_response' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/error.rs.html#205-207' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-for-JsonPayloadError' class='impl'><code class='in-band'>impl <a class="trait" href="../actix_web/error/trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a> for <a class="enum" href="../awc/error/enum.JsonPayloadError.html" title="enum awc::error::JsonPayloadError">JsonPayloadError</a></code><a href='#impl-ResponseError-for-JsonPayloadError' class='anchor'></a><a class='srclink' href='../src/awc/error.rs.html#71-75' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>InternalServerError</code> for <code>JsonPayloadError</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-7' class="method hidden"><code id='error_response.v-7'>fn <a href='#method.error_response' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/awc/error.rs.html#72-74' title='goto source code'>[src]</a></h4></div><span class='loading-content'>Loading content...</span>
|
||
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-ResponseError' class='impl'><code class='in-band'>impl ResponseError for <a class="enum" href="../actix_web/client/enum.PayloadError.html" title="enum actix_web::client::PayloadError">PayloadError</a></code><a href='#impl-ResponseError' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#384-391' title='goto source code'>[src]</a></h3><div class='docblock'><p><code>PayloadError</code> returns two possible results:</p>
|
||
<ul>
|
||
<li><code>Overflow</code> returns <code>PayloadTooLarge</code></li>
|
||
<li>Other errors returns <code>BadRequest</code></li>
|
||
</ul>
|
||
</div><div class='impl-items'><h4 id='method.error_response-8' class="method hidden"><code id='error_response.v-8'>fn <a href='#method.error_response-8' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/error.rs.html#385-390' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-1' class='impl'><code class='in-band'>impl ResponseError for <a class="enum" href="../actix_web/client/enum.SendRequestError.html" title="enum actix_web::client::SendRequestError">SendRequestError</a></code><a href='#impl-ResponseError-1' class='anchor'></a><a class='srclink' href='../src/actix_http/client/error.rs.html#119-130' title='goto source code'>[src]</a></h3><div class='docblock'><p>Convert <code>SendRequestError</code> to a server <code>Response</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-9' class="method hidden"><code id='error_response.v-9'>fn <a href='#method.error_response-9' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/client/error.rs.html#120-129' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-2' class='impl'><code class='in-band'>impl ResponseError for <a class="enum" href="../actix_web/error/enum.ContentTypeError.html" title="enum actix_web::error::ContentTypeError">ContentTypeError</a></code><a href='#impl-ResponseError-2' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#459-463' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>BadRequest</code> for <code>ContentTypeError</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-10' class="method hidden"><code id='error_response.v-10'>fn <a href='#method.error_response-10' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/error.rs.html#460-462' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-3' class='impl'><code class='in-band'>impl ResponseError for actix_web::error::<a class="enum" href="../actix_web/error/enum.CookieParseError.html" title="enum actix_web::error::CookieParseError">CookieParseError</a></code><a href='#impl-ResponseError-3' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#394-398' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>BadRequest</code> for <code>cookie::ParseError</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-11' class="method hidden"><code id='error_response.v-11'>fn <a href='#method.error_response-11' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/error.rs.html#395-397' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-4' class='impl'><code class='in-band'>impl ResponseError for actix_web::error::<a class="enum" href="../actix_web/error/enum.JsonPayloadError.html" title="enum actix_web::error::JsonPayloadError">JsonPayloadError</a></code><a href='#impl-ResponseError-4' class='anchor'></a><a class='srclink' href='../src/actix_web/error.rs.html#88-97' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>BadRequest</code> for <code>JsonPayloadError</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-12' class="method hidden"><code id='error_response.v-12'>fn <a href='#method.error_response-12' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">HttpResponse</a></code><a class='srclink' href='../src/actix_web/error.rs.html#89-96' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-5' class='impl'><code class='in-band'>impl ResponseError for actix_web::error::<a class="enum" href="../actix_web/error/enum.ParseError.html" title="enum actix_web::error::ParseError">ParseError</a></code><a href='#impl-ResponseError-5' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#280-284' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>BadRequest</code> for <code>ParseError</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-13' class="method hidden"><code id='error_response.v-13'>fn <a href='#method.error_response-13' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/error.rs.html#281-283' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-6' class='impl'><code class='in-band'>impl ResponseError for <a class="enum" href="../actix_web/error/enum.PathError.html" title="enum actix_web::error::PathError">PathError</a></code><a href='#impl-ResponseError-6' class='anchor'></a><a class='srclink' href='../src/actix_web/error.rs.html#108-114' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>BadRequest</code> for <code>PathError</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-14' class="method hidden"><code id='error_response.v-14'>fn <a href='#method.error_response-14' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">HttpResponse</a></code><a class='srclink' href='../src/actix_web/error.rs.html#109-113' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-7' class='impl'><code class='in-band'>impl ResponseError for <a class="enum" href="../actix_web/error/enum.QueryPayloadError.html" title="enum actix_web::error::QueryPayloadError">QueryPayloadError</a></code><a href='#impl-ResponseError-7' class='anchor'></a><a class='srclink' href='../src/actix_web/error.rs.html#125-133' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>BadRequest</code> for <code>QueryPayloadError</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-15' class="method hidden"><code id='error_response.v-15'>fn <a href='#method.error_response-15' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">HttpResponse</a></code><a class='srclink' href='../src/actix_web/error.rs.html#126-132' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-8' class='impl'><code class='in-band'>impl ResponseError for <a class="enum" href="../actix_web/error/enum.ReadlinesError.html" title="enum actix_web::error::ReadlinesError">ReadlinesError</a></code><a href='#impl-ResponseError-8' class='anchor'></a><a class='srclink' href='../src/actix_web/error.rs.html#154-163' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>BadRequest</code> for <code>ReadlinesError</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-16' class="method hidden"><code id='error_response.v-16'>fn <a href='#method.error_response-16' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">HttpResponse</a></code><a class='srclink' href='../src/actix_web/error.rs.html#155-162' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-9' class='impl'><code class='in-band'>impl ResponseError for <a class="enum" href="../actix_web/error/enum.UrlGenerationError.html" title="enum actix_web::error::UrlGenerationError">UrlGenerationError</a></code><a href='#impl-ResponseError-9' class='anchor'></a><a class='srclink' href='../src/actix_web/error.rs.html#26' title='goto source code'>[src]</a></h3><div class='docblock'><p><code>InternalServerError</code> for <code>UrlGeneratorError</code></p>
|
||
</div><div class='impl-items'></div><h3 id='impl-ResponseError-10' class='impl'><code class='in-band'>impl ResponseError for <a class="enum" href="../actix_web/error/enum.UrlencodedError.html" title="enum actix_web::error::UrlencodedError">UrlencodedError</a></code><a href='#impl-ResponseError-10' class='anchor'></a><a class='srclink' href='../src/actix_web/error.rs.html#56-68' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>BadRequest</code> for <code>UrlencodedError</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-17' class="method hidden"><code id='error_response.v-17'>fn <a href='#method.error_response-17' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">HttpResponse</a></code><a class='srclink' href='../src/actix_web/error.rs.html#57-67' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-11' class='impl'><code class='in-band'>impl ResponseError for <a class="struct" href="../actix_web/http/header/struct.InvalidHeaderValue.html" title="struct actix_web::http::header::InvalidHeaderValue">InvalidHeaderValue</a></code><a href='#impl-ResponseError-11' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#226-230' title='goto source code'>[src]</a></h3><div class='docblock'><p><code>BadRequest</code> for <code>InvalidHeaderValue</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-18' class="method hidden"><code id='error_response.v-18'>fn <a href='#method.error_response-18' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/error.rs.html#227-229' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-12' class='impl'><code class='in-band'>impl ResponseError for <a class="struct" href="../actix_web/http/header/struct.InvalidHeaderValueBytes.html" title="struct actix_web::http::header::InvalidHeaderValueBytes">InvalidHeaderValueBytes</a></code><a href='#impl-ResponseError-12' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#233-237' title='goto source code'>[src]</a></h3><div class='docblock'><p><code>BadRequest</code> for <code>InvalidHeaderValue</code></p>
|
||
</div><div class='impl-items'><h4 id='method.error_response-19' class="method hidden"><code id='error_response.v-19'>fn <a href='#method.error_response-19' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/error.rs.html#234-236' title='goto source code'>[src]</a></h4></div><h3 id='impl-ResponseError-13' class='impl'><code class='in-band'>impl ResponseError for actix_web::http::<a class="struct" href="../actix_web/http/struct.Error.html" title="struct actix_web::http::Error">Error</a></code><a href='#impl-ResponseError-13' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#212' title='goto source code'>[src]</a></h3><div class='docblock'><p>Return <code>InternalServerError</code> for <code>HttpError</code>,
|
||
Response generation can return <code>HttpError</code>, so it is internal error</p>
|
||
</div><div class='impl-items'></div><h3 id='impl-ResponseError-14' class='impl'><code class='in-band'>impl<E> ResponseError for <a class="enum" href="../actix_web/error/enum.BlockingError.html" title="enum actix_web::error::BlockingError">BlockingError</a><E> <span class="where fmt-newline">where<br> E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, </span></code><a href='#impl-ResponseError-14' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#201' title='goto source code'>[src]</a></h3><div class='docblock'><p><code>InternalServerError</code> for <code>BlockingError</code></p>
|
||
</div><div class='impl-items'></div><h3 id='impl-ResponseError-15' class='impl'><code class='in-band'>impl<T> ResponseError for <a class="struct" href="../actix_web/error/struct.InternalError.html" title="struct actix_web::error::InternalError">InternalError</a><T> <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + 'static, </span></code><a href='#impl-ResponseError-15' class='anchor'></a><a class='srclink' href='../src/actix_http/error.rs.html#527-557' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.error_response-20' class="method hidden"><code id='error_response.v-20'>fn <a href='#method.error_response-20' class='fnname'>error_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/error.rs.html#531-551' title='goto source code'>[src]</a></h4><h4 id='method.render_response-1' class="method"><code id='render_response.v-1'>fn <a href='#method.render_response-1' class='fnname'>render_response</a>(&self) -> <a class="struct" href="../actix_web/web/struct.HttpResponse.html" title="struct actix_web::web::HttpResponse">Response</a><<a class="enum" href="../actix_web/dev/enum.Body.html" title="enum actix_web::dev::Body">Body</a>></code><a class='srclink' href='../src/actix_http/error.rs.html#554-556' title='goto source code'>[src]</a></h4><div class='docblock'><p>Constructs an error response</p>
|
||
</div></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript" src="../implementors/actix_http/error/trait.ResponseError.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "actix_web";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |