1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-27 17:52:56 +01:00
actix-web/actix_web/error/index.html
2024-05-27 01:16:31 +00:00

2 lines
19 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="Error and Result module"><title>actix_web::error - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../actix_web/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../../actix_web/index.html">actix_web</a><span class="version">4.6.0</span></h2></div><h2 class="location"><a href="#">Module error</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Aliases</a></li></ul></section><h2><a href="../index.html">In crate actix_web</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">actix_web</a>::<wbr><a class="mod" href="#">error</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/actix_web/error/mod.rs.html#1-268">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Error and Result module</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.BlockingError.html" title="struct actix_web::error::BlockingError">BlockingError</a></div><div class="desc docblock-short">An error representing a problem running a blocking task on a thread pool.</div></li><li><div class="item-name"><a class="struct" href="struct.Error.html" title="struct actix_web::error::Error">Error</a></div><div class="desc docblock-short">General purpose Actix Web error.</div></li><li><div class="item-name"><a class="struct" href="struct.HttpError.html" title="struct actix_web::error::HttpError">HttpError</a></div><div class="desc docblock-short">A generic “error” for HTTP connections</div></li><li><div class="item-name"><a class="struct" href="struct.InternalError.html" title="struct actix_web::error::InternalError">InternalError</a></div><div class="desc docblock-short">Wraps errors to alter the generated response status code.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.ContentTypeError.html" title="enum actix_web::error::ContentTypeError">ContentTypeError</a></div><div class="desc docblock-short">A set of error that can occur during parsing content type.</div></li><li><div class="item-name"><a class="enum" href="enum.DispatchError.html" title="enum actix_web::error::DispatchError">DispatchError</a></div><div class="desc docblock-short">A set of errors that can occur during dispatching HTTP requests.</div></li><li><div class="item-name"><a class="enum" href="enum.JsonPayloadError.html" title="enum actix_web::error::JsonPayloadError">JsonPayloadError</a></div><div class="desc docblock-short">A set of errors that can occur during parsing json payloads</div></li><li><div class="item-name"><a class="enum" href="enum.ParseError.html" title="enum actix_web::error::ParseError">ParseError</a></div><div class="desc docblock-short">A set of errors that can occur during parsing HTTP streams.</div></li><li><div class="item-name"><a class="enum" href="enum.PathError.html" title="enum actix_web::error::PathError">PathError</a></div><div class="desc docblock-short">A set of errors that can occur during parsing request paths</div></li><li><div class="item-name"><a class="enum" href="enum.PayloadError.html" title="enum actix_web::error::PayloadError">PayloadError</a></div><div class="desc docblock-short">A set of errors that can occur during payload parsing.</div></li><li><div class="item-name"><a class="enum" href="enum.QueryPayloadError.html" title="enum actix_web::error::QueryPayloadError">QueryPayloadError</a></div><div class="desc docblock-short">A set of errors that can occur during parsing query strings.</div></li><li><div class="item-name"><a class="enum" href="enum.ReadlinesError.html" title="enum actix_web::error::ReadlinesError">ReadlinesError</a></div><div class="desc docblock-short">Error type returned when reading body as lines.</div></li><li><div class="item-name"><a class="enum" href="enum.UrlGenerationError.html" title="enum actix_web::error::UrlGenerationError">UrlGenerationError</a></div><div class="desc docblock-short">Errors which can occur when attempting to generate resource uri.</div></li><li><div class="item-name"><a class="enum" href="enum.UrlencodedError.html" title="enum actix_web::error::UrlencodedError">UrlencodedError</a></div><div class="desc docblock-short">A set of errors that can occur during parsing urlencoded payloads</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.ResponseError.html" title="trait actix_web::error::ResponseError">ResponseError</a></div><div class="desc docblock-short">Errors that can generate responses.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.ErrorBadGateway.html" title="fn actix_web::error::ErrorBadGateway">ErrorBadGateway</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>BAD_GATEWAY</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorBadRequest.html" title="fn actix_web::error::ErrorBadRequest">ErrorBadRequest</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>BAD_REQUEST</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorConflict.html" title="fn actix_web::error::ErrorConflict">ErrorConflict</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>CONFLICT</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorExpectationFailed.html" title="fn actix_web::error::ErrorExpectationFailed">ErrorExpectationFailed</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>EXPECTATION_FAILED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorFailedDependency.html" title="fn actix_web::error::ErrorFailedDependency">ErrorFailedDependency</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>FAILED_DEPENDENCY</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorForbidden.html" title="fn actix_web::error::ErrorForbidden">ErrorForbidden</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>FORBIDDEN</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorGatewayTimeout.html" title="fn actix_web::error::ErrorGatewayTimeout">ErrorGatewayTimeout</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>GATEWAY_TIMEOUT</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorGone.html" title="fn actix_web::error::ErrorGone">ErrorGone</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>GONE</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorHttpVersionNotSupported.html" title="fn actix_web::error::ErrorHttpVersionNotSupported">ErrorHttpVersionNotSupported</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>HTTP_VERSION_NOT_SUPPORTED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorImATeapot.html" title="fn actix_web::error::ErrorImATeapot">ErrorImATeapot</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>IM_A_TEAPOT</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorInsufficientStorage.html" title="fn actix_web::error::ErrorInsufficientStorage">ErrorInsufficientStorage</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>INSUFFICIENT_STORAGE</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorInternalServerError.html" title="fn actix_web::error::ErrorInternalServerError">ErrorInternalServerError</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>INTERNAL_SERVER_ERROR</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorLengthRequired.html" title="fn actix_web::error::ErrorLengthRequired">ErrorLengthRequired</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>LENGTH_REQUIRED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorLocked.html" title="fn actix_web::error::ErrorLocked">ErrorLocked</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>LOCKED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorLoopDetected.html" title="fn actix_web::error::ErrorLoopDetected">ErrorLoopDetected</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>LOOP_DETECTED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorMethodNotAllowed.html" title="fn actix_web::error::ErrorMethodNotAllowed">ErrorMethodNotAllowed</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>METHOD_NOT_ALLOWED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorMisdirectedRequest.html" title="fn actix_web::error::ErrorMisdirectedRequest">ErrorMisdirectedRequest</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>MISDIRECTED_REQUEST</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorNetworkAuthenticationRequired.html" title="fn actix_web::error::ErrorNetworkAuthenticationRequired">ErrorNetworkAuthenticationRequired</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>NETWORK_AUTHENTICATION_REQUIRED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorNotAcceptable.html" title="fn actix_web::error::ErrorNotAcceptable">ErrorNotAcceptable</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>NOT_ACCEPTABLE</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorNotExtended.html" title="fn actix_web::error::ErrorNotExtended">ErrorNotExtended</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>NOT_EXTENDED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorNotFound.html" title="fn actix_web::error::ErrorNotFound">ErrorNotFound</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>NOT_FOUND</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorNotImplemented.html" title="fn actix_web::error::ErrorNotImplemented">ErrorNotImplemented</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>NOT_IMPLEMENTED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorPayloadTooLarge.html" title="fn actix_web::error::ErrorPayloadTooLarge">ErrorPayloadTooLarge</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>PAYLOAD_TOO_LARGE</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorPaymentRequired.html" title="fn actix_web::error::ErrorPaymentRequired">ErrorPaymentRequired</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>PAYMENT_REQUIRED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorPreconditionFailed.html" title="fn actix_web::error::ErrorPreconditionFailed">ErrorPreconditionFailed</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>PRECONDITION_FAILED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorPreconditionRequired.html" title="fn actix_web::error::ErrorPreconditionRequired">ErrorPreconditionRequired</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>PRECONDITION_REQUIRED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorProxyAuthenticationRequired.html" title="fn actix_web::error::ErrorProxyAuthenticationRequired">ErrorProxyAuthenticationRequired</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>PROXY_AUTHENTICATION_REQUIRED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorRangeNotSatisfiable.html" title="fn actix_web::error::ErrorRangeNotSatisfiable">ErrorRangeNotSatisfiable</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>RANGE_NOT_SATISFIABLE</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorRequestHeaderFieldsTooLarge.html" title="fn actix_web::error::ErrorRequestHeaderFieldsTooLarge">ErrorRequestHeaderFieldsTooLarge</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>REQUEST_HEADER_FIELDS_TOO_LARGE</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorRequestTimeout.html" title="fn actix_web::error::ErrorRequestTimeout">ErrorRequestTimeout</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>REQUEST_TIMEOUT</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorServiceUnavailable.html" title="fn actix_web::error::ErrorServiceUnavailable">ErrorServiceUnavailable</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>SERVICE_UNAVAILABLE</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorTooManyRequests.html" title="fn actix_web::error::ErrorTooManyRequests">ErrorTooManyRequests</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>TOO_MANY_REQUESTS</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorUnauthorized.html" title="fn actix_web::error::ErrorUnauthorized">ErrorUnauthorized</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>UNAUTHORIZED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorUnavailableForLegalReasons.html" title="fn actix_web::error::ErrorUnavailableForLegalReasons">ErrorUnavailableForLegalReasons</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>UNAVAILABLE_FOR_LEGAL_REASONS</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorUnprocessableEntity.html" title="fn actix_web::error::ErrorUnprocessableEntity">ErrorUnprocessableEntity</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>UNPROCESSABLE_ENTITY</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorUnsupportedMediaType.html" title="fn actix_web::error::ErrorUnsupportedMediaType">ErrorUnsupportedMediaType</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>UNSUPPORTED_MEDIA_TYPE</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorUpgradeRequired.html" title="fn actix_web::error::ErrorUpgradeRequired">ErrorUpgradeRequired</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>UPGRADE_REQUIRED</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorUriTooLong.html" title="fn actix_web::error::ErrorUriTooLong">ErrorUriTooLong</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>URI_TOO_LONG</code> response.</div></li><li><div class="item-name"><a class="fn" href="fn.ErrorVariantAlsoNegotiates.html" title="fn actix_web::error::ErrorVariantAlsoNegotiates">ErrorVariantAlsoNegotiates</a></div><div class="desc docblock-short">Helper function that wraps any error and generates a <code>VARIANT_ALSO_NEGOTIATES</code> response.</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.Result.html" title="type actix_web::error::Result">Result</a></div><div class="desc docblock-short">A convenience <a href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result"><code>Result</code></a> for Actix Web operations.</div></li></ul></section></div></main></body></html>