Deploying to gh-pages from @ a5558e4b6f
🚀
This commit is contained in:
parent
a684317c06
commit
2777a267c8
9 changed files with 28 additions and 28 deletions
|
@ -1,3 +1,3 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `COMPILED_DATE` constant in crate `mcaptcha`."><meta name="keywords" content="rust, rustlang, rust-lang, COMPILED_DATE"><title>COMPILED_DATE in mcaptcha - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../mcaptcha/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">mcaptcha</a></h2><div id="sidebar-vars" data-name="COMPILED_DATE" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="index.html">mcaptcha</a>::<wbr><a class="constant" href="#">COMPILED_DATE</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/mcaptcha/main.rs.html#89" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const COMPILED_DATE: &<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a> = "21-08-05";</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="mcaptcha" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../mcaptcha/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">mcaptcha</a></h2><div id="sidebar-vars" data-name="COMPILED_DATE" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="index.html">mcaptcha</a>::<wbr><a class="constant" href="#">COMPILED_DATE</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/mcaptcha/main.rs.html#89" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const COMPILED_DATE: &<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a> = "21-08-08";</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="mcaptcha" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>
|
|
@ -1,3 +1,3 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `GIT_COMMIT_HASH` constant in crate `mcaptcha`."><meta name="keywords" content="rust, rustlang, rust-lang, GIT_COMMIT_HASH"><title>GIT_COMMIT_HASH in mcaptcha - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../mcaptcha/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">mcaptcha</a></h2><div id="sidebar-vars" data-name="GIT_COMMIT_HASH" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="index.html">mcaptcha</a>::<wbr><a class="constant" href="#">GIT_COMMIT_HASH</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/mcaptcha/main.rs.html#90" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const GIT_COMMIT_HASH: &<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a> = "65ffc37549bda8a96e24ee0d9d2305d1f2bd452b";</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="mcaptcha" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>
|
||||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../mcaptcha/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="index.html">mcaptcha</a></h2><div id="sidebar-vars" data-name="GIT_COMMIT_HASH" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="index.html">mcaptcha</a>::<wbr><a class="constant" href="#">GIT_COMMIT_HASH</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/mcaptcha/main.rs.html#90" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const GIT_COMMIT_HASH: &<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.str.html">str</a> = "a5558e4b6f68d2696f80d3a73db18f3824547423";</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="mcaptcha" data-search-index-js="../search-index.js" data-search-js="../search.js"></div><script src="../main.js"></script></body></html>
|
|
@ -5,7 +5,7 @@
|
|||
pub solves: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>>,
|
||||
pub confirms: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>>,
|
||||
}</pre></div><h2 id="fields" class="fields small-section-header">
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.config_fetches" class="structfield small-section-header"><a href="#structfield.config_fetches" class="anchor field"></a><code>config_fetches: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>></code></span><span id="structfield.solves" class="structfield small-section-header"><a href="#structfield.solves" class="anchor field"></a><code>solves: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>></code></span><span id="structfield.confirms" class="structfield small-section-header"><a href="#structfield.confirms" class="anchor field"></a><code>confirms: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.StatsUnixTimestamp.html" title="struct mcaptcha::stats::fetch::StatsUnixTimestamp">StatsUnixTimestamp</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/mcaptcha/stats/fetch.rs.html#61-84" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.from_stats" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.from_stats" class="fnname">from_stats</a>(stats: &<a class="struct" href="struct.Stats.html" title="struct mcaptcha::stats::fetch::Stats">Stats</a>) -> Self</h4><a href="#method.from_stats" class="anchor"></a><a class="srclink" href="../../../src/mcaptcha/stats/fetch.rs.html#62-71" title="goto source code">[src]</a></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.unix_timestamp" class="method has-srclink"><h4 class="code-header">fn <a href="#method.unix_timestamp" class="fnname">unix_timestamp</a>(dates: &<a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../date/struct.Date.html" title="struct mcaptcha::date::Date">Date</a>>) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>></h4><a href="#method.unix_timestamp" class="anchor"></a><a class="srclink" href="../../../src/mcaptcha/stats/fetch.rs.html#75-83" title="goto source code">[src]</a></div></summary><div class="docblock"><p>featch PoWConfig confirms</p>
|
||||
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.config_fetches" class="structfield small-section-header"><a href="#structfield.config_fetches" class="anchor field"></a><code>config_fetches: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>></code></span><span id="structfield.solves" class="structfield small-section-header"><a href="#structfield.solves" class="anchor field"></a><code>solves: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>></code></span><span id="structfield.confirms" class="structfield small-section-header"><a href="#structfield.confirms" class="anchor field"></a><code>confirms: <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="struct" href="struct.StatsUnixTimestamp.html" title="struct mcaptcha::stats::fetch::StatsUnixTimestamp">StatsUnixTimestamp</a></h3><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/mcaptcha/stats/fetch.rs.html#61-84" title="goto source code">[src]</a></div></summary><div class="impl-items"><div id="method.from_stats" class="method has-srclink"><h4 class="code-header">pub fn <a href="#method.from_stats" class="fnname">from_stats</a>(stats: &<a class="struct" href="struct.Stats.html" title="struct mcaptcha::stats::fetch::Stats">Stats</a>) -> Self</h4><a href="#method.from_stats" class="anchor"></a><a class="srclink" href="../../../src/mcaptcha/stats/fetch.rs.html#62-71" title="goto source code">[src]</a></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.unix_timestamp" class="method has-srclink"><h4 class="code-header">fn <a href="#method.unix_timestamp" class="fnname">unix_timestamp</a>(dates: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">&[</a><a class="struct" href="../../date/struct.Date.html" title="struct mcaptcha::date::Date">Date</a><a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.slice.html">]</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.54.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.i64.html">i64</a>></h4><a href="#method.unix_timestamp" class="anchor"></a><a class="srclink" href="../../../src/mcaptcha/stats/fetch.rs.html#75-83" title="goto source code">[src]</a></div></summary><div class="docblock"><p>featch PoWConfig confirms</p>
|
||||
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Clone" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.StatsUnixTimestamp.html" title="struct mcaptcha::stats::fetch::StatsUnixTimestamp">StatsUnixTimestamp</a></h3><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../../src/mcaptcha/stats/fetch.rs.html#23" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.StatsUnixTimestamp.html" title="struct mcaptcha::stats::fetch::StatsUnixTimestamp">StatsUnixTimestamp</a></h4><a href="#method.clone" class="anchor"></a><a class="srclink" href="../../../src/mcaptcha/stats/fetch.rs.html#23" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.54.0/std/primitive.reference.html">&</a>Self)</h4><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a href="#method.clone_from" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/1.54.0/src/core/clone.rs.html#130" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.54.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Debug" class="impl has-srclink"><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.StatsUnixTimestamp.html" title="struct mcaptcha::stats::fetch::StatsUnixTimestamp">StatsUnixTimestamp</a></h3><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../../src/mcaptcha/stats/fetch.rs.html#23" title="goto source code">[src]</a></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.54.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.54.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4><a href="#method.fmt" class="anchor"></a><a class="srclink" href="../../../src/mcaptcha/stats/fetch.rs.html#23" title="goto source code">[src]</a></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.54.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -208,21 +208,21 @@
|
|||
<span id="206">206</span>
|
||||
</pre><pre class="rust">
|
||||
<span class="comment">/*
|
||||
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/</span>
|
||||
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/</span>
|
||||
<span class="kw">use</span> <span class="ident">actix_identity::Identity</span>;
|
||||
<span class="kw">use</span> <span class="ident">actix_web</span>::{<span class="ident">web</span>, <span class="ident">HttpResponse</span>, <span class="ident">Responder</span>};
|
||||
<span class="kw">use</span> <span class="ident">argon2_creds::Config</span>;
|
||||
|
@ -375,7 +375,7 @@
|
|||
|
||||
<span class="ident">bad_post_req_test</span>(
|
||||
<span class="ident">NAME</span>,
|
||||
<span class="kw-2">&</span><span class="ident">new_password</span>,
|
||||
<span class="ident">new_password</span>,
|
||||
<span class="ident">ROUTES</span>.<span class="ident">account</span>.<span class="ident">update_password</span>,
|
||||
<span class="kw-2">&</span><span class="ident">update_password</span>,
|
||||
<span class="ident">ServiceError::PasswordsDontMatch</span>,
|
||||
|
@ -390,7 +390,7 @@
|
|||
|
||||
<span class="ident">bad_post_req_test</span>(
|
||||
<span class="ident">NAME</span>,
|
||||
<span class="kw-2">&</span><span class="ident">new_password</span>,
|
||||
<span class="ident">new_password</span>,
|
||||
<span class="ident">ROUTES</span>.<span class="ident">account</span>.<span class="ident">update_password</span>,
|
||||
<span class="kw-2">&</span><span class="ident">update_password</span>,
|
||||
<span class="ident">ServiceError::WrongPassword</span>,
|
||||
|
|
|
@ -314,7 +314,7 @@
|
|||
<span class="kw">use</span> <span class="ident">sqlx::Error::RowNotFound</span>;
|
||||
|
||||
<span class="kw">let</span> <span class="ident">verify</span> <span class="op">=</span> <span class="op">|</span><span class="ident">stored</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">received</span>: <span class="kw-2">&</span><span class="ident">str</span><span class="op">|</span> {
|
||||
<span class="kw">if</span> <span class="ident">Config::verify</span>(<span class="kw-2">&</span><span class="ident">stored</span>, <span class="kw-2">&</span><span class="ident">received</span>)<span class="question-mark">?</span> {
|
||||
<span class="kw">if</span> <span class="ident">Config::verify</span>(<span class="ident">stored</span>, <span class="ident">received</span>)<span class="question-mark">?</span> {
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
} <span class="kw">else</span> {
|
||||
<span class="prelude-val">Err</span>(<span class="ident">ServiceError::WrongPassword</span>)
|
||||
|
@ -380,7 +380,7 @@
|
|||
<span class="kw">let</span> <span class="ident">hash</span> <span class="op">=</span> <span class="ident">data</span>.<span class="ident">creds</span>.<span class="ident">password</span>(<span class="kw-2">&</span><span class="ident">payload</span>.<span class="ident">password</span>)<span class="question-mark">?</span>;
|
||||
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">email</span>) <span class="op">=</span> <span class="kw-2">&</span><span class="ident">payload</span>.<span class="ident">email</span> {
|
||||
<span class="ident">data</span>.<span class="ident">creds</span>.<span class="ident">email</span>(<span class="kw-2">&</span><span class="ident">email</span>)<span class="question-mark">?</span>;
|
||||
<span class="ident">data</span>.<span class="ident">creds</span>.<span class="ident">email</span>(<span class="ident">email</span>)<span class="question-mark">?</span>;
|
||||
}
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">secret</span>;
|
||||
|
|
|
@ -652,7 +652,7 @@
|
|||
|
||||
<span class="kw">let</span> <span class="ident">add_token_resp</span> <span class="op">=</span> <span class="ident">test::call_service</span>(
|
||||
<span class="kw-2">&</span><span class="ident">app</span>,
|
||||
<span class="macro">post_request!</span>(<span class="kw-2">&</span><span class="ident">update_level</span>, <span class="kw-2">&</span><span class="ident">ROUTES</span>.<span class="ident">levels</span>.<span class="ident">update</span>)
|
||||
<span class="macro">post_request!</span>(<span class="kw-2">&</span><span class="ident">update_level</span>, <span class="ident">ROUTES</span>.<span class="ident">levels</span>.<span class="ident">update</span>)
|
||||
.<span class="ident">cookie</span>(<span class="ident">cookies</span>.<span class="ident">clone</span>())
|
||||
.<span class="ident">to_request</span>(),
|
||||
)
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">clippy::new_without_default</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>() <span class="op">-</span><span class="op">></span> <span class="self">Self</span> {
|
||||
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="macro">include_str!</span>(<span class="string">"../cache_buster_data.json"</span>);
|
||||
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files::new</span>(<span class="kw-2">&</span><span class="ident">map</span>);
|
||||
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files::new</span>(<span class="ident">map</span>);
|
||||
<span class="self">Self</span> { <span class="ident">files</span> }
|
||||
}
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get</span><span class="op"><</span><span class="lifetime">'a</span><span class="op">></span>(<span class="kw-2">&</span><span class="lifetime">'a</span> <span class="self">self</span>, <span class="ident">path</span>: <span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="kw-2">&</span><span class="lifetime">'a</span> <span class="ident">str</span><span class="op">></span> {
|
||||
|
|
|
@ -294,7 +294,7 @@
|
|||
|
||||
<span class="doccomment">/// featch PoWConfig confirms</span>
|
||||
<span class="attribute">#[<span class="ident">inline</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">unix_timestamp</span>(<span class="ident">dates</span>: <span class="kw-2">&</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">Date</span><span class="op">></span>) <span class="op">-</span><span class="op">></span> <span class="ident">Vec</span><span class="op"><</span><span class="ident">i64</span><span class="op">></span> {
|
||||
<span class="kw">fn</span> <span class="ident">unix_timestamp</span>(<span class="ident">dates</span>: <span class="kw-2">&</span>[<span class="ident">Date</span>]) <span class="op">-</span><span class="op">></span> <span class="ident">Vec</span><span class="op"><</span><span class="ident">i64</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">res</span>: <span class="ident">Vec</span><span class="op"><</span><span class="ident">i64</span><span class="op">></span> <span class="op">=</span> <span class="ident">Vec::with_capacity</span>(<span class="ident">dates</span>.<span class="ident">len</span>());
|
||||
|
||||
<span class="ident">dates</span>
|
||||
|
@ -415,7 +415,7 @@
|
|||
<span class="kw">let</span> (<span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>, <span class="ident">token_key</span>) <span class="op">=</span> <span class="ident">add_levels_util</span>(<span class="ident">NAME</span>, <span class="ident">PASSWORD</span>).<span class="kw">await</span>;
|
||||
<span class="kw">let</span> <span class="ident">key</span> <span class="op">=</span> <span class="ident">token_key</span>.<span class="ident">key</span>.<span class="ident">clone</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="ident">stats</span> <span class="op">=</span> <span class="ident">Stats::new</span>(<span class="kw-2">&</span><span class="ident">NAME</span>, <span class="kw-2">&</span><span class="ident">key</span>, <span class="kw-2">&</span><span class="ident">data</span>.<span class="ident">db</span>).<span class="kw">await</span>.<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="ident">stats</span> <span class="op">=</span> <span class="ident">Stats::new</span>(<span class="ident">NAME</span>, <span class="kw-2">&</span><span class="ident">key</span>, <span class="kw-2">&</span><span class="ident">data</span>.<span class="ident">db</span>).<span class="kw">await</span>.<span class="ident">unwrap</span>();
|
||||
|
||||
<span class="macro">assert_eq!</span>(<span class="ident">stats</span>.<span class="ident">config_fetches</span>.<span class="ident">len</span>(), <span class="number">0</span>);
|
||||
<span class="macro">assert_eq!</span>(<span class="ident">stats</span>.<span class="ident">solves</span>.<span class="ident">len</span>(), <span class="number">0</span>);
|
||||
|
@ -427,7 +427,7 @@
|
|||
<span class="ident">record_confirm</span>(<span class="kw-2">&</span><span class="ident">key</span>, <span class="kw-2">&</span><span class="ident">data</span>.<span class="ident">db</span>)
|
||||
);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">stats</span> <span class="op">=</span> <span class="ident">Stats::new</span>(<span class="kw-2">&</span><span class="ident">NAME</span>, <span class="kw-2">&</span><span class="ident">key</span>, <span class="kw-2">&</span><span class="ident">data</span>.<span class="ident">db</span>).<span class="kw">await</span>.<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="ident">stats</span> <span class="op">=</span> <span class="ident">Stats::new</span>(<span class="ident">NAME</span>, <span class="kw-2">&</span><span class="ident">key</span>, <span class="kw-2">&</span><span class="ident">data</span>.<span class="ident">db</span>).<span class="kw">await</span>.<span class="ident">unwrap</span>();
|
||||
|
||||
<span class="macro">assert_eq!</span>(<span class="ident">stats</span>.<span class="ident">config_fetches</span>.<span class="ident">len</span>(), <span class="number">1</span>);
|
||||
<span class="macro">assert_eq!</span>(<span class="ident">stats</span>.<span class="ident">solves</span>.<span class="ident">len</span>(), <span class="number">1</span>);
|
||||
|
|
Loading…
Add table
Reference in a new issue