Deploying to gh-pages from @ ac502b7c08 🚀

This commit is contained in:
realaravinth
2022-11-04 10:05:00 +00:00
parent 49538a56a4
commit 55a5f29113
941 changed files with 22322 additions and 30474 deletions

View File

@@ -1,4 +1,4 @@
<!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="Source of the Rust file `src/api/v1/account/mod.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>mod.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../../../../../dark.css" disabled><link rel="stylesheet" type="text/css" href="../../../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../../../storage.js"></script><script defer src="../../../../../source-script.js"></script><script defer src="../../../../../source-files.js"></script><script defer src="../../../../../main.js"></script><noscript><link rel="stylesheet" href="../../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../../favicon.svg"></head><body class="rustdoc source"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../../../../mcaptcha/index.html"><div class="logo-container"><img class="rust-logo" src="../../../../../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../../../../mcaptcha/index.html"><div class="logo-container"><img class="rust-logo" src="../../../../../rust-logo.svg" alt="logo"></div></a></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../../../mcaptcha/index.html"><img class="rust-logo" src="../../../../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1">1</span>
<!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="Source of the Rust file `src/api/v1/account/mod.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>mod.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../../../normalize.css"><link rel="stylesheet" href="../../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../../../ayu.css" disabled><link rel="stylesheet" href="../../../../../dark.css" disabled><link rel="stylesheet" href="../../../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../../../storage.js"></script><script defer src="../../../../../source-script.js"></script><script defer src="../../../../../source-files.js"></script><script defer src="../../../../../main.js"></script><noscript><link rel="stylesheet" href="../../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../../favicon.svg"></head><body class="rustdoc source"><!--[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">&#9776;</button><a class="sidebar-logo" href="../../../../../mcaptcha/index.html"><div class="logo-container"><img class="rust-logo" src="../../../../../rust-logo.svg" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../../../../mcaptcha/index.html"><div class="logo-container"><img class="rust-logo" src="../../../../../rust-logo.svg" alt="logo"></div></a></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../../../mcaptcha/index.html"><img class="rust-logo" src="../../../../../rust-logo.svg" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../../../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../../../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1">1</span>
<span id="2">2</span>
<span id="3">3</span>
<span id="4">4</span>
@@ -97,74 +97,74 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see &lt;https://www.gnu.org/licenses/&gt;.
*/</span>
*/
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
</span><span class="kw">use </span>serde::{Deserialize, Serialize};
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">delete</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">email</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">password</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">secret</span>;
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span>
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">test</span>;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">username</span>;
<span class="kw">pub mod </span>delete;
<span class="kw">pub mod </span>email;
<span class="kw">pub mod </span>password;
<span class="kw">pub mod </span>secret;
<span class="attribute">#[cfg(test)]
</span><span class="kw">pub mod </span>test;
<span class="kw">pub mod </span>username;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="kw">super</span>::auth</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident"><span class="kw">super</span>::mcaptcha</span>;
<span class="kw">pub use </span><span class="kw">super</span>::auth;
<span class="kw">pub use </span><span class="kw">super</span>::mcaptcha;
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">routes</span> {
<span class="kw">pub mod </span>routes {
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Account</span> {
<span class="kw">pub</span> <span class="ident">delete</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span>,
<span class="kw">pub</span> <span class="ident">email_exists</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span>,
<span class="kw">pub</span> <span class="ident">get_secret</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span>,
<span class="kw">pub</span> <span class="ident">update_email</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span>,
<span class="kw">pub</span> <span class="ident">update_password</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span>,
<span class="kw">pub</span> <span class="ident">update_secret</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span>,
<span class="kw">pub</span> <span class="ident">username_exists</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span>,
<span class="kw">pub</span> <span class="ident">update_username</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span>,
<span class="kw">pub struct </span>Account {
<span class="kw">pub </span>delete: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str,
<span class="kw">pub </span>email_exists: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str,
<span class="kw">pub </span>get_secret: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str,
<span class="kw">pub </span>update_email: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str,
<span class="kw">pub </span>update_password: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str,
<span class="kw">pub </span>update_secret: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str,
<span class="kw">pub </span>username_exists: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str,
<span class="kw">pub </span>update_username: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str,
}
<span class="kw">impl</span> <span class="ident">Account</span> {
<span class="kw">pub</span> <span class="kw">const</span> <span class="kw">fn</span> <span class="ident">new</span>() -&gt; <span class="ident">Account</span> {
<span class="kw">let</span> <span class="ident">get_secret</span> <span class="op">=</span> <span class="string">&quot;/api/v1/account/secret/get&quot;</span>;
<span class="kw">let</span> <span class="ident">update_secret</span> <span class="op">=</span> <span class="string">&quot;/api/v1/account/secret/update&quot;</span>;
<span class="kw">let</span> <span class="ident">delete</span> <span class="op">=</span> <span class="string">&quot;/api/v1/account/delete&quot;</span>;
<span class="kw">let</span> <span class="ident">email_exists</span> <span class="op">=</span> <span class="string">&quot;/api/v1/account/email/exists&quot;</span>;
<span class="kw">let</span> <span class="ident">username_exists</span> <span class="op">=</span> <span class="string">&quot;/api/v1/account/username/exists&quot;</span>;
<span class="kw">let</span> <span class="ident">update_username</span> <span class="op">=</span> <span class="string">&quot;/api/v1/account/username/update&quot;</span>;
<span class="kw">let</span> <span class="ident">update_email</span> <span class="op">=</span> <span class="string">&quot;/api/v1/account/email/update&quot;</span>;
<span class="kw">let</span> <span class="ident">update_password</span> <span class="op">=</span> <span class="string">&quot;/api/v1/account/password/update&quot;</span>;
<span class="ident">Account</span> {
<span class="ident">delete</span>,
<span class="ident">email_exists</span>,
<span class="ident">get_secret</span>,
<span class="ident">update_email</span>,
<span class="ident">update_password</span>,
<span class="ident">update_secret</span>,
<span class="ident">username_exists</span>,
<span class="ident">update_username</span>,
<span class="kw">impl </span>Account {
<span class="kw">pub const fn </span>new() -&gt; Account {
<span class="kw">let </span>get_secret = <span class="string">&quot;/api/v1/account/secret/get&quot;</span>;
<span class="kw">let </span>update_secret = <span class="string">&quot;/api/v1/account/secret/update&quot;</span>;
<span class="kw">let </span>delete = <span class="string">&quot;/api/v1/account/delete&quot;</span>;
<span class="kw">let </span>email_exists = <span class="string">&quot;/api/v1/account/email/exists&quot;</span>;
<span class="kw">let </span>username_exists = <span class="string">&quot;/api/v1/account/username/exists&quot;</span>;
<span class="kw">let </span>update_username = <span class="string">&quot;/api/v1/account/username/update&quot;</span>;
<span class="kw">let </span>update_email = <span class="string">&quot;/api/v1/account/email/update&quot;</span>;
<span class="kw">let </span>update_password = <span class="string">&quot;/api/v1/account/password/update&quot;</span>;
Account {
delete,
email_exists,
get_secret,
update_email,
update_password,
update_secret,
username_exists,
update_username,
}
}
}
}
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Debug</span>, <span class="ident">Deserialize</span>, <span class="ident">Serialize</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">AccountCheckPayload</span> {
<span class="kw">pub</span> <span class="ident">val</span>: <span class="ident">String</span>,
<span class="attribute">#[derive(Clone, Debug, Deserialize, Serialize)]
</span><span class="kw">pub struct </span>AccountCheckPayload {
<span class="kw">pub </span>val: String,
}
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Debug</span>, <span class="ident">Deserialize</span>, <span class="ident">Serialize</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">AccountCheckResp</span> {
<span class="kw">pub</span> <span class="ident">exists</span>: <span class="ident">bool</span>,
<span class="attribute">#[derive(Clone, Debug, Deserialize, Serialize)]
</span><span class="kw">pub struct </span>AccountCheckResp {
<span class="kw">pub </span>exists: bool,
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">services</span>(<span class="ident">cfg</span>: <span class="kw-2">&amp;mut</span> <span class="ident">actix_web::web::ServiceConfig</span>) {
<span class="ident">delete::services</span>(<span class="ident">cfg</span>);
<span class="ident">email::services</span>(<span class="ident">cfg</span>);
<span class="ident">username::services</span>(<span class="ident">cfg</span>);
<span class="ident">secret::services</span>(<span class="ident">cfg</span>);
<span class="ident">password::services</span>(<span class="ident">cfg</span>);
<span class="kw">pub fn </span>services(cfg: <span class="kw-2">&amp;mut </span>actix_web::web::ServiceConfig) {
delete::services(cfg);
email::services(cfg);
username::services(cfg);
secret::services(cfg);
password::services(cfg);
}
</code></pre></div>
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="mcaptcha" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.64.0 (a55dd71d5 2022-09-19)" ></div></body></html>
</section></div></main><div id="rustdoc-vars" data-root-path="../../../../../" data-current-crate="mcaptcha" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.65.0 (897e37553 2022-11-02)" ></div></body></html>