mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-30 08:24:28 +02:00
Deploying to gh-pages from @ actix/actix-web@26efa64278 🚀
This commit is contained in:
94
actix_web/web/enum.Either.html
Normal file
94
actix_web/web/enum.Either.html
Normal file
File diff suppressed because one or more lines are too long
137
actix_web/web/enum.JsonBody.html
Normal file
137
actix_web/web/enum.JsonBody.html
Normal file
File diff suppressed because one or more lines are too long
5
actix_web/web/fn.block.html
Normal file
5
actix_web/web/fn.block.html
Normal file
@ -0,0 +1,5 @@
|
||||
<!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="Executes blocking function on a thread pool, returns future that resolves to result of the function execution."><title>block in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">block</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/web.rs.html#206-213">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn block<F, R>(f: F) -> impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><R, <a class="struct" href="../error/struct.BlockingError.html" title="struct actix_web::error::BlockingError">BlockingError</a>>><div class="where">where
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -> R + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,
|
||||
R: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Executes blocking function on a thread pool, returns future that resolves to result of the
|
||||
function execution.</p>
|
||||
</div></details></section></div></main></body></html>
|
12
actix_web/web/fn.delete.html
Normal file
12
actix_web/web/fn.delete.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!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="Creates a new route with `DELETE` method guard."><title>delete in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">delete</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/web.rs.html#125">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn delete() -> <a class="struct" href="../struct.Route.html" title="struct actix_web::Route">Route</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new route with <code>DELETE</code> method guard.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>In this example, one <code>DELETE /{project_id}</code> route is set up:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{web, App, HttpResponse};
|
||||
|
||||
<span class="kw">let </span>app = App::new().service(
|
||||
web::resource(<span class="string">"/{project_id}"</span>)
|
||||
.route(web::delete().to(|| HttpResponse::Ok()))
|
||||
|
||||
);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
12
actix_web/web/fn.get.html
Normal file
12
actix_web/web/fn.get.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!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="Creates a new route with `GET` method guard."><title>get in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">get</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/web.rs.html#121">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn get() -> <a class="struct" href="../struct.Route.html" title="struct actix_web::Route">Route</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new route with <code>GET</code> method guard.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>In this example, one <code>GET /{project_id}</code> route is set up:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{web, App, HttpResponse};
|
||||
|
||||
<span class="kw">let </span>app = App::new().service(
|
||||
web::resource(<span class="string">"/{project_id}"</span>)
|
||||
.route(web::get().to(|| HttpResponse::Ok()))
|
||||
|
||||
);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
12
actix_web/web/fn.head.html
Normal file
12
actix_web/web/fn.head.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!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="Creates a new route with `HEAD` method guard."><title>head in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">head</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/web.rs.html#126">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn head() -> <a class="struct" href="../struct.Route.html" title="struct actix_web::Route">Route</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new route with <code>HEAD</code> method guard.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>In this example, one <code>HEAD /{project_id}</code> route is set up:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{web, App, HttpResponse};
|
||||
|
||||
<span class="kw">let </span>app = App::new().service(
|
||||
web::resource(<span class="string">"/{project_id}"</span>)
|
||||
.route(web::head().to(|| HttpResponse::Ok()))
|
||||
|
||||
);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
11
actix_web/web/fn.method.html
Normal file
11
actix_web/web/fn.method.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!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="Creates a new route with specified method guard."><title>method in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">method</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/web.rs.html#142-144">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn method(method: <a class="struct" href="../http/struct.Method.html" title="struct actix_web::http::Method">Method</a>) -> <a class="struct" href="../struct.Route.html" title="struct actix_web::Route">Route</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new route with specified method guard.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>In this example, one <code>GET /{project_id}</code> route is set up:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{web, http, App, HttpResponse};
|
||||
|
||||
<span class="kw">let </span>app = App::new().service(
|
||||
web::resource(<span class="string">"/{project_id}"</span>)
|
||||
.route(web::method(http::Method::GET).to(|| HttpResponse::Ok()))
|
||||
);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
12
actix_web/web/fn.patch.html
Normal file
12
actix_web/web/fn.patch.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!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="Creates a new route with `PATCH` method guard."><title>patch in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">patch</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/web.rs.html#124">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn patch() -> <a class="struct" href="../struct.Route.html" title="struct actix_web::Route">Route</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new route with <code>PATCH</code> method guard.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>In this example, one <code>PATCH /{project_id}</code> route is set up:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{web, App, HttpResponse};
|
||||
|
||||
<span class="kw">let </span>app = App::new().service(
|
||||
web::resource(<span class="string">"/{project_id}"</span>)
|
||||
.route(web::patch().to(|| HttpResponse::Ok()))
|
||||
|
||||
);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
12
actix_web/web/fn.post.html
Normal file
12
actix_web/web/fn.post.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!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="Creates a new route with `POST` method guard."><title>post in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">post</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/web.rs.html#122">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn post() -> <a class="struct" href="../struct.Route.html" title="struct actix_web::Route">Route</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new route with <code>POST</code> method guard.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>In this example, one <code>POST /{project_id}</code> route is set up:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{web, App, HttpResponse};
|
||||
|
||||
<span class="kw">let </span>app = App::new().service(
|
||||
web::resource(<span class="string">"/{project_id}"</span>)
|
||||
.route(web::post().to(|| HttpResponse::Ok()))
|
||||
|
||||
);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
12
actix_web/web/fn.put.html
Normal file
12
actix_web/web/fn.put.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!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="Creates a new route with `PUT` method guard."><title>put in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">put</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/web.rs.html#123">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn put() -> <a class="struct" href="../struct.Route.html" title="struct actix_web::Route">Route</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new route with <code>PUT</code> method guard.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>In this example, one <code>PUT /{project_id}</code> route is set up:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{web, App, HttpResponse};
|
||||
|
||||
<span class="kw">let </span>app = App::new().service(
|
||||
web::resource(<span class="string">"/{project_id}"</span>)
|
||||
.route(web::put().to(|| HttpResponse::Ok()))
|
||||
|
||||
);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
12
actix_web/web/fn.redirect.html
Normal file
12
actix_web/web/fn.redirect.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!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="Create a relative or absolute redirect."><title>redirect in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">redirect</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/web.rs.html#200-202">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn redirect(
|
||||
from: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>,
|
||||
to: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'static, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>
|
||||
) -> <a class="struct" href="struct.Redirect.html" title="struct actix_web::web::Redirect">Redirect</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create a relative or absolute redirect.</p>
|
||||
<p>See <a href="struct.Redirect.html" title="struct actix_web::web::Redirect"><code>Redirect</code></a> docs for usage details.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{web, App};
|
||||
|
||||
<span class="kw">let </span>app = App::new()
|
||||
<span class="comment">// the client will resolve this redirect to /api/to-path
|
||||
</span>.service(web::redirect(<span class="string">"/api/from-path"</span>, <span class="string">"to-path"</span>));</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
19
actix_web/web/fn.resource.html
Normal file
19
actix_web/web/fn.resource.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!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="Creates a new resource for a specific path."><title>resource in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">resource</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/web.rs.html#58-60">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn resource<T: <a class="trait" href="../../actix_router/pattern/trait.IntoPatterns.html" title="trait actix_router::pattern::IntoPatterns">IntoPatterns</a>>(path: T) -> <a class="struct" href="../struct.Resource.html" title="struct actix_web::Resource">Resource</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new resource for a specific path.</p>
|
||||
<p>Resources may have dynamic path segments. For example, a resource with the path <code>/a/{name}/c</code>
|
||||
would match all incoming requests with paths such as <code>/a/b/c</code>, <code>/a/1/c</code>, or <code>/a/etc/c</code>.</p>
|
||||
<p>A dynamic segment is specified in the form <code>{identifier}</code>, where the identifier can be used
|
||||
later in a request handler to access the matched value for that segment. This is done by looking
|
||||
up the identifier in the <code>Path</code> object returned by [<code>HttpRequest.match_info()</code>] method.</p>
|
||||
<p>By default, each segment matches the regular expression <code>[^{}/]+</code>.</p>
|
||||
<p>You can also specify a custom regex in the form <code>{identifier:regex}</code>:</p>
|
||||
<p>For instance, to route <code>GET</code>-requests on any route matching <code>/users/{userid}/{friend}</code> and store
|
||||
<code>userid</code> and <code>friend</code> in the exposed <code>Path</code> object:</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{web, App, HttpResponse};
|
||||
|
||||
<span class="kw">let </span>app = App::new().service(
|
||||
web::resource(<span class="string">"/users/{userid}/{friend}"</span>)
|
||||
.route(web::get().to(|| HttpResponse::Ok()))
|
||||
.route(web::head().to(|| HttpResponse::MethodNotAllowed()))
|
||||
);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
2
actix_web/web/fn.route.html
Normal file
2
actix_web/web/fn.route.html
Normal file
@ -0,0 +1,2 @@
|
||||
<!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="Creates a new un-configured route."><title>route in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">route</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/web.rs.html#96-98">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn route() -> <a class="struct" href="../struct.Route.html" title="struct actix_web::Route">Route</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new un-configured route.</p>
|
||||
</div></details></section></div></main></body></html>
|
24
actix_web/web/fn.scope.html
Normal file
24
actix_web/web/fn.scope.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!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="Creates scope for common path prefix."><title>scope in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">scope</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/web.rs.html#91-93">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn scope(path: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="struct" href="../struct.Scope.html" title="struct actix_web::Scope">Scope</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates scope for common path prefix.</p>
|
||||
<p>Scopes collect multiple paths under a common path prefix. The scope’s path can contain dynamic
|
||||
path segments.</p>
|
||||
<h2 id="avoid-trailing-slashes"><a class="doc-anchor" href="#avoid-trailing-slashes">§</a>Avoid Trailing Slashes</h2>
|
||||
<p>Avoid using trailing slashes in the scope prefix (e.g., <code>web::scope("/scope/")</code>). It will almost
|
||||
certainly not have the expected behavior. See the <a href="../dev/struct.ResourceDef.html#prefix-resources" title="struct actix_web::dev::ResourceDef">documentation on resource definitions</a>
|
||||
to understand why this is the case and how to correctly construct scope/prefix definitions.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>In this example, three routes are set up (and will handle any method):</p>
|
||||
<ul>
|
||||
<li><code>/{project_id}/path1</code></li>
|
||||
<li><code>/{project_id}/path2</code></li>
|
||||
<li><code>/{project_id}/path3</code></li>
|
||||
</ul>
|
||||
<h2 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h2>
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{web, App, HttpResponse};
|
||||
|
||||
<span class="kw">let </span>app = App::new().service(
|
||||
web::scope(<span class="string">"/{project_id}"</span>)
|
||||
.service(web::resource(<span class="string">"/path1"</span>).to(|| HttpResponse::Ok()))
|
||||
.service(web::resource(<span class="string">"/path2"</span>).to(|| HttpResponse::Ok()))
|
||||
.service(web::resource(<span class="string">"/path3"</span>).to(|| HttpResponse::MethodNotAllowed()))
|
||||
);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
14
actix_web/web/fn.service.html
Normal file
14
actix_web/web/fn.service.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!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="Creates a raw service for a specific path."><title>service in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">service</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/web.rs.html#184-186">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn service<T: <a class="trait" href="../../actix_router/pattern/trait.IntoPatterns.html" title="trait actix_router::pattern::IntoPatterns">IntoPatterns</a>>(path: T) -> <a class="struct" href="../dev/struct.WebService.html" title="struct actix_web::dev::WebService">WebService</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a raw service for a specific path.</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{dev, web, guard, App, Error, HttpResponse};
|
||||
|
||||
<span class="kw">async fn </span>my_service(req: dev::ServiceRequest) -> <span class="prelude-ty">Result</span><dev::ServiceResponse, Error> {
|
||||
<span class="prelude-val">Ok</span>(req.into_response(HttpResponse::Ok().finish()))
|
||||
}
|
||||
|
||||
<span class="kw">let </span>app = App::new().service(
|
||||
web::service(<span class="string">"/users/*"</span>)
|
||||
.guard(guard::Header(<span class="string">"content-type"</span>, <span class="string">"text/plain"</span>))
|
||||
.finish(my_service)
|
||||
);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
16
actix_web/web/fn.to.html
Normal file
16
actix_web/web/fn.to.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!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="Creates a new any-method route with handler."><title>to in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">to</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/web.rs.html#160-167">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn to<F, Args>(handler: F) -> <a class="struct" href="../struct.Route.html" title="struct actix_web::Route">Route</a><div class="where">where
|
||||
F: <a class="trait" href="../trait.Handler.html" title="trait actix_web::Handler">Handler</a><Args>,
|
||||
Args: <a class="trait" href="../trait.FromRequest.html" title="trait actix_web::FromRequest">FromRequest</a> + 'static,
|
||||
F::<a class="associatedtype" href="../trait.Handler.html#associatedtype.Output" title="type actix_web::Handler::Output">Output</a>: <a class="trait" href="../trait.Responder.html" title="trait actix_web::Responder">Responder</a> + 'static,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new any-method route with handler.</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{web, App, HttpResponse, Responder};
|
||||
|
||||
<span class="kw">async fn </span>index() -> <span class="kw">impl </span>Responder {
|
||||
HttpResponse::Ok()
|
||||
}
|
||||
|
||||
App::new().service(
|
||||
web::resource(<span class="string">"/"</span>).route(
|
||||
web::to(index))
|
||||
);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
12
actix_web/web/fn.trace.html
Normal file
12
actix_web/web/fn.trace.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!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="Creates a new route with `TRACE` method guard."><title>trace in actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In actix_web::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>Function <a href="../index.html">actix_web</a>::<wbr><a href="index.html">web</a>::<wbr><a class="fn" href="#">trace</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/web.rs.html#127">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub fn trace() -> <a class="struct" href="../struct.Route.html" title="struct actix_web::Route">Route</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a new route with <code>TRACE</code> method guard.</p>
|
||||
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
|
||||
<p>In this example, one <code>TRACE /{project_id}</code> route is set up:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>actix_web::{web, App, HttpResponse};
|
||||
|
||||
<span class="kw">let </span>app = App::new().service(
|
||||
web::resource(<span class="string">"/{project_id}"</span>)
|
||||
.route(web::trace().to(|| HttpResponse::Ok()))
|
||||
|
||||
);</code></pre></div>
|
||||
</div></details></section></div></main></body></html>
|
22
actix_web/web/index.html
Normal file
22
actix_web/web/index.html
Normal file
@ -0,0 +1,22 @@
|
||||
<!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="Essentials helper functions and types for application registration."><title>actix_web::web - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="actix_web" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0-nightly (bdbbb6c6a 2024-05-26)" data-channel="nightly" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc 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 web</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></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="#">web</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/web.rs.html#1-213">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Essentials helper functions and types for application registration.</p>
|
||||
<h2 id="request-extractors"><a class="doc-anchor" href="#request-extractors">§</a>Request Extractors</h2>
|
||||
<ul>
|
||||
<li><a href="struct.Data.html" title="struct actix_web::web::Data"><code>Data</code></a>: Application data item</li>
|
||||
<li><a href="struct.ReqData.html" title="struct actix_web::web::ReqData"><code>ReqData</code></a>: Request-local data item</li>
|
||||
<li><a href="struct.Path.html" title="struct actix_web::web::Path"><code>Path</code></a>: URL path parameters / dynamic segments</li>
|
||||
<li><a href="struct.Query.html" title="struct actix_web::web::Query"><code>Query</code></a>: URL query parameters</li>
|
||||
<li><a href="struct.Header.html" title="struct actix_web::web::Header"><code>Header</code></a>: Typed header</li>
|
||||
<li><a href="struct.Json.html" title="struct actix_web::web::Json"><code>Json</code></a>: JSON payload</li>
|
||||
<li><a href="struct.Form.html" title="struct actix_web::web::Form"><code>Form</code></a>: URL-encoded payload</li>
|
||||
<li><a href="struct.Bytes.html" title="struct actix_web::web::Bytes"><code>Bytes</code></a>: Raw payload</li>
|
||||
</ul>
|
||||
<h2 id="responders"><a class="doc-anchor" href="#responders">§</a>Responders</h2>
|
||||
<ul>
|
||||
<li><a href="struct.Json.html" title="struct actix_web::web::Json"><code>Json</code></a>: JSON response</li>
|
||||
<li><a href="struct.Form.html" title="struct actix_web::web::Form"><code>Form</code></a>: URL-encoded response</li>
|
||||
<li><a href="struct.Bytes.html" title="struct actix_web::web::Bytes"><code>Bytes</code></a>: Raw bytes response</li>
|
||||
<li><a href="struct.Redirect.html#method.to" title="associated function actix_web::web::Redirect::to"><code>Redirect</code></a>: Convenient redirect responses</li>
|
||||
</ul>
|
||||
</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.Bytes.html" title="struct actix_web::web::Bytes">Bytes</a></div><div class="desc docblock-short">A cheaply cloneable and sliceable chunk of contiguous memory.</div></li><li><div class="item-name"><a class="struct" href="struct.BytesMut.html" title="struct actix_web::web::BytesMut">BytesMut</a></div><div class="desc docblock-short">A unique reference to a contiguous slice of memory.</div></li><li><div class="item-name"><a class="struct" href="struct.Data.html" title="struct actix_web::web::Data">Data</a></div><div class="desc docblock-short">Application data wrapper and extractor.</div></li><li><div class="item-name"><a class="struct" href="struct.Form.html" title="struct actix_web::web::Form">Form</a></div><div class="desc docblock-short">URL encoded payload extractor and responder.</div></li><li><div class="item-name"><a class="struct" href="struct.FormConfig.html" title="struct actix_web::web::FormConfig">FormConfig</a></div><div class="desc docblock-short"><a href="struct.Form.html" title="struct actix_web::web::Form"><code>Form</code></a> extractor configuration.</div></li><li><div class="item-name"><a class="struct" href="struct.Header.html" title="struct actix_web::web::Header">Header</a></div><div class="desc docblock-short">Extract typed headers from the request.</div></li><li><div class="item-name"><a class="struct" href="struct.Json.html" title="struct actix_web::web::Json">Json</a></div><div class="desc docblock-short">JSON extractor and responder.</div></li><li><div class="item-name"><a class="struct" href="struct.JsonConfig.html" title="struct actix_web::web::JsonConfig">JsonConfig</a></div><div class="desc docblock-short"><code>Json</code> extractor configuration.</div></li><li><div class="item-name"><a class="struct" href="struct.Path.html" title="struct actix_web::web::Path">Path</a></div><div class="desc docblock-short">Extract typed data from request path segments.</div></li><li><div class="item-name"><a class="struct" href="struct.PathConfig.html" title="struct actix_web::web::PathConfig">PathConfig</a></div><div class="desc docblock-short">Path extractor configuration</div></li><li><div class="item-name"><a class="struct" href="struct.Payload.html" title="struct actix_web::web::Payload">Payload</a></div><div class="desc docblock-short">Extract a request’s raw payload stream.</div></li><li><div class="item-name"><a class="struct" href="struct.PayloadConfig.html" title="struct actix_web::web::PayloadConfig">PayloadConfig</a></div><div class="desc docblock-short">Configuration for request payloads.</div></li><li><div class="item-name"><a class="struct" href="struct.Query.html" title="struct actix_web::web::Query">Query</a></div><div class="desc docblock-short">Extract typed information from the request’s query.</div></li><li><div class="item-name"><a class="struct" href="struct.QueryConfig.html" title="struct actix_web::web::QueryConfig">QueryConfig</a></div><div class="desc docblock-short">Query extractor configuration.</div></li><li><div class="item-name"><a class="struct" href="struct.Readlines.html" title="struct actix_web::web::Readlines">Readlines</a></div><div class="desc docblock-short">Stream that reads request line by line.</div></li><li><div class="item-name"><a class="struct" href="struct.Redirect.html" title="struct actix_web::web::Redirect">Redirect</a></div><div class="desc docblock-short">An HTTP service for redirecting one path to another path or URL.</div></li><li><div class="item-name"><a class="struct" href="struct.ReqData.html" title="struct actix_web::web::ReqData">ReqData</a></div><div class="desc docblock-short">Request-local data extractor.</div></li><li><div class="item-name"><a class="struct" href="struct.ServiceConfig.html" title="struct actix_web::web::ServiceConfig">ServiceConfig</a></div><div class="desc docblock-short">Enables parts of app configuration to be declared separately from the app itself. Helpful for
|
||||
modularizing large applications.</div></li><li><div class="item-name"><a class="struct" href="struct.UrlEncoded.html" title="struct actix_web::web::UrlEncoded">UrlEncoded</a></div><div class="desc docblock-short">Future that resolves to some <code>T</code> when parsed from a URL encoded payload.</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.Either.html" title="enum actix_web::web::Either">Either</a></div><div class="desc docblock-short">Combines two extractor or responder types into a single type.</div></li><li><div class="item-name"><a class="enum" href="enum.JsonBody.html" title="enum actix_web::web::JsonBody">JsonBody</a></div><div class="desc docblock-short">Future that resolves to some <code>T</code> when parsed from a JSON payload.</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.Buf.html" title="trait actix_web::web::Buf">Buf</a></div><div class="desc docblock-short">Read bytes from a buffer.</div></li><li><div class="item-name"><a class="trait" href="trait.BufMut.html" title="trait actix_web::web::BufMut">BufMut</a></div><div class="desc docblock-short">A trait for values that provide sequential write access to bytes.</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.block.html" title="fn actix_web::web::block">block</a></div><div class="desc docblock-short">Executes blocking function on a thread pool, returns future that resolves to result of the
|
||||
function execution.</div></li><li><div class="item-name"><a class="fn" href="fn.delete.html" title="fn actix_web::web::delete">delete</a></div><div class="desc docblock-short">Creates a new route with <code>DELETE</code> method guard.</div></li><li><div class="item-name"><a class="fn" href="fn.get.html" title="fn actix_web::web::get">get</a></div><div class="desc docblock-short">Creates a new route with <code>GET</code> method guard.</div></li><li><div class="item-name"><a class="fn" href="fn.head.html" title="fn actix_web::web::head">head</a></div><div class="desc docblock-short">Creates a new route with <code>HEAD</code> method guard.</div></li><li><div class="item-name"><a class="fn" href="fn.method.html" title="fn actix_web::web::method">method</a></div><div class="desc docblock-short">Creates a new route with specified method guard.</div></li><li><div class="item-name"><a class="fn" href="fn.patch.html" title="fn actix_web::web::patch">patch</a></div><div class="desc docblock-short">Creates a new route with <code>PATCH</code> method guard.</div></li><li><div class="item-name"><a class="fn" href="fn.post.html" title="fn actix_web::web::post">post</a></div><div class="desc docblock-short">Creates a new route with <code>POST</code> method guard.</div></li><li><div class="item-name"><a class="fn" href="fn.put.html" title="fn actix_web::web::put">put</a></div><div class="desc docblock-short">Creates a new route with <code>PUT</code> method guard.</div></li><li><div class="item-name"><a class="fn" href="fn.redirect.html" title="fn actix_web::web::redirect">redirect</a></div><div class="desc docblock-short">Create a relative or absolute redirect.</div></li><li><div class="item-name"><a class="fn" href="fn.resource.html" title="fn actix_web::web::resource">resource</a></div><div class="desc docblock-short">Creates a new resource for a specific path.</div></li><li><div class="item-name"><a class="fn" href="fn.route.html" title="fn actix_web::web::route">route</a></div><div class="desc docblock-short">Creates a new un-configured route.</div></li><li><div class="item-name"><a class="fn" href="fn.scope.html" title="fn actix_web::web::scope">scope</a></div><div class="desc docblock-short">Creates scope for common path prefix.</div></li><li><div class="item-name"><a class="fn" href="fn.service.html" title="fn actix_web::web::service">service</a></div><div class="desc docblock-short">Creates a raw service for a specific path.</div></li><li><div class="item-name"><a class="fn" href="fn.to.html" title="fn actix_web::web::to">to</a></div><div class="desc docblock-short">Creates a new any-method route with handler.</div></li><li><div class="item-name"><a class="fn" href="fn.trace.html" title="fn actix_web::web::trace">trace</a></div><div class="desc docblock-short">Creates a new route with <code>TRACE</code> method guard.</div></li></ul></section></div></main></body></html>
|
1
actix_web/web/sidebar-items.js
Normal file
1
actix_web/web/sidebar-items.js
Normal file
@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"enum":["Either","JsonBody"],"fn":["block","delete","get","head","method","patch","post","put","redirect","resource","route","scope","service","to","trace"],"struct":["Bytes","BytesMut","Data","Form","FormConfig","Header","Json","JsonConfig","Path","PathConfig","Payload","PayloadConfig","Query","QueryConfig","Readlines","Redirect","ReqData","ServiceConfig","UrlEncoded"],"trait":["Buf","BufMut"]};
|
1398
actix_web/web/struct.Bytes.html
Normal file
1398
actix_web/web/struct.Bytes.html
Normal file
File diff suppressed because one or more lines are too long
2826
actix_web/web/struct.BytesMut.html
Normal file
2826
actix_web/web/struct.BytesMut.html
Normal file
File diff suppressed because one or more lines are too long
90
actix_web/web/struct.Data.html
Normal file
90
actix_web/web/struct.Data.html
Normal file
File diff suppressed because one or more lines are too long
99
actix_web/web/struct.Form.html
Normal file
99
actix_web/web/struct.Form.html
Normal file
File diff suppressed because one or more lines are too long
41
actix_web/web/struct.FormConfig.html
Normal file
41
actix_web/web/struct.FormConfig.html
Normal file
File diff suppressed because one or more lines are too long
57
actix_web/web/struct.Header.html
Normal file
57
actix_web/web/struct.Header.html
Normal file
File diff suppressed because one or more lines are too long
75
actix_web/web/struct.Json.html
Normal file
75
actix_web/web/struct.Json.html
Normal file
File diff suppressed because one or more lines are too long
54
actix_web/web/struct.JsonConfig.html
Normal file
54
actix_web/web/struct.JsonConfig.html
Normal file
File diff suppressed because one or more lines are too long
78
actix_web/web/struct.Path.html
Normal file
78
actix_web/web/struct.Path.html
Normal file
File diff suppressed because one or more lines are too long
51
actix_web/web/struct.PathConfig.html
Normal file
51
actix_web/web/struct.PathConfig.html
Normal file
File diff suppressed because one or more lines are too long
312
actix_web/web/struct.Payload.html
Normal file
312
actix_web/web/struct.Payload.html
Normal file
File diff suppressed because one or more lines are too long
29
actix_web/web/struct.PayloadConfig.html
Normal file
29
actix_web/web/struct.PayloadConfig.html
Normal file
File diff suppressed because one or more lines are too long
96
actix_web/web/struct.Query.html
Normal file
96
actix_web/web/struct.Query.html
Normal file
File diff suppressed because one or more lines are too long
46
actix_web/web/struct.QueryConfig.html
Normal file
46
actix_web/web/struct.QueryConfig.html
Normal file
File diff suppressed because one or more lines are too long
260
actix_web/web/struct.Readlines.html
Normal file
260
actix_web/web/struct.Readlines.html
Normal file
File diff suppressed because one or more lines are too long
86
actix_web/web/struct.Redirect.html
Normal file
86
actix_web/web/struct.Redirect.html
Normal file
File diff suppressed because one or more lines are too long
58
actix_web/web/struct.ReqData.html
Normal file
58
actix_web/web/struct.ReqData.html
Normal file
File diff suppressed because one or more lines are too long
58
actix_web/web/struct.ServiceConfig.html
Normal file
58
actix_web/web/struct.ServiceConfig.html
Normal file
File diff suppressed because one or more lines are too long
121
actix_web/web/struct.UrlEncoded.html
Normal file
121
actix_web/web/struct.UrlEncoded.html
Normal file
File diff suppressed because one or more lines are too long
632
actix_web/web/trait.Buf.html
Normal file
632
actix_web/web/trait.Buf.html
Normal file
File diff suppressed because one or more lines are too long
749
actix_web/web/trait.BufMut.html
Normal file
749
actix_web/web/trait.BufMut.html
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user