commit 684745eb5c265cfa233525aec152ba30b1301c63 Author: Aravinth Manivannan Date: Mon Feb 13 12:31:53 2023 +0000 new deploy: 2023-02-13T12:31:53+00:00 diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..c7248c2 --- /dev/null +++ b/404.html @@ -0,0 +1,148 @@ + + + + + + + + + + + +404 Page not found - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+
+

Page not found :(

+

The page you are looking for doesn't exist or has been moved.

+
+
+
+ +
+
+ + + + + + + + + diff --git a/_headers b/_headers new file mode 100644 index 0000000..31746da --- /dev/null +++ b/_headers @@ -0,0 +1,9 @@ +/* + Strict-Transport-Security: max-age=31536000; includeSubDomains; preload + X-Content-Type-Options: nosniff + X-XSS-Protection: 1; mode=block + Content-Security-Policy: default-src 'self'; frame-ancestors https://jamstackthemes.dev; manifest-src 'self'; connect-src 'self'; font-src 'self'; img-src 'self' data:; script-src 'self'; style-src 'self' + X-Frame-Options: SAMEORIGIN + Referrer-Policy: strict-origin + Feature-Policy: geolocation 'self' + Cache-Control: public, max-age=31536000 \ No newline at end of file diff --git a/_redirects b/_redirects new file mode 100644 index 0000000..b16b733 --- /dev/null +++ b/_redirects @@ -0,0 +1 @@ +# redirects for Netlify - https://www.netlify.com/docs/redirects/ \ No newline at end of file diff --git a/about/index.html b/about/index.html new file mode 100644 index 0000000..599d658 --- /dev/null +++ b/about/index.html @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + About - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ +
+ +

About

+

+

mCaptcha is a kickass CAPTCHA systems that gives (DDoS) +attackers a run for their money. And we do all of this without tracking +your users. Oh and did I mention our UX is great?

+

At mCaptcha, we believe in digital freedom and privacy and so we built +an proof-of-work based CAPTCHA system that doesn’t track. Seriously, no +tracking. But that isn’t the killer feature, our system doesn’t require +the user to pick cars or ID sidewalks — our system does it’s +thing(usually at the click of a button) and gets out of the way. Our +Philosophy

+

Philosophy

+

Man has has come so far only because our ancestors chose to share their +knowledge with others. If everything was labeled intellectual property, +we might still be stuck in Stone Age. The idea of intellectual property +is alien to us. For this reason, all of our source code is freely +available(both as in freedom and beers) at our GitHub.

+

People

+ + +

Edit this page on GitHub

+ +
+
+ +
+
+ + + + + + + + + diff --git a/android-chrome-192x192.png b/android-chrome-192x192.png new file mode 100644 index 0000000..03a0e70 Binary files /dev/null and b/android-chrome-192x192.png differ diff --git a/android-chrome-512x512.png b/android-chrome-512x512.png new file mode 100644 index 0000000..74bdfb9 Binary files /dev/null and b/android-chrome-512x512.png differ diff --git a/android-icon-144x144.png b/android-icon-144x144.png new file mode 100644 index 0000000..0f16a0b Binary files /dev/null and b/android-icon-144x144.png differ diff --git a/android-icon-192x192.png b/android-icon-192x192.png new file mode 100644 index 0000000..5223305 Binary files /dev/null and b/android-icon-192x192.png differ diff --git a/android-icon-36x36.png b/android-icon-36x36.png new file mode 100644 index 0000000..f4900ce Binary files /dev/null and b/android-icon-36x36.png differ diff --git a/android-icon-48x48.png b/android-icon-48x48.png new file mode 100644 index 0000000..ef1cafb Binary files /dev/null and b/android-icon-48x48.png differ diff --git a/android-icon-72x72.png b/android-icon-72x72.png new file mode 100644 index 0000000..e670441 Binary files /dev/null and b/android-icon-72x72.png differ diff --git a/android-icon-96x96.png b/android-icon-96x96.png new file mode 100644 index 0000000..032e2f1 Binary files /dev/null and b/android-icon-96x96.png differ diff --git a/api-docs/browser/0.1.0/COPYRIGHT.txt b/api-docs/browser/0.1.0/COPYRIGHT.txt new file mode 100644 index 0000000..af77776 --- /dev/null +++ b/api-docs/browser/0.1.0/COPYRIGHT.txt @@ -0,0 +1,45 @@ +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif Pro (SourceSerifPro-Regular.ttf.woff, + SourceSerifPro-Bold.ttf.woff, SourceSerifPro-It.ttf.woff): + + Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with + Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of + Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerifPro-LICENSE.txt. + +This copyright file is intended to be distributed with rustdoc output. diff --git a/api-docs/browser/0.1.0/FiraSans-LICENSE.txt b/api-docs/browser/0.1.0/FiraSans-LICENSE.txt new file mode 100644 index 0000000..d444ea9 --- /dev/null +++ b/api-docs/browser/0.1.0/FiraSans-LICENSE.txt @@ -0,0 +1,94 @@ +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/browser/0.1.0/FiraSans-Medium.woff b/api-docs/browser/0.1.0/FiraSans-Medium.woff new file mode 100644 index 0000000..7d742c5 Binary files /dev/null and b/api-docs/browser/0.1.0/FiraSans-Medium.woff differ diff --git a/api-docs/browser/0.1.0/FiraSans-Regular.woff b/api-docs/browser/0.1.0/FiraSans-Regular.woff new file mode 100644 index 0000000..d8e0363 Binary files /dev/null and b/api-docs/browser/0.1.0/FiraSans-Regular.woff differ diff --git a/api-docs/browser/0.1.0/LICENSE-APACHE.txt b/api-docs/browser/0.1.0/LICENSE-APACHE.txt new file mode 100644 index 0000000..16fe87b --- /dev/null +++ b/api-docs/browser/0.1.0/LICENSE-APACHE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/api-docs/browser/0.1.0/LICENSE-MIT.txt b/api-docs/browser/0.1.0/LICENSE-MIT.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/api-docs/browser/0.1.0/LICENSE-MIT.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/api-docs/browser/0.1.0/SourceCodePro-LICENSE.txt b/api-docs/browser/0.1.0/SourceCodePro-LICENSE.txt new file mode 100644 index 0000000..0754257 --- /dev/null +++ b/api-docs/browser/0.1.0/SourceCodePro-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/browser/0.1.0/SourceCodePro-Regular.woff b/api-docs/browser/0.1.0/SourceCodePro-Regular.woff new file mode 100644 index 0000000..5576670 Binary files /dev/null and b/api-docs/browser/0.1.0/SourceCodePro-Regular.woff differ diff --git a/api-docs/browser/0.1.0/SourceCodePro-Semibold.woff b/api-docs/browser/0.1.0/SourceCodePro-Semibold.woff new file mode 100644 index 0000000..ca972a1 Binary files /dev/null and b/api-docs/browser/0.1.0/SourceCodePro-Semibold.woff differ diff --git a/api-docs/browser/0.1.0/SourceSerifPro-Bold.ttf.woff b/api-docs/browser/0.1.0/SourceSerifPro-Bold.ttf.woff new file mode 100644 index 0000000..ca25431 Binary files /dev/null and b/api-docs/browser/0.1.0/SourceSerifPro-Bold.ttf.woff differ diff --git a/api-docs/browser/0.1.0/SourceSerifPro-It.ttf.woff b/api-docs/browser/0.1.0/SourceSerifPro-It.ttf.woff new file mode 100644 index 0000000..a287bbe Binary files /dev/null and b/api-docs/browser/0.1.0/SourceSerifPro-It.ttf.woff differ diff --git a/api-docs/browser/0.1.0/SourceSerifPro-LICENSE.md b/api-docs/browser/0.1.0/SourceSerifPro-LICENSE.md new file mode 100644 index 0000000..22cb755 --- /dev/null +++ b/api-docs/browser/0.1.0/SourceSerifPro-LICENSE.md @@ -0,0 +1,93 @@ +Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/browser/0.1.0/SourceSerifPro-Regular.ttf.woff b/api-docs/browser/0.1.0/SourceSerifPro-Regular.ttf.woff new file mode 100644 index 0000000..a3d55cf Binary files /dev/null and b/api-docs/browser/0.1.0/SourceSerifPro-Regular.ttf.woff differ diff --git a/api-docs/browser/0.1.0/ayu.css b/api-docs/browser/0.1.0/ayu.css new file mode 100644 index 0000000..096f6f3 --- /dev/null +++ b/api-docs/browser/0.1.0/ayu.css @@ -0,0 +1 @@ + body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod){border-bottom-color:#5c6773;}h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}code{color:#ffb454;}h3>code,h4>code,h5>code{color:#e6e1cf;}pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#5c6773;}.docblock table,.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.content .highlighted{color:#000 !important;background-color:#c6afb3;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted{background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a span.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}.collapse-toggle{color:#999;}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-focus:disabled{color:#929292;}.module-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background-color:transparent;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help>div>span{border-bottom-color:#5c6773;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.content .highlighted.mod,.content .highlighted.externcrate{}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content .highlighted.trait{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content .highlighted.traitalias{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}.content .highlighted.foreigntype{}pre.rust .lifetime{}.content .highlighted.primitive{}.content .highlighted.constant,.content .highlighted.static{}.stab.unstable{}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content .highlighted.enum{}.content .highlighted.struct{}.content .highlighted.keyword{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{}.stab.portability{}.content .highlighted.union{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}.content .highlighted.type{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results td span.alias{color:#c5c5c5;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;} \ No newline at end of file diff --git a/api-docs/browser/0.1.0/brush.svg b/api-docs/browser/0.1.0/brush.svg new file mode 100644 index 0000000..ea266e8 --- /dev/null +++ b/api-docs/browser/0.1.0/brush.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/browser/0.1.0/dark.css b/api-docs/browser/0.1.0/dark.css new file mode 100644 index 0000000..85dec48 --- /dev/null +++ b/api-docs/browser/0.1.0/dark.css @@ -0,0 +1 @@ +body{background-color:#353535;color:#ddd;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.content .highlighted{color:#eee !important;background-color:#616161;}.content .highlighted a,.content .highlighted span{color:#eee !important;}.content .highlighted.trait{background-color:#013191;}.content .highlighted.traitalias{background-color:#013191;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.mod{background-color:#803a1b;}.content .highlighted.externcrate{background-color:#396bac;}.content .highlighted.enum{background-color:#5b4e68;}.content .highlighted.struct{background-color:#194e9f;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#4950ed;}.content .highlighted.type{background-color:#38902c;}.content .highlighted.foreigntype{background-color:#b200d6;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#217d1c;}.content .highlighted.constant,.content .highlighted.static{background-color:#0063cc;}.content .highlighted.primitive{background-color:#00708a;}.content .highlighted.keyword{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}.collapse-toggle{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-focus:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;color:#2f2f2f;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;color:#2f2f2f;}.stab.portability>code{color:#ddd;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);color:black;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#ffb900;}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results td span.alias{color:#fff;}.search-results td span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;} \ No newline at end of file diff --git a/api-docs/browser/0.1.0/down-arrow.svg b/api-docs/browser/0.1.0/down-arrow.svg new file mode 100644 index 0000000..35437e7 --- /dev/null +++ b/api-docs/browser/0.1.0/down-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/browser/0.1.0/favicon-16x16.png b/api-docs/browser/0.1.0/favicon-16x16.png new file mode 100644 index 0000000..7cfe6c1 Binary files /dev/null and b/api-docs/browser/0.1.0/favicon-16x16.png differ diff --git a/api-docs/browser/0.1.0/favicon-32x32.png b/api-docs/browser/0.1.0/favicon-32x32.png new file mode 100644 index 0000000..5109c1d Binary files /dev/null and b/api-docs/browser/0.1.0/favicon-32x32.png differ diff --git a/api-docs/browser/0.1.0/favicon.svg b/api-docs/browser/0.1.0/favicon.svg new file mode 100644 index 0000000..8b34b51 --- /dev/null +++ b/api-docs/browser/0.1.0/favicon.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/api-docs/browser/0.1.0/light.css b/api-docs/browser/0.1.0/light.css new file mode 100644 index 0000000..fa73fe2 --- /dev/null +++ b/api-docs/browser/0.1.0/light.css @@ -0,0 +1 @@ + body{background-color:white;color:black;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.content .highlighted{color:#000 !important;background-color:#ccc;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted.trait{background-color:#c7b6ff;}.content .highlighted.traitalias{background-color:#c7b6ff;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.enum{background-color:#b4d1b9;}.content .highlighted.struct{background-color:#e7b1a0;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#c6afb3;}.content .highlighted.type{background-color:#ffc891;}.content .highlighted.foreigntype{background-color:#f5c4ff;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#8ce488;}.content .highlighted.constant,.content .highlighted.static{background-color:#c3e0ff;}.content .highlighted.primitive{background-color:#9aecff;}.content .highlighted.keyword{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}.collapse-toggle{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-focus:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;}.stab.portability>code{color:#000;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:#FDFFD3;border-right:3px solid #ffb44c;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#717171;}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results td span.alias{color:#000;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file diff --git a/api-docs/browser/0.1.0/mCaptcha_browser/all.html b/api-docs/browser/0.1.0/mCaptcha_browser/all.html new file mode 100644 index 0000000..b49b508 --- /dev/null +++ b/api-docs/browser/0.1.0/mCaptcha_browser/all.html @@ -0,0 +1,6 @@ +List of all items in this crate + +

[] + + List of all items

Functions

\ No newline at end of file diff --git a/api-docs/browser/0.1.0/mCaptcha_browser/fn.__wasm_bindgen_generated_gen_pow.html b/api-docs/browser/0.1.0/mCaptcha_browser/fn.__wasm_bindgen_generated_gen_pow.html new file mode 100644 index 0000000..0ec6cee --- /dev/null +++ b/api-docs/browser/0.1.0/mCaptcha_browser/fn.__wasm_bindgen_generated_gen_pow.html @@ -0,0 +1,4 @@ +mCaptcha_browser::__wasm_bindgen_generated_gen_pow - Rust + +

[][src]Function mCaptcha_browser::__wasm_bindgen_generated_gen_pow

pub extern "C" fn __wasm_bindgen_generated_gen_pow(
    arg0: <u32 as FromWasmAbi>::Abi,
    arg1: <String as FromWasmAbi>::Abi
) -> <String as ReturnWasmAbi>::Abi
\ No newline at end of file diff --git a/api-docs/browser/0.1.0/mCaptcha_browser/fn.gen_pow.html b/api-docs/browser/0.1.0/mCaptcha_browser/fn.gen_pow.html new file mode 100644 index 0000000..d97398f --- /dev/null +++ b/api-docs/browser/0.1.0/mCaptcha_browser/fn.gen_pow.html @@ -0,0 +1,4 @@ +mCaptcha_browser::gen_pow - Rust + +

[][src]Function mCaptcha_browser::gen_pow

pub fn gen_pow(difficulty_factor: u32, secret: String) -> String
\ No newline at end of file diff --git a/api-docs/browser/0.1.0/mCaptcha_browser/index.html b/api-docs/browser/0.1.0/mCaptcha_browser/index.html new file mode 100644 index 0000000..c15122f --- /dev/null +++ b/api-docs/browser/0.1.0/mCaptcha_browser/index.html @@ -0,0 +1,17 @@ +mCaptcha_browser - Rust + +

[][src]Crate mCaptcha_browser

mCaptcha is a proof of work based Denaial-of-Service attack protection system. +This is is a WASM library that you can embed in your frontend code to protect your +service.

+

A commercial managed solution is in the works but I'd much rather prefer +folks host their own instances as it will make the more decentralized and free.

+

Workflow:

+

mCaptcha workflow in the frontend is simple.

+
    +
  1. Call service to get a proof of work(PoW) configuration
  2. +
  3. Call into mCaptcha to get PoW
  4. +
  5. Send PoW to your service
  6. +
+

Functions

+
__wasm_bindgen_generated_gen_pow
gen_pow
\ No newline at end of file diff --git a/api-docs/browser/0.1.0/mCaptcha_browser/sidebar-items.js b/api-docs/browser/0.1.0/mCaptcha_browser/sidebar-items.js new file mode 100644 index 0000000..7c5f833 --- /dev/null +++ b/api-docs/browser/0.1.0/mCaptcha_browser/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["__wasm_bindgen_generated_gen_pow",""],["gen_pow",""]]}); \ No newline at end of file diff --git a/api-docs/browser/0.1.0/main.js b/api-docs/browser/0.1.0/main.js new file mode 100644 index 0000000..03cfb2c --- /dev/null +++ b/api-docs/browser/0.1.0/main.js @@ -0,0 +1,8 @@ +if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}function getSearchInput(){return document.getElementsByClassName("search-input")[0]}function getSearchElement(){return document.getElementById("search")}function getThemesElement(){return document.getElementById("theme-choices")}function getThemePickerElement(){return document.getElementById("theme-picker")}function focusSearchBar(){getSearchInput().focus()}function defocusSearchBar(){getSearchInput().blur()}(function(){"use strict";var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var disableShortcuts=getSettingValue("disable-shortcuts")==="true";var search_input=getSearchInput();var searchTimeout=null;var toggleAllDocsId="toggle-all-docs";var currentTab=0;var mouseMovedAfterSearch=true;var titleBeforeSearch=document.title;var searchTitle=null;function clearInputTimeout(){if(searchTimeout!==null){clearTimeout(searchTimeout);searchTimeout=null}}function getPageId(){if(window.location.hash){var tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}function showSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(main,"hidden");removeClass(search,"hidden");mouseMovedAfterSearch=false;document.title=searchTitle}function hideSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=titleBeforeSearch}var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function getQueryStringParams(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function isHidden(elem){return elem.offsetHeight===0}var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=getSearchElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){hideSearchResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(hash,"","?search=#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}elem=document.getElementById(savedHash.slice(1));if(!elem||!isHidden(elem)){return}var parent=elem.parentNode;if(parent&&hasClass(parent,"impl-items")){onEachLazy(parent.getElementsByClassName("collapsed"),function(e){if(e.parentNode===parent){e.click();return true}});if(isHidden(elem)){if(hasClass(parent.lastElementChild,"collapse-toggle")){parent.lastElementChild.click()}}}}}function highlightSourceLines(match,ev){if(typeof match==="undefined"){hideSidebar();match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to0){collapseDocs(collapses[0],"show")}}}}function getHelpElement(){buildHelperPopup();return document.getElementById("help")}function displayHelp(display,ev,help){help=help?help:getHelpElement();if(display===true){if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else if(hasClass(help,"hidden")===false){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}function handleEscape(ev){var help=getHelpElement();var search=getSearchElement();if(hasClass(help,"hidden")===false){displayHelp(false,ev,help)}else if(hasClass(search,"hidden")===false){clearInputTimeout();ev.preventDefault();hideSearchResults(search)}defocusSearchBar();hideThemeButtonState()}function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts===true){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();focusSearchBar();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:var themePicker=getThemePickerElement();if(themePicker.parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!=="theme-picker"){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!=="theme-picker"){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id==="theme-picker"&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}function findParentElement(elem,tagName){do{if(elem&&elem.tagName===tagName){return elem}elem=elem.parentNode}while(elem);return null}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function resetMouseMoved(ev){mouseMovedAfterSearch=true}document.addEventListener("mousemove",resetMouseMoved);var handleSourceHighlight=(function(){var prev_line_id=0;var set_fragment=function(name){var x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return function(ev){var cur_line_id=parseInt(ev.target.id,10);ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());document.addEventListener("click",function(ev){if(hasClass(ev.target,"help-button")){displayHelp(true,ev)}else if(hasClass(ev.target,"collapse-toggle")){collapseDocs(ev.target,"toggle")}else if(hasClass(ev.target.parentNode,"collapse-toggle")){collapseDocs(ev.target.parentNode,"toggle")}else if(ev.target.tagName==="SPAN"&&hasClass(ev.target.parentNode,"line-numbers")){handleSourceHighlight(ev)}else if(hasClass(getHelpElement(),"hidden")===false){var help=getHelpElement();var is_inside_help_popup=ev.target!==help&&help.contains(ev.target);if(is_inside_help_popup===false){addClass(help,"hidden");removeClass(document.body,"blur")}}else{var a=findParentElement(ev.target,"A");if(a&&a.hash){expandSection(a.hash.replace(/^#/,""))}}});(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=rootPath.match(/\.\.\//g).length+1;for(i=0;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;if(isType!==true||obj.type){var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnProperty(results,entry)){ar.push(results[entry])}}results=ar;var i;var nresults=results.length;for(i=0;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});var length=results.length;for(i=0;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function getObjectFromId(id){if(typeof id==="number"){return searchIndex[id]}return{'name':id}}function checkGenerics(obj,val){var lev_distance=MAX_LEV_DISTANCE+1;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var total=0;var done=0;var vlength=val.generics.length;for(var y=0;yGENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var allFound=true;for(var y=0;allFound===true&&yGENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch===true){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var length=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(aborted===false){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function generateId(ty){if(ty.parent&&ty.parent.name){return itemTypes[ty.ty]+ty.path+ty.parent.name+ty.name}return itemTypes[ty.ty]+ty.path+ty.name}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];var i;if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){for(i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i;var ty;var fullId;var returned;var in_args;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0;i1?paths.length-1:1);var lev;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=generateId(ty);if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||searchWords[j].replace(/_/g,"").indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=searchWords[j].replace(/_/g,"").indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){lev=MAX_LEV_DISTANCE+1}else{lev+=1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function initSearchNav(){var hoverTimeout;var click_func=function(e){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}var dst=e.target.getElementsByTagName("a");if(dst.length<1){return}dst=dst[0];if(window.location.pathname===dst.pathname){hideSearchResults();document.location.href=dst.href}};var mouseover_func=function(e){if(mouseMovedAfterSearch){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}clearTimeout(hoverTimeout);hoverTimeout=setTimeout(function(){onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){removeClass(i_e,"highlighted")})});addClass(el,"highlighted")},20)}};onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){i_e.onclick=click_func;i_e.onmouseover=mouseover_func})});search_input.onkeydown=function(e){var actives=[[],[],[]];var current=0;onEachLazy(document.getElementById("results").childNodes,function(e){onEachLazy(e.getElementsByClassName("highlighted"),function(h_e){actives[current].push(h_e)});current+=1});if(e.which===38){if(e.ctrlKey){printTab(currentTab>0?currentTab-1:2)}else{if(!actives[currentTab].length||!actives[currentTab][0].previousElementSibling){return}addClass(actives[currentTab][0].previousElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===40){if(e.ctrlKey){printTab(currentTab>1?0:currentTab+1)}else if(!actives[currentTab].length){var results=document.getElementById("results").childNodes;if(results.length>0){var res=results[currentTab].getElementsByClassName("result");if(res.length>0){addClass(res[0],"highlighted")}}}else if(actives[currentTab][0].nextElementSibling){addClass(actives[currentTab][0].nextElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===13){if(actives[currentTab].length){document.location.href=actives[currentTab][0].getElementsByTagName("a")[0].href}}else if(e.which===16){}else if(actives[currentTab].length>0){removeClass(actives[currentTab][0],"highlighted")}}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var splitPath=item.path.split("::");var enumName=splitPath.pop();path=splitPath.join("::");displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraStyle="";if(display===false){extraStyle=" style=\"display: none;\""}var output="";var duplicates={};var length=0;if(array.length>0){output="";array.forEach(function(item){var name,type;name=item.name;type=itemTypes[item.ty];if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}length+=1;output+=""});output+="
"+""+(item.is_alias===true?(""+item.alias+"  - see "):"")+item.displayPath+""+name+""+""+""+item.desc+" 
"}else{output="
No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:
"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(currentTab===tabNb){return""}return""}function showResults(results){var search=getSearchElement();if(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==getSearchLoadingText())){var elem=document.createElement("a");elem.href=results.others[0].href;elem.style.display="none";document.body.appendChild(elem);elem.click();return}var query=getQuery(search_input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var output="

Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"+ret_others[0]+ret_in_args[0]+ret_returned[0]+"
";search.innerHTML=output;showSearchResults(search);var tds=search.getElementsByTagName("td");var td_width=0;if(tds.length>0){td_width=tds[0].offsetWidth}var width=search.offsetWidth-40-td_width;onEachLazy(search.getElementsByClassName("desc"),function(e){e.style.width=width+"px"});initSearchNav();var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnProperty(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=getQueryStringParams();var query=getQuery(search_input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(forced!==true&&query.id===currentResults){if(query.query.length>0){putBackSearch(search_input)}return}searchTitle="Results for "+query.query+" - Rust";if(browserSupportsHistoryApi()){if(!history.state&&!params.search){history.pushState(query,"","?search="+encodeURIComponent(query.raw))}else{history.replaceState(query,"","?search="+encodeURIComponent(query.raw))}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates))}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i;var currentIndex=0;for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);searchIndex.push({crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,type:null,});currentIndex+=1;var items=rawSearchIndex[crate].i;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i0){search_input.value=params.search;search(e)}else{search_input.value="";hideSearchResults()}})}search()}index=buildIndex(rawSearchIndex);startSearch();if(rootPath==="../"||rootPath==="./"){var sidebar=document.getElementsByClassName("sidebar-elems")[0];if(sidebar){var div=document.createElement("div");div.className="block crate";div.innerHTML="

Crates

";var ul=document.createElement("ul");div.appendChild(ul);var crates=[];for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}crates.push(crate)}crates.sort();for(var i=0;i','`').replace('','`');return x.innerText}window.initSidebarItems=function(items){var sidebar=document.getElementsByClassName("sidebar-elems")[0];var current=window.sidebarCurrent;function block(shortty,longty){var filtered=items[shortty];if(!filtered){return}var div=document.createElement("div");div.className="block "+shortty;var h3=document.createElement("h3");h3.textContent=longty;div.appendChild(h3);var ul=document.createElement("ul");var length=filtered.length;for(var i=0;i"+""+"
"+code.outerHTML+"
";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function onEveryMatchingChild(elem,className,func){if(elem&&className&&func){var length=elem.childNodes.length;var nodes=elem.childNodes;for(var i=0;i"+labelForToggleButton(sectionIsCollapsed)+"
]";return toggle}function createToggle(toggle,otherMessage,fontSize,extraClass,show){var span=document.createElement("span");span.className="toggle-label";if(show){span.style.display="none"}if(!otherMessage){span.innerHTML=" Expand description"}else{span.innerHTML=otherMessage}if(fontSize){span.style.fontSize=fontSize}var mainToggle=toggle.cloneNode(true);mainToggle.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper";if(!show){addClass(wrapper,"collapsed");var inner=mainToggle.getElementsByClassName("inner");if(inner&&inner.length>0){inner[0].innerHTML="+"}}if(extraClass){addClass(wrapper,extraClass)}wrapper.appendChild(mainToggle);return wrapper}(function(){var toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}var toggle=createSimpleToggle(false);var hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";var hideImplementors=getSettingValue("auto-collapse-implementors")!=="false";var pageId=getPageId();var func=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(!next){return}if(hasClass(next,"docblock")){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideMethodDocs===true&&hasClass(e,"method")===true){collapseDocs(newToggle,"hide",pageId)}}};var funcImpl=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(next&&hasClass(next,"docblock")){next=next.nextElementSibling}if(!next){return}if(hasClass(e,"impl")&&(next.getElementsByClassName("method").length>0||next.getElementsByClassName("associatedconstant").length>0)){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideImplementors===true&&e.parentNode.id==="implementors-list"){collapseDocs(newToggle,"hide",pageId)}}};onEachLazy(document.getElementsByClassName("method"),func);onEachLazy(document.getElementsByClassName("associatedconstant"),func);onEachLazy(document.getElementsByClassName("impl"),funcImpl);var impl_call=function(){};if(hideMethodDocs===true){impl_call=function(e,newToggle){if(e.id.match(/^impl(?:-\d+)?$/)===null){if(hasClass(e,"impl")===true){collapseDocs(newToggle,"hide",pageId)}}}}var newToggle=document.createElement("a");newToggle.href="javascript:void(0)";newToggle.className="collapse-toggle hidden-default collapsed";newToggle.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items";function toggleClicked(){if(hasClass(this,"collapsed")){removeClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("hidden"),function(x){if(hasClass(x,"content")===false){removeClass(x,"hidden");addClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(false)+"] Hide undocumented items"}else{addClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("x"),function(x){if(hasClass(x,"content")===false){addClass(x,"hidden");removeClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items"}}onEachLazy(document.getElementsByClassName("impl-items"),function(e){onEachLazy(e.getElementsByClassName("associatedconstant"),func);var hiddenElems=e.getElementsByClassName("hidden");var needToggle=false;var hlength=hiddenElems.length;for(var i=0;i"+getSearchLoadingText()+"";showSearchResults(search)}var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")===true){hideSidebar()}else{showSidebar()}}}if(main){onEachLazy(main.getElementsByClassName("loading-content"),function(e){e.remove()});onEachLazy(main.childNodes,function(e){if(e.tagName==="H2"||e.tagName==="H3"){var nextTagName=e.nextElementSibling.tagName;if(nextTagName=="H2"||nextTagName=="H3"){e.nextElementSibling.style.display="flex"}else{e.nextElementSibling.style.display="block"}}})}function enableSearchInput(){if(search_input){search_input.removeAttribute('disabled')}}window.addSearchOptions=function(crates){var elem=document.getElementById("crate-search");if(!elem){enableSearchInput();return}var crates_text=[];if(Object.keys(crates).length>1){for(var crate in crates){if(hasOwnProperty(crates,crate)){crates_text.push(crate)}}}crates_text.sort(function(a,b){var lower_a=a.toLowerCase();var lower_b=b.toLowerCase();if(lower_alower_b){return 1}return 0});var savedCrate=getSettingValue("saved-filter-crate");for(var i=0;ithe rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["ctrl + ↑ / ↓","Switch result tab"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>(index&1)===0?""+y+"":y).join("")+"
"+x[1]+"
").join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";var infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + * -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ + str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);popup.appendChild(container);insertAfter(popup,getSearchElement());buildHelperPopup=function(){}}onHashChange(null);window.onhashchange=onHashChange}());window.onunload=function(){} \ No newline at end of file diff --git a/api-docs/browser/0.1.0/normalize.css b/api-docs/browser/0.1.0/normalize.css new file mode 100644 index 0000000..6d692b5 --- /dev/null +++ b/api-docs/browser/0.1.0/normalize.css @@ -0,0 +1,2 @@ + /*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/api-docs/browser/0.1.0/noscript.css b/api-docs/browser/0.1.0/noscript.css new file mode 100644 index 0000000..5cbcb90 --- /dev/null +++ b/api-docs/browser/0.1.0/noscript.css @@ -0,0 +1 @@ + #main>h2+div,#main>h2+h3,#main>h3+div{display:block;}.loading-content{display:none;}#main>h2+div,#main>h3+div{display:block;}#main>h2+h3{display:flex;}#main .impl-items .hidden{display:block !important;} \ No newline at end of file diff --git a/api-docs/browser/0.1.0/rust-logo.png b/api-docs/browser/0.1.0/rust-logo.png new file mode 100644 index 0000000..74b4bd6 Binary files /dev/null and b/api-docs/browser/0.1.0/rust-logo.png differ diff --git a/api-docs/browser/0.1.0/rustdoc.css b/api-docs/browser/0.1.0/rustdoc.css new file mode 100644 index 0000000..757de19 --- /dev/null +++ b/api-docs/browser/0.1.0/rustdoc.css @@ -0,0 +1 @@ + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff") format('woff');}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:400;src:local('Source Serif Pro'),url("SourceSerifPro-Regular.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:italic;font-weight:400;src:local('Source Serif Pro Italic'),url("SourceSerifPro-It.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:700;src:local('Source Serif Pro Bold'),url("SourceSerifPro-Bold.ttf.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.woff") format('woff');}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif Pro",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.notable),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{border-bottom:1px dashed;margin-top:0;}h1.fqn>.in-band>a:hover{text-decoration:underline;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border-bottom:1px solid;}h3.impl,h3.method,h4.method,h3.type,h4.type,h4.associatedconstant{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}h3.impl,h3.method,h3.type{padding-left:15px;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.content table td:first-child>a,.collapse-toggle,div.item-list .out-of-band,#source-sidebar,#sidebar-toggle{font-family:"Fira Sans",sans-serif;}.content ul.crate a.crate{font:16px/1.6 "Fira Sans";}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}code,pre,a.test-arrow{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code,.docblock code.spotlight{padding:0;}.docblock code.spotlight :last-child{padding-bottom:0.6em;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;min-width:70em;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-child{font-weight:500;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{margin-top:0;margin-bottom:8px;text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc:not(.source) .example-wrap{display:inline-flex;margin-bottom:10px;position:relative;}.example-wrap{width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;border-top-left-radius:5px;border-bottom-left-radius:5px;padding:13px 8px;text-align:right;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results{position:absolute;right:0;left:0;overflow:auto;}#results>table{width:100%;table-layout:fixed;margin-bottom:40px;}.content pre.line-numbers{float:left;border:none;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock code,.docblock-short code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}#main>.docblock h1{font-size:1.3em;}#main>.docblock h2{font-size:1.15em;}#main>.docblock h3,#main>.docblock h4,#main>.docblock h5{font-size:1em;}#main>h2+div,#main>h2+h3,#main>h3+div{display:none;flex-wrap:wrap;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{float:right;font-size:23px;margin:0px;padding:0px;font-weight:normal;}h3.impl>.out-of-band{font-size:21px;}h4.method>.out-of-band{font-size:19px;}h4>code,h3>code,.invisible>code{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{margin:0px;padding:0px;}.in-band>code{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content .method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items>h4{border-bottom:0;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.toggle-wrapper.marg-left>.collapse-toggle{left:-24px;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;margin-top:-13px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:-6px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,h4>code+.srclink,h3>code+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results .desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results a{display:block;}.content .search-results td:first-child{padding-right:0;width:50%;}.content .search-results td:first-child a{padding-right:10px;}.content .search-results td:first-child a:after{clear:both;content:"";display:block;}.content .search-results td:first-child a span{float:left;}tr.result span.primitive::after{content:' (primitive type)';font-style:italic;}tr.result span.keyword::after{content:' (keyword)';font-style:italic;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;}#help>div>span{text-align:center;display:block;margin:10px 0;font-size:18px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.module-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since,.methods .since{flex-grow:0;padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code,.methods code{flex-grow:1;}.impl-items h4,h4.impl,h3.impl,.methods h3{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.collapse-toggle{font-weight:300;position:absolute;left:-23px;top:0;}h3>.collapse-toggle,h4>.collapse-toggle{font-size:0.8em;top:5px;}.toggle-wrapper>.collapse-toggle{left:-24px;margin-top:0px;}.toggle-wrapper{position:relative;margin-top:0;}.toggle-wrapper.collapsed{height:25px;transition:height .2s;margin-bottom:.6em;}.collapse-toggle>.inner{display:inline-block;width:1.2ch;text-align:center;}.collapse-toggle.hidden-default{position:relative;margin-left:20px;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.toggle-wrapper>.collapse-toggle{left:0;}.variant+.toggle-wrapper+.docblock>p{margin-top:5px;}.sub-variant,.sub-variant>h3{margin-top:1px !important;}#main>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.enum>.toggle-wrapper+.docblock,.struct>.toggle-wrapper+.docblock{margin-left:30px;margin-bottom:20px;margin-top:5px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}.enum>.collapsed,.struct>.collapsed{margin-bottom:25px;}#main>.variant,#main>.structfield{display:block;}.attributes{display:block;margin-top:0px !important;margin-right:0px;margin-bottom:0px !important;margin-left:30px;}.toggle-attributes.collapsed{margin-bottom:0;}.impl-items>.toggle-attributes{margin-left:20px;}.impl-items .attributes{font-weight:500;}:target>code{opacity:1;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}h4>.notable-traits{position:absolute;left:-44px;top:2px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,.help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}.help-button{right:30px;font-family:"Fira Sans",sans-serif;text-align:center;font-size:17px;}#theme-picker,#settings-menu,.help-button{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}@media (min-width:701px){.information:first-child>.tooltip{margin-top:16px;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;left:0;top:45px;bottom:0;overflow-y:auto;border-right:1px solid;display:none;}.sidebar>.block.version{border-bottom:none;margin-top:12px;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main{margin-top:45px;padding:0;}.content .in-band{width:100%;}.content h4>.out-of-band{position:inherit;}.toggle-wrapper>.collapse-toggle{left:0px;}.toggle-wrapper{height:1.5em;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{display:flex;}.anchor{display:none !important;}h1.fqn{overflow:initial;}.theme-picker{left:10px;top:54px;z-index:1;}h4>.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar{width:calc(100% + 30px);}.show-it{display:block;width:246px;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}.collapse-toggle{left:-20px;}.impl>.collapse-toggle{left:-10px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}.help-button{display:none;}.search-container>div{width:calc(100% - 32px);}}@media print{nav.sub,.content .out-of-band,.collapse-toggle{display:none;}}@media (max-width:416px){#titles,#titles>button{height:73px;}#main{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}}h3.notable{margin:0;margin-bottom:13px;font-size:19px;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}.type-decl>pre>.toggle-wrapper.toggle-attributes.top-attr{margin-left:0 !important;}.type-decl>pre>.docblock.attributes.top-attr{margin-left:1.8em !important;}.type-decl>pre>.toggle-attributes{margin-left:2.2em;}.type-decl>pre>.docblock.attributes{margin-left:4em;} \ No newline at end of file diff --git a/api-docs/browser/0.1.0/search-index.js b/api-docs/browser/0.1.0/search-index.js new file mode 100644 index 0000000..9acb9a8 --- /dev/null +++ b/api-docs/browser/0.1.0/search-index.js @@ -0,0 +1,4 @@ +var searchIndex = JSON.parse('{\ +"mCaptcha_browser":{"doc":"mCaptcha is a proof of work based Denaial-of-Service …","i":[[5,"gen_pow","mCaptcha_browser","",null,[[["string",3]],["string",3]]],[5,"__wasm_bindgen_generated_gen_pow","","",null,[[]]]],"p":[]}\ +}'); +addSearchOptions(searchIndex);initSearch(searchIndex); \ No newline at end of file diff --git a/api-docs/browser/0.1.0/settings.css b/api-docs/browser/0.1.0/settings.css new file mode 100644 index 0000000..6709865 --- /dev/null +++ b/api-docs/browser/0.1.0/settings.css @@ -0,0 +1 @@ +.setting-line{padding:5px;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.select-wrapper{float:right;position:relative;height:27px;min-width:25%;}.select-wrapper select{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:2px solid #ccc;padding-right:28px;width:100%;}.select-wrapper img{pointer-events:none;position:absolute;right:0;bottom:0;background:#ccc;height:100%;width:28px;padding:0px 4px;}.select-wrapper select option{color:initial;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} \ No newline at end of file diff --git a/api-docs/browser/0.1.0/settings.html b/api-docs/browser/0.1.0/settings.html new file mode 100644 index 0000000..8b56aff --- /dev/null +++ b/api-docs/browser/0.1.0/settings.html @@ -0,0 +1,6 @@ +Rustdoc settings + +

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
+
Auto-hide item declarations
Auto-hide structs declaration
Auto-hide enums declaration
Auto-hide unions declaration
Auto-hide traits declaration
Auto-hide macros declaration
+
Auto-hide item attributes.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Auto-hide implementors of a trait
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
\ No newline at end of file diff --git a/api-docs/browser/0.1.0/settings.js b/api-docs/browser/0.1.0/settings.js new file mode 100644 index 0000000..b4d6fdc --- /dev/null +++ b/api-docs/browser/0.1.0/settings.js @@ -0,0 +1 @@ +(function(){function changeSetting(settingName,value){updateLocalStorage("rustdoc-"+settingName,value);switch(settingName){case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function setEvents(){onEachLazy(document.getElementsByClassName("slider"),function(elem){var toggle=elem.previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(document.getElementsByClassName("select-wrapper"),function(elem){var select=elem.getElementsByTagName("select")[0];var settingId=select.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}})}window.addEventListener("DOMContentLoaded",setEvents)})() \ No newline at end of file diff --git a/api-docs/browser/0.1.0/source-files.js b/api-docs/browser/0.1.0/source-files.js new file mode 100644 index 0000000..7700a5a --- /dev/null +++ b/api-docs/browser/0.1.0/source-files.js @@ -0,0 +1,3 @@ +var N = null;var sourcesIndex = {}; +sourcesIndex["mCaptcha_browser"] = {"name":"","files":["lib.rs"]}; +createSourceSidebar(); diff --git a/api-docs/browser/0.1.0/source-script.js b/api-docs/browser/0.1.0/source-script.js new file mode 100644 index 0000000..de663ca --- /dev/null +++ b/api-docs/browser/0.1.0/source-script.js @@ -0,0 +1 @@ +function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0;i"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(window.rootPath.endsWith("/")===false){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}} \ No newline at end of file diff --git a/api-docs/browser/0.1.0/src/mCaptcha_browser/lib.rs.html b/api-docs/browser/0.1.0/src/mCaptcha_browser/lib.rs.html new file mode 100644 index 0000000..fd5db71 --- /dev/null +++ b/api-docs/browser/0.1.0/src/mCaptcha_browser/lib.rs.html @@ -0,0 +1,114 @@ +lib.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+
+//! mCaptcha is a proof of work based Denaial-of-Service attack protection system.
+//! This is is a WASM library that you can embed in your frontend code to protect your
+//! service.
+//!
+//! A commercial managed solution is in the works but I'd much rather prefer
+//! folks host their own instances as it will make the more decentralized and free.
+//!
+//! ## Workflow:
+//! mCaptcha workflow in the frontend is simple.
+//! 1. Call service to get a proof of work(PoW) configuration
+//! 2. Call into mCaptcha to get PoW
+//! 3. Send PoW to your service
+
+use wasm_bindgen::prelude::*;
+
+// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
+// allocator.
+#[cfg(feature = "wee_alloc")]
+#[global_allocator]
+static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
+
+use pow_sha256::PoW;
+
+#[wasm_bindgen]
+pub fn gen_pow(difficulty_factor: u32, secret: String) -> String {
+    let difficulty = u128::max_value() - u128::max_value() / difficulty_factor as u128;
+    let a = PoW::prove_work(&secret.as_bytes().to_vec(), difficulty).unwrap();
+    let payload = serde_json::to_string(&a).unwrap();
+    payload
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn it_works() {
+        let payload = gen_pow(500, "MFsqLMZId629Dh2hrtux2Qdn3gBzCaSt".into());
+        assert_eq!("{\"nonce\":312,\"result\":\"340175381422106372296624206295814425082\",\"_spook\":null}",    &payload );
+
+        let payload = gen_pow(1_000, "MFsqLMZId629Dh2hrtux2Qdn3gBzCaSt".into());
+        assert_eq!("{\"nonce\":312,\"result\":\"340175381422106372296624206295814425082\",\"_spook\":null}", &payload);
+
+        let payload = gen_pow(2_000, "MFsqLMZId629Dh2hrtux2Qdn3gBzCaSt".into());
+        assert_eq!(&payload, "{\"nonce\":312,\"result\":\"340175381422106372296624206295814425082\",\"_spook\":null}");
+
+        let payload = gen_pow(100_000, "MFsqLMZId629Dh2hrtux2Qdn3gBzCaSt".into());
+        assert_eq!(&payload, "{\"nonce\":59930,\"result\":\"340281433562218714678373578791487113813\",\"_spook\":null}");
+
+        let payload = gen_pow(1_000_000, "MFsqLMZId629Dh2hrtux2Qdn3gBzCaSt".into());
+
+        assert_eq!(&payload,"{\"nonce\":1902451,\"result\":\"340282308726676882310449308394036800665\",\"_spook\":null}");
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/browser/0.1.0/storage.js b/api-docs/browser/0.1.0/storage.js new file mode 100644 index 0000000..318275e --- /dev/null +++ b/api-docs/browser/0.1.0/storage.js @@ -0,0 +1 @@ +var resourcesSuffix="";var darkThemes=["dark","ayu"];var currentTheme=document.getElementById("themeStyle");var mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed!==true){for(i=0;i=0;--i){if(func(arr[i])===true){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function hasOwnProperty(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function usableLocalStorage(){if(typeof Storage==="undefined"){return false}try{return window.localStorage!==null&&window.localStorage!==undefined}catch(err){return false}}function updateLocalStorage(name,value){if(usableLocalStorage()){localStorage[name]=value}else{}}function getCurrentValue(name){if(usableLocalStorage()&&localStorage[name]!==undefined){return localStorage[name]}return null}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){var fullBasicCss="rustdoc"+resourcesSuffix+".css";var fullNewTheme=newTheme+resourcesSuffix+".css";var newHref=mainStyleElem.href.replace(fullBasicCss,fullNewTheme);if(saveTheme===true){updateLocalStorage("rustdoc-theme",newTheme)}if(styleElem.href===newHref){return}var found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),function(el){savedHref.push(el.href)})}onEach(savedHref,function(el){if(el===newHref){found=true;return true}});if(found===true){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("rustdoc-use-system-theme",value);var toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}var updateSystemTheme=(function(){if(!window.matchMedia){return function(){let cssTheme=getComputedStyle(document.documentElement).getPropertyValue('content');switchTheme(currentTheme,mainTheme,JSON.parse(cssTheme)||light,true)}}var mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){if(getSettingValue("use-system-theme")!=="false"){var lightTheme=getSettingValue("preferred-light-theme")||"light";var darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){switchTheme(currentTheme,mainTheme,darkTheme,true)}else{switchTheme(currentTheme,mainTheme,lightTheme,true)}}}mql.addListener(handlePreferenceChange);return function(){handlePreferenceChange(mql)}})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(currentTheme,mainTheme,getSettingValue("theme")||"light",false)} \ No newline at end of file diff --git a/api-docs/browser/0.1.0/theme.js b/api-docs/browser/0.1.0/theme.js new file mode 100644 index 0000000..8f9c49a --- /dev/null +++ b/api-docs/browser/0.1.0/theme.js @@ -0,0 +1 @@ +var themes=document.getElementById("theme-choices");var themePicker=document.getElementById("theme-picker");function showThemeButtonState(){themes.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){themes.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}function switchThemeButtonState(){if(themes.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}};function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!=="theme-picker"&&(!active.parentNode||active.parentNode.id!=="theme-choices")&&(!related||(related.id!=="theme-picker"&&(!related.parentNode||related.parentNode.id!=="theme-choices")))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;["ayu","dark","light"].forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(el){switchTheme(currentTheme,mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themes.appendChild(but)}) \ No newline at end of file diff --git a/api-docs/browser/0.1.0/wheel.svg b/api-docs/browser/0.1.0/wheel.svg new file mode 100644 index 0000000..01da3b2 --- /dev/null +++ b/api-docs/browser/0.1.0/wheel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/COPYRIGHT.txt b/api-docs/m_captcha/0.1.0/COPYRIGHT.txt new file mode 100644 index 0000000..af77776 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/COPYRIGHT.txt @@ -0,0 +1,45 @@ +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif Pro (SourceSerifPro-Regular.ttf.woff, + SourceSerifPro-Bold.ttf.woff, SourceSerifPro-It.ttf.woff): + + Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with + Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of + Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerifPro-LICENSE.txt. + +This copyright file is intended to be distributed with rustdoc output. diff --git a/api-docs/m_captcha/0.1.0/FiraSans-LICENSE.txt b/api-docs/m_captcha/0.1.0/FiraSans-LICENSE.txt new file mode 100644 index 0000000..d444ea9 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/FiraSans-LICENSE.txt @@ -0,0 +1,94 @@ +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/m_captcha/0.1.0/FiraSans-Medium.woff b/api-docs/m_captcha/0.1.0/FiraSans-Medium.woff new file mode 100644 index 0000000..7d742c5 Binary files /dev/null and b/api-docs/m_captcha/0.1.0/FiraSans-Medium.woff differ diff --git a/api-docs/m_captcha/0.1.0/FiraSans-Regular.woff b/api-docs/m_captcha/0.1.0/FiraSans-Regular.woff new file mode 100644 index 0000000..d8e0363 Binary files /dev/null and b/api-docs/m_captcha/0.1.0/FiraSans-Regular.woff differ diff --git a/api-docs/m_captcha/0.1.0/LICENSE-APACHE.txt b/api-docs/m_captcha/0.1.0/LICENSE-APACHE.txt new file mode 100644 index 0000000..16fe87b --- /dev/null +++ b/api-docs/m_captcha/0.1.0/LICENSE-APACHE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/api-docs/m_captcha/0.1.0/LICENSE-MIT.txt b/api-docs/m_captcha/0.1.0/LICENSE-MIT.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/LICENSE-MIT.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/api-docs/m_captcha/0.1.0/SourceCodePro-LICENSE.txt b/api-docs/m_captcha/0.1.0/SourceCodePro-LICENSE.txt new file mode 100644 index 0000000..0754257 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/SourceCodePro-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/m_captcha/0.1.0/SourceCodePro-Regular.woff b/api-docs/m_captcha/0.1.0/SourceCodePro-Regular.woff new file mode 100644 index 0000000..5576670 Binary files /dev/null and b/api-docs/m_captcha/0.1.0/SourceCodePro-Regular.woff differ diff --git a/api-docs/m_captcha/0.1.0/SourceCodePro-Semibold.woff b/api-docs/m_captcha/0.1.0/SourceCodePro-Semibold.woff new file mode 100644 index 0000000..ca972a1 Binary files /dev/null and b/api-docs/m_captcha/0.1.0/SourceCodePro-Semibold.woff differ diff --git a/api-docs/m_captcha/0.1.0/SourceSerifPro-Bold.ttf.woff b/api-docs/m_captcha/0.1.0/SourceSerifPro-Bold.ttf.woff new file mode 100644 index 0000000..ca25431 Binary files /dev/null and b/api-docs/m_captcha/0.1.0/SourceSerifPro-Bold.ttf.woff differ diff --git a/api-docs/m_captcha/0.1.0/SourceSerifPro-It.ttf.woff b/api-docs/m_captcha/0.1.0/SourceSerifPro-It.ttf.woff new file mode 100644 index 0000000..a287bbe Binary files /dev/null and b/api-docs/m_captcha/0.1.0/SourceSerifPro-It.ttf.woff differ diff --git a/api-docs/m_captcha/0.1.0/SourceSerifPro-LICENSE.md b/api-docs/m_captcha/0.1.0/SourceSerifPro-LICENSE.md new file mode 100644 index 0000000..22cb755 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/SourceSerifPro-LICENSE.md @@ -0,0 +1,93 @@ +Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/m_captcha/0.1.0/SourceSerifPro-Regular.ttf.woff b/api-docs/m_captcha/0.1.0/SourceSerifPro-Regular.ttf.woff new file mode 100644 index 0000000..a3d55cf Binary files /dev/null and b/api-docs/m_captcha/0.1.0/SourceSerifPro-Regular.ttf.woff differ diff --git a/api-docs/m_captcha/0.1.0/ayu.css b/api-docs/m_captcha/0.1.0/ayu.css new file mode 100644 index 0000000..096f6f3 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/ayu.css @@ -0,0 +1 @@ + body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod){border-bottom-color:#5c6773;}h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}code{color:#ffb454;}h3>code,h4>code,h5>code{color:#e6e1cf;}pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#5c6773;}.docblock table,.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.content .highlighted{color:#000 !important;background-color:#c6afb3;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted{background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a span.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}.collapse-toggle{color:#999;}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-focus:disabled{color:#929292;}.module-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background-color:transparent;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help>div>span{border-bottom-color:#5c6773;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.content .highlighted.mod,.content .highlighted.externcrate{}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content .highlighted.trait{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content .highlighted.traitalias{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}.content .highlighted.foreigntype{}pre.rust .lifetime{}.content .highlighted.primitive{}.content .highlighted.constant,.content .highlighted.static{}.stab.unstable{}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content .highlighted.enum{}.content .highlighted.struct{}.content .highlighted.keyword{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{}.stab.portability{}.content .highlighted.union{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}.content .highlighted.type{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results td span.alias{color:#c5c5c5;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/brush.svg b/api-docs/m_captcha/0.1.0/brush.svg new file mode 100644 index 0000000..ea266e8 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/brush.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/dark.css b/api-docs/m_captcha/0.1.0/dark.css new file mode 100644 index 0000000..85dec48 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/dark.css @@ -0,0 +1 @@ +body{background-color:#353535;color:#ddd;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.content .highlighted{color:#eee !important;background-color:#616161;}.content .highlighted a,.content .highlighted span{color:#eee !important;}.content .highlighted.trait{background-color:#013191;}.content .highlighted.traitalias{background-color:#013191;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.mod{background-color:#803a1b;}.content .highlighted.externcrate{background-color:#396bac;}.content .highlighted.enum{background-color:#5b4e68;}.content .highlighted.struct{background-color:#194e9f;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#4950ed;}.content .highlighted.type{background-color:#38902c;}.content .highlighted.foreigntype{background-color:#b200d6;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#217d1c;}.content .highlighted.constant,.content .highlighted.static{background-color:#0063cc;}.content .highlighted.primitive{background-color:#00708a;}.content .highlighted.keyword{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}.collapse-toggle{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-focus:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;color:#2f2f2f;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;color:#2f2f2f;}.stab.portability>code{color:#ddd;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);color:black;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#ffb900;}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results td span.alias{color:#fff;}.search-results td span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/down-arrow.svg b/api-docs/m_captcha/0.1.0/down-arrow.svg new file mode 100644 index 0000000..35437e7 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/down-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/favicon-16x16.png b/api-docs/m_captcha/0.1.0/favicon-16x16.png new file mode 100644 index 0000000..7cfe6c1 Binary files /dev/null and b/api-docs/m_captcha/0.1.0/favicon-16x16.png differ diff --git a/api-docs/m_captcha/0.1.0/favicon-32x32.png b/api-docs/m_captcha/0.1.0/favicon-32x32.png new file mode 100644 index 0000000..5109c1d Binary files /dev/null and b/api-docs/m_captcha/0.1.0/favicon-32x32.png differ diff --git a/api-docs/m_captcha/0.1.0/favicon.svg b/api-docs/m_captcha/0.1.0/favicon.svg new file mode 100644 index 0000000..8b34b51 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/favicon.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/api-docs/m_captcha/0.1.0/implementors/actix/actor/trait.Actor.js b/api-docs/m_captcha/0.1.0/implementors/actix/actor/trait.Actor.js new file mode 100644 index 0000000..16ec94a --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/actix/actor/trait.Actor.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Actor for Master","synthetic":false,"types":[]},{"text":"impl Actor for MCaptcha","synthetic":false,"types":[]},{"text":"impl Actor for HashCache","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/actix/handler/trait.Handler.js b/api-docs/m_captcha/0.1.0/implementors/actix/handler/trait.Handler.js new file mode 100644 index 0000000..4280eed --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/actix/handler/trait.Handler.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Handler<GetSite> for Master","synthetic":false,"types":[]},{"text":"impl Handler<AddSite> for Master","synthetic":false,"types":[]},{"text":"impl Handler<Visitor> for MCaptcha","synthetic":false,"types":[]},{"text":"impl Handler<Cache> for HashCache","synthetic":false,"types":[]},{"text":"impl Handler<DeleteString> for HashCache","synthetic":false,"types":[]},{"text":"impl Handler<Retrive> for HashCache","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/actix/handler/trait.Message.js b/api-docs/m_captcha/0.1.0/implementors/actix/handler/trait.Message.js new file mode 100644 index 0000000..8c6d04b --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/actix/handler/trait.Message.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Message for GetSite","synthetic":false,"types":[]},{"text":"impl Message for AddSite","synthetic":false,"types":[]},{"text":"impl Message for Visitor","synthetic":false,"types":[]},{"text":"impl Message for Cache","synthetic":false,"types":[]},{"text":"impl Message for Retrive","synthetic":false,"types":[]},{"text":"impl Message for DeleteString","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/core/clone/trait.Clone.js b/api-docs/m_captcha/0.1.0/implementors/core/clone/trait.Clone.js new file mode 100644 index 0000000..886902e --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Clone for Level","synthetic":false,"types":[]},{"text":"impl Clone for LevelBuilder","synthetic":false,"types":[]},{"text":"impl Clone for Defense","synthetic":false,"types":[]},{"text":"impl Clone for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl Clone for CaptchaError","synthetic":false,"types":[]},{"text":"impl Clone for Master","synthetic":false,"types":[]},{"text":"impl Clone for AddSiteBuilder","synthetic":false,"types":[]},{"text":"impl Clone for MCaptcha","synthetic":false,"types":[]},{"text":"impl Clone for MCaptchaBuilder","synthetic":false,"types":[]},{"text":"impl Clone for HashCache","synthetic":false,"types":[]},{"text":"impl Clone for CacheBuilder","synthetic":false,"types":[]},{"text":"impl Clone for PoWConfig","synthetic":false,"types":[]},{"text":"impl Clone for Work","synthetic":false,"types":[]},{"text":"impl<T: Clone + Save> Clone for System<T>","synthetic":false,"types":[]},{"text":"impl<T: Clone + Save> Clone for SystemBuilder<T>","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/core/cmp/trait.PartialEq.js b/api-docs/m_captcha/0.1.0/implementors/core/cmp/trait.PartialEq.js new file mode 100644 index 0000000..cf1c21e --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl PartialEq<Level> for Level","synthetic":false,"types":[]},{"text":"impl PartialEq<LevelBuilder> for LevelBuilder","synthetic":false,"types":[]},{"text":"impl PartialEq<Defense> for Defense","synthetic":false,"types":[]},{"text":"impl PartialEq<DefenseBuilder> for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl PartialEq<CaptchaError> for CaptchaError","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/core/convert/trait.From.js b/api-docs/m_captcha/0.1.0/implementors/core/convert/trait.From.js new file mode 100644 index 0000000..9f519a6 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/core/convert/trait.From.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl From<Work> for PoW<String>","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/core/default/trait.Default.js b/api-docs/m_captcha/0.1.0/implementors/core/default/trait.Default.js new file mode 100644 index 0000000..17ac631 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/core/default/trait.Default.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Default for LevelBuilder","synthetic":false,"types":[]},{"text":"impl Default for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl Default for AddSiteBuilder","synthetic":false,"types":[]},{"text":"impl Default for MCaptchaBuilder","synthetic":false,"types":[]},{"text":"impl Default for HashCache","synthetic":false,"types":[]},{"text":"impl Default for CacheBuilder","synthetic":false,"types":[]},{"text":"impl<T: Default + Save> Default for SystemBuilder<T>","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/core/fmt/trait.Debug.js b/api-docs/m_captcha/0.1.0/implementors/core/fmt/trait.Debug.js new file mode 100644 index 0000000..cd6c666 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Debug for Level","synthetic":false,"types":[]},{"text":"impl Debug for LevelBuilder","synthetic":false,"types":[]},{"text":"impl Debug for Defense","synthetic":false,"types":[]},{"text":"impl Debug for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl Debug for CaptchaError","synthetic":false,"types":[]},{"text":"impl Debug for MCaptcha","synthetic":false,"types":[]},{"text":"impl Debug for PoWConfig","synthetic":false,"types":[]},{"text":"impl Debug for Work","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/core/fmt/trait.Display.js b/api-docs/m_captcha/0.1.0/implementors/core/fmt/trait.Display.js new file mode 100644 index 0000000..3aa76f3 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/core/fmt/trait.Display.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Display for CaptchaError","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Copy.js b/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Copy.js new file mode 100644 index 0000000..802c013 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Copy.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Copy for Level","synthetic":false,"types":[]},{"text":"impl Copy for LevelBuilder","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Freeze.js b/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Freeze.js new file mode 100644 index 0000000..de00f0b --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Freeze for Level","synthetic":true,"types":[]},{"text":"impl Freeze for LevelBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for Defense","synthetic":true,"types":[]},{"text":"impl Freeze for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for CaptchaError","synthetic":true,"types":[]},{"text":"impl Freeze for Master","synthetic":true,"types":[]},{"text":"impl Freeze for GetSite","synthetic":true,"types":[]},{"text":"impl Freeze for AddSite","synthetic":true,"types":[]},{"text":"impl Freeze for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for MCaptcha","synthetic":true,"types":[]},{"text":"impl Freeze for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for Visitor","synthetic":true,"types":[]},{"text":"impl Freeze for VisitorResult","synthetic":true,"types":[]},{"text":"impl Freeze for HashCache","synthetic":true,"types":[]},{"text":"impl Freeze for Cache","synthetic":true,"types":[]},{"text":"impl Freeze for CacheBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for Retrive","synthetic":true,"types":[]},{"text":"impl Freeze for DeleteString","synthetic":true,"types":[]},{"text":"impl Freeze for PoWConfig","synthetic":true,"types":[]},{"text":"impl Freeze for Work","synthetic":true,"types":[]},{"text":"impl<T> Freeze for System<T>","synthetic":true,"types":[]},{"text":"impl<T> Freeze for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Send.js b/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Send.js new file mode 100644 index 0000000..16f5c85 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Send for Level","synthetic":true,"types":[]},{"text":"impl Send for LevelBuilder","synthetic":true,"types":[]},{"text":"impl Send for Defense","synthetic":true,"types":[]},{"text":"impl Send for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl Send for CaptchaError","synthetic":true,"types":[]},{"text":"impl Send for Master","synthetic":true,"types":[]},{"text":"impl Send for GetSite","synthetic":true,"types":[]},{"text":"impl Send for AddSite","synthetic":true,"types":[]},{"text":"impl Send for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl Send for MCaptcha","synthetic":true,"types":[]},{"text":"impl Send for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl Send for Visitor","synthetic":true,"types":[]},{"text":"impl Send for VisitorResult","synthetic":true,"types":[]},{"text":"impl Send for HashCache","synthetic":true,"types":[]},{"text":"impl Send for Cache","synthetic":true,"types":[]},{"text":"impl Send for CacheBuilder","synthetic":true,"types":[]},{"text":"impl Send for Retrive","synthetic":true,"types":[]},{"text":"impl Send for DeleteString","synthetic":true,"types":[]},{"text":"impl Send for PoWConfig","synthetic":true,"types":[]},{"text":"impl Send for Work","synthetic":true,"types":[]},{"text":"impl<T> Send for System<T>","synthetic":true,"types":[]},{"text":"impl<T> Send for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.StructuralPartialEq.js b/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 0000000..d87286d --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl StructuralPartialEq for Level","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for LevelBuilder","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Defense","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for CaptchaError","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Sync.js b/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Sync.js new file mode 100644 index 0000000..e62dfc6 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Sync for Level","synthetic":true,"types":[]},{"text":"impl Sync for LevelBuilder","synthetic":true,"types":[]},{"text":"impl Sync for Defense","synthetic":true,"types":[]},{"text":"impl Sync for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl Sync for CaptchaError","synthetic":true,"types":[]},{"text":"impl Sync for Master","synthetic":true,"types":[]},{"text":"impl Sync for GetSite","synthetic":true,"types":[]},{"text":"impl Sync for AddSite","synthetic":true,"types":[]},{"text":"impl Sync for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl Sync for MCaptcha","synthetic":true,"types":[]},{"text":"impl Sync for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl Sync for Visitor","synthetic":true,"types":[]},{"text":"impl Sync for VisitorResult","synthetic":true,"types":[]},{"text":"impl Sync for HashCache","synthetic":true,"types":[]},{"text":"impl Sync for Cache","synthetic":true,"types":[]},{"text":"impl Sync for CacheBuilder","synthetic":true,"types":[]},{"text":"impl Sync for Retrive","synthetic":true,"types":[]},{"text":"impl Sync for DeleteString","synthetic":true,"types":[]},{"text":"impl Sync for PoWConfig","synthetic":true,"types":[]},{"text":"impl Sync for Work","synthetic":true,"types":[]},{"text":"impl<T> Sync for System<T>","synthetic":true,"types":[]},{"text":"impl<T> Sync for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Unpin.js b/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Unpin.js new file mode 100644 index 0000000..c03451e --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Unpin for Level","synthetic":true,"types":[]},{"text":"impl Unpin for LevelBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for Defense","synthetic":true,"types":[]},{"text":"impl Unpin for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for CaptchaError","synthetic":true,"types":[]},{"text":"impl Unpin for Master","synthetic":true,"types":[]},{"text":"impl Unpin for GetSite","synthetic":true,"types":[]},{"text":"impl Unpin for AddSite","synthetic":true,"types":[]},{"text":"impl Unpin for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for MCaptcha","synthetic":true,"types":[]},{"text":"impl Unpin for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for Visitor","synthetic":true,"types":[]},{"text":"impl Unpin for VisitorResult","synthetic":true,"types":[]},{"text":"impl Unpin for HashCache","synthetic":true,"types":[]},{"text":"impl Unpin for Cache","synthetic":true,"types":[]},{"text":"impl Unpin for CacheBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for Retrive","synthetic":true,"types":[]},{"text":"impl Unpin for DeleteString","synthetic":true,"types":[]},{"text":"impl Unpin for PoWConfig","synthetic":true,"types":[]},{"text":"impl Unpin for Work","synthetic":true,"types":[]},{"text":"impl<T> Unpin for System<T>","synthetic":true,"types":[]},{"text":"impl<T> Unpin for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/m_captcha/cache/trait.Save.js b/api-docs/m_captcha/0.1.0/implementors/m_captcha/cache/trait.Save.js new file mode 100644 index 0000000..218677b --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/m_captcha/cache/trait.Save.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/serde/ser/trait.Serialize.js b/api-docs/m_captcha/0.1.0/implementors/serde/ser/trait.Serialize.js new file mode 100644 index 0000000..d9c53b1 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/serde/ser/trait.Serialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Serialize for PoWConfig","synthetic":false,"types":[]},{"text":"impl Serialize for Work","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/std/error/trait.Error.js b/api-docs/m_captcha/0.1.0/implementors/std/error/trait.Error.js new file mode 100644 index 0000000..2536e5d --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/std/error/trait.Error.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Error for CaptchaError","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/std/panic/trait.RefUnwindSafe.js b/api-docs/m_captcha/0.1.0/implementors/std/panic/trait.RefUnwindSafe.js new file mode 100644 index 0000000..38c4d63 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/std/panic/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl RefUnwindSafe for Level","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for LevelBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Defense","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for CaptchaError","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for Master","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for GetSite","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for AddSite","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for MCaptcha","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Visitor","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for VisitorResult","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for HashCache","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Cache","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for CacheBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Retrive","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for DeleteString","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for PoWConfig","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Work","synthetic":true,"types":[]},{"text":"impl<T> !RefUnwindSafe for System<T>","synthetic":true,"types":[]},{"text":"impl<T> !RefUnwindSafe for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/implementors/std/panic/trait.UnwindSafe.js b/api-docs/m_captcha/0.1.0/implementors/std/panic/trait.UnwindSafe.js new file mode 100644 index 0000000..587ae86 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/implementors/std/panic/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl UnwindSafe for Level","synthetic":true,"types":[]},{"text":"impl UnwindSafe for LevelBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Defense","synthetic":true,"types":[]},{"text":"impl UnwindSafe for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for CaptchaError","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for Master","synthetic":true,"types":[]},{"text":"impl UnwindSafe for GetSite","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for AddSite","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for MCaptcha","synthetic":true,"types":[]},{"text":"impl UnwindSafe for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Visitor","synthetic":true,"types":[]},{"text":"impl UnwindSafe for VisitorResult","synthetic":true,"types":[]},{"text":"impl UnwindSafe for HashCache","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Cache","synthetic":true,"types":[]},{"text":"impl UnwindSafe for CacheBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Retrive","synthetic":true,"types":[]},{"text":"impl UnwindSafe for DeleteString","synthetic":true,"types":[]},{"text":"impl UnwindSafe for PoWConfig","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Work","synthetic":true,"types":[]},{"text":"impl<T> !UnwindSafe for System<T>","synthetic":true,"types":[]},{"text":"impl<T> !UnwindSafe for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/light.css b/api-docs/m_captcha/0.1.0/light.css new file mode 100644 index 0000000..fa73fe2 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/light.css @@ -0,0 +1 @@ + body{background-color:white;color:black;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.content .highlighted{color:#000 !important;background-color:#ccc;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted.trait{background-color:#c7b6ff;}.content .highlighted.traitalias{background-color:#c7b6ff;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.enum{background-color:#b4d1b9;}.content .highlighted.struct{background-color:#e7b1a0;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#c6afb3;}.content .highlighted.type{background-color:#ffc891;}.content .highlighted.foreigntype{background-color:#f5c4ff;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#8ce488;}.content .highlighted.constant,.content .highlighted.static{background-color:#c3e0ff;}.content .highlighted.primitive{background-color:#9aecff;}.content .highlighted.keyword{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}.collapse-toggle{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-focus:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;}.stab.portability>code{color:#000;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:#FDFFD3;border-right:3px solid #ffb44c;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#717171;}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results td span.alias{color:#000;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/all.html b/api-docs/m_captcha/0.1.0/m_captcha/all.html new file mode 100644 index 0000000..40b4220 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/all.html @@ -0,0 +1,6 @@ +List of all items in this crate + +

[] + + List of all items

Structs

Enums

Traits

Typedefs

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/cache/hashcache/index.html b/api-docs/m_captcha/0.1.0/m_captcha/cache/hashcache/index.html new file mode 100644 index 0000000..1ec8070 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/cache/hashcache/index.html @@ -0,0 +1,7 @@ +m_captcha::cache::hashcache - Rust + +

[][src]Module m_captcha::cache::hashcache

In-memory cache implementation that uses HashMap

+

Structs

+
HashCache

cache datastructure implementing Save

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/cache/hashcache/sidebar-items.js b/api-docs/m_captcha/0.1.0/m_captcha/cache/hashcache/sidebar-items.js new file mode 100644 index 0000000..5dadaea --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/cache/hashcache/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["HashCache","cache datastructure implementing [Save]"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/cache/hashcache/struct.HashCache.html b/api-docs/m_captcha/0.1.0/m_captcha/cache/hashcache/struct.HashCache.html new file mode 100644 index 0000000..ec40a0d --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/cache/hashcache/struct.HashCache.html @@ -0,0 +1,40 @@ +m_captcha::cache::hashcache::HashCache - Rust + +

[][src]Struct m_captcha::cache::hashcache::HashCache

pub struct HashCache(_);

cache datastructure implementing Save

+

Trait Implementations

impl Actor for HashCache[src]

type Context = Context<Self>

Actor execution context type

+

impl Clone for HashCache[src]

impl Default for HashCache[src]

impl Handler<Cache> for HashCache[src]

cache a PoWConfig

+

type Result = MessageResult<Cache>

The type of value that this handler will return. Read more

+

impl Handler<DeleteString> for HashCache[src]

Delte a PoWConfig

+

type Result = MessageResult<DeleteString>

The type of value that this handler will return. Read more

+

impl Handler<Retrive> for HashCache[src]

Retrive PoW difficulty_factor for a PoW string

+

type Result = MessageResult<Retrive>

The type of value that this handler will return. Read more

+

impl Save for HashCache[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/cache/index.html b/api-docs/m_captcha/0.1.0/m_captcha/cache/index.html new file mode 100644 index 0000000..ffb13f8 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/cache/index.html @@ -0,0 +1,13 @@ +m_captcha::cache - Rust + +

[][src]Module m_captcha::cache

message datatypes to interact with MCaptcha actor +Cache is used to save proofof work details and nonces to prevent replay attacks +and rainbow/dictionary attacks

+

Re-exports

+
pub use hashcache::HashCache;

Modules

+
hashcache

In-memory cache implementation that uses HashMap

+
messages

Messages that can be sent to cache data structures implementing Save

+

Traits

+
Save

Describes actor handler trait impls that are required by a cache implementation

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/index.html b/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/index.html new file mode 100644 index 0000000..0873567 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/index.html @@ -0,0 +1,12 @@ +m_captcha::cache::messages - Rust + +

[][src]Module m_captcha::cache::messages

Messages that can be sent to cache data structures implementing Save

+

Structs

+
Cache

Message to cache PoW difficulty factor and string

+
CacheBuilder

Builder for Cache.

+
DeleteString

Message to delete cached PoW difficulty factor and string +when they expire

+
Retrive

Message to retrive the the difficulty factor for the specified +string from the cache

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/sidebar-items.js b/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/sidebar-items.js new file mode 100644 index 0000000..829b034 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Cache","Message to cache PoW difficulty factor and string"],["CacheBuilder","Builder for `Cache`."],["DeleteString","Message to delete cached PoW difficulty factor and string when they expire"],["Retrive","Message to retrive the the difficulty factor for the specified string from the cache"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/struct.Cache.html b/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/struct.Cache.html new file mode 100644 index 0000000..c0d9458 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/struct.Cache.html @@ -0,0 +1,25 @@ +m_captcha::cache::messages::Cache - Rust + +

[][src]Struct m_captcha::cache::messages::Cache

pub struct Cache {
+    pub string: String,
+    pub difficulty_factor: u32,
+    pub duration: u64,
+}

Message to cache PoW difficulty factor and string

+

+ Fields

string: Stringdifficulty_factor: u32duration: u64

Implementations

impl Cache[src]

pub fn new(p: &PoWConfig, v: &VisitorResult) -> Self[src]

Trait Implementations

impl Handler<Cache> for HashCache[src]

cache a PoWConfig

+

type Result = MessageResult<Cache>

The type of value that this handler will return. Read more

+

impl Message for Cache[src]

type Result = CaptchaResult<()>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/struct.CacheBuilder.html b/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/struct.CacheBuilder.html new file mode 100644 index 0000000..3750fb9 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/struct.CacheBuilder.html @@ -0,0 +1,25 @@ +m_captcha::cache::messages::CacheBuilder - Rust + +

[][src]Struct m_captcha::cache::messages::CacheBuilder

pub struct CacheBuilder { /* fields omitted */ }

Builder for Cache.

+

Implementations

impl CacheBuilder[src]

pub fn string(&mut self, value: String) -> &mut Self[src]

pub fn difficulty_factor(&mut self, value: u32) -> &mut Self[src]

pub fn duration(&mut self, value: u64) -> &mut Self[src]

pub fn build(&self) -> Result<Cache, String>[src]

Builds a new Cache.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for CacheBuilder[src]

impl Default for CacheBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/struct.DeleteString.html b/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/struct.DeleteString.html new file mode 100644 index 0000000..e620eb9 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/struct.DeleteString.html @@ -0,0 +1,21 @@ +m_captcha::cache::messages::DeleteString - Rust + +

[][src]Struct m_captcha::cache::messages::DeleteString

pub struct DeleteString(pub String);

Message to delete cached PoW difficulty factor and string +when they expire

+

Trait Implementations

impl Handler<DeleteString> for HashCache[src]

Delte a PoWConfig

+

type Result = MessageResult<DeleteString>

The type of value that this handler will return. Read more

+

impl Message for DeleteString[src]

type Result = CaptchaResult<()>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/struct.Retrive.html b/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/struct.Retrive.html new file mode 100644 index 0000000..4fe78ce --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/cache/messages/struct.Retrive.html @@ -0,0 +1,21 @@ +m_captcha::cache::messages::Retrive - Rust + +

[][src]Struct m_captcha::cache::messages::Retrive

pub struct Retrive(pub String);

Message to retrive the the difficulty factor for the specified +string from the cache

+

Trait Implementations

impl Handler<Retrive> for HashCache[src]

Retrive PoW difficulty_factor for a PoW string

+

type Result = MessageResult<Retrive>

The type of value that this handler will return. Read more

+

impl Message for Retrive[src]

type Result = CaptchaResult<Option<u32>>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/cache/sidebar-items.js b/api-docs/m_captcha/0.1.0/m_captcha/cache/sidebar-items.js new file mode 100644 index 0000000..d2c721a --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/cache/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["hashcache","In-memory cache implementation that uses [HashMap]"],["messages","Messages that can be sent to cache data structures implementing [Save][super::Save]"]],"trait":[["Save","Describes actor handler trait impls that are required by a cache implementation"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/cache/trait.Save.html b/api-docs/m_captcha/0.1.0/m_captcha/cache/trait.Save.html new file mode 100644 index 0000000..20e3e84 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/cache/trait.Save.html @@ -0,0 +1,5 @@ +m_captcha::cache::Save - Rust + +

[][src]Trait m_captcha::cache::Save

pub trait Save: Actor + Handler<Retrive> + Handler<Cache> + Handler<DeleteString> { }

Describes actor handler trait impls that are required by a cache implementation

+

Implementors

impl Save for HashCache[src]

Loading content...
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/defense/index.html b/api-docs/m_captcha/0.1.0/m_captcha/defense/index.html new file mode 100644 index 0000000..015d5e2 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/defense/index.html @@ -0,0 +1,34 @@ +m_captcha::defense - Rust + +

[][src]Module m_captcha::defense

Defense datatypes

+ +
+use m_captcha::{LevelBuilder, DefenseBuilder};
+DefenseBuilder::default()
+       .add_level(
+           LevelBuilder::default()
+               .visitor_threshold(50)
+               .difficulty_factor(50)
+               .unwrap()
+               .build()
+               .unwrap(),
+       )
+       .unwrap()
+       .add_level(
+           LevelBuilder::default()
+               .visitor_threshold(500)
+               .difficulty_factor(500)
+               .unwrap()
+               .build()
+               .unwrap(),
+       )
+       .unwrap()
+       .build()
+       .unwrap();
+

Structs

+
Defense

struct describes all the different Levels at which an mCaptcha system operates

+
DefenseBuilder

Builder struct for Defense

+
Level

Level struct that describes threshold-difficulty factor mapping

+
LevelBuilder

Bulder struct for Level to describe threshold-difficulty factor mapping

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/defense/sidebar-items.js b/api-docs/m_captcha/0.1.0/m_captcha/defense/sidebar-items.js new file mode 100644 index 0000000..49f37fb --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/defense/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Defense","struct describes all the different [Level]s at which an mCaptcha system operates"],["DefenseBuilder","Builder struct for [Defense]"],["Level","Level struct that describes threshold-difficulty factor mapping"],["LevelBuilder","Bulder struct for [Level] to describe threshold-difficulty factor mapping"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/defense/struct.Defense.html b/api-docs/m_captcha/0.1.0/m_captcha/defense/struct.Defense.html new file mode 100644 index 0000000..df674b5 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/defense/struct.Defense.html @@ -0,0 +1,36 @@ +m_captcha::defense::Defense - Rust + +

[][src]Struct m_captcha::defense::Defense

pub struct Defense { /* fields omitted */ }

struct describes all the different Levels at which an mCaptcha system operates

+

Implementations

impl Defense[src]

pub fn get_difficulty(&self) -> u32[src]

! Difficulty is calculated as: +! rust ! let difficulty = u128::max_value() - u128::max_value() / difficulty_factor; ! +! The higher the difficulty_factor, the higher the difficulty. +Get difficulty factor of current level of defense

+

pub fn tighten_up(&mut self)[src]

tighten up defense. Increases defense level by a factor of one. +When defense is at max level, calling this method will have no effect

+

pub fn loosen_up(&mut self)[src]

Loosen up defense. Decreases defense level by a factor of one. +When defense is at the lowest level, calling this method will have no effect.

+

pub fn max_defense(&mut self)[src]

Set defense to maximum level

+

pub fn min_defense(&mut self)[src]

Set defense to minimum level

+

pub fn visitor_threshold(&self) -> u32[src]

Get current level's visitor threshold

+

Trait Implementations

impl Clone for Defense[src]

impl Debug for Defense[src]

impl PartialEq<Defense> for Defense[src]

impl StructuralPartialEq for Defense[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/defense/struct.DefenseBuilder.html b/api-docs/m_captcha/0.1.0/m_captcha/defense/struct.DefenseBuilder.html new file mode 100644 index 0000000..2adcb7c --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/defense/struct.DefenseBuilder.html @@ -0,0 +1,28 @@ +m_captcha::defense::DefenseBuilder - Rust + +

[][src]Struct m_captcha::defense::DefenseBuilder

pub struct DefenseBuilder { /* fields omitted */ }

Builder struct for Defense

+

Implementations

impl DefenseBuilder[src]

pub fn add_level(&mut self, level: Level) -> CaptchaResult<&mut Self>[src]

add a level to Defense

+

pub fn build(&mut self) -> CaptchaResult<Defense>[src]

Build Defense

+

Trait Implementations

impl Clone for DefenseBuilder[src]

impl Debug for DefenseBuilder[src]

impl Default for DefenseBuilder[src]

impl PartialEq<DefenseBuilder> for DefenseBuilder[src]

impl StructuralPartialEq for DefenseBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/defense/struct.Level.html b/api-docs/m_captcha/0.1.0/m_captcha/defense/struct.Level.html new file mode 100644 index 0000000..2176cce --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/defense/struct.Level.html @@ -0,0 +1,25 @@ +m_captcha::defense::Level - Rust + +

[][src]Struct m_captcha::defense::Level

pub struct Level { /* fields omitted */ }

Level struct that describes threshold-difficulty factor mapping

+

Trait Implementations

impl Clone for Level[src]

impl Copy for Level[src]

impl Debug for Level[src]

impl PartialEq<Level> for Level[src]

impl StructuralPartialEq for Level[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/defense/struct.LevelBuilder.html b/api-docs/m_captcha/0.1.0/m_captcha/defense/struct.LevelBuilder.html new file mode 100644 index 0000000..0430546 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/defense/struct.LevelBuilder.html @@ -0,0 +1,35 @@ +m_captcha::defense::LevelBuilder - Rust + +

[][src]Struct m_captcha::defense::LevelBuilder

pub struct LevelBuilder { /* fields omitted */ }

Bulder struct for Level to describe threshold-difficulty factor mapping

+

Implementations

impl LevelBuilder[src]

pub fn visitor_threshold(&mut self, visitor_threshold: u32) -> &mut Self[src]

set visitor count for level

+

pub fn difficulty_factor(
    &mut self,
    difficulty_factor: u32
) -> CaptchaResult<&mut Self>
[src]

set difficulty factor for level. difficulty_factor can't be zero because +Difficulty is calculated as:

+ +
+let difficulty_factor = 500;
+let difficulty = u128::max_value() - u128::max_value() / difficulty_factor;
+

the higher the difficulty_factor, the higher the difficulty.

+

pub fn build(&mut self) -> CaptchaResult<Level>[src]

build Level struct

+

Trait Implementations

impl Clone for LevelBuilder[src]

impl Copy for LevelBuilder[src]

impl Debug for LevelBuilder[src]

impl Default for LevelBuilder[src]

impl PartialEq<LevelBuilder> for LevelBuilder[src]

impl StructuralPartialEq for LevelBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/errors/enum.CaptchaError.html b/api-docs/m_captcha/0.1.0/m_captcha/errors/enum.CaptchaError.html new file mode 100644 index 0000000..90106f7 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/errors/enum.CaptchaError.html @@ -0,0 +1,57 @@ +m_captcha::errors::CaptchaError - Rust + +

[][src]Enum m_captcha::errors::CaptchaError

pub enum CaptchaError {
+    LevelEmpty,
+    DifficultyFactorZero,
+    SetDifficultyFactor,
+    SetVisitorThreshold,
+    DuplicateVisitorCount,
+    DecreaseingDifficultyFactor,
+    MailboxError,
+    InsuffiencientDifficulty,
+    StringNotFound,
+}

Error datatype

+

+ Variants

+
LevelEmpty

When configuring m_captcha, DefenseBuilder +must be passed atleast one LevelConfig if not this error will arise

+
DifficultyFactorZero

Visitor count must be a whole number(zero and above). +When configuring m_captcha, LevelBuilder. +difficulty_factor must be set to greater than zero.

+
SetDifficultyFactor

Difficulty factor must be set

+
SetVisitorThreshold

Visitor threshold must be set

+
DuplicateVisitorCount

Visitor count must be Unique

+
DecreaseingDifficultyFactor

Difficulty factor should increase with level

+
MailboxError

Difficulty factor should increase with level

+
InsuffiencientDifficulty

Happens when submitted work doesn't satisfy the required +difficulty factor

+
StringNotFound

Happens when submitted work is computed over string that +isn't in cache

+

Trait Implementations

impl Clone for CaptchaError[src]

impl Debug for CaptchaError[src]

impl Display for CaptchaError[src]

impl Error for CaptchaError[src]

impl PartialEq<CaptchaError> for CaptchaError[src]

impl StructuralPartialEq for CaptchaError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/errors/index.html b/api-docs/m_captcha/0.1.0/m_captcha/errors/index.html new file mode 100644 index 0000000..e6bffe0 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/errors/index.html @@ -0,0 +1,9 @@ +m_captcha::errors - Rust + +

[][src]Module m_captcha::errors

Errors and Result module

+

Enums

+
CaptchaError

Error datatype

+

Type Definitions

+
CaptchaResult

Result datatype for m_captcha

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/errors/sidebar-items.js b/api-docs/m_captcha/0.1.0/m_captcha/errors/sidebar-items.js new file mode 100644 index 0000000..ddfbf69 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/errors/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["CaptchaError","Error datatype"]],"type":[["CaptchaResult","[Result] datatype for m_captcha"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/errors/type.CaptchaResult.html b/api-docs/m_captcha/0.1.0/m_captcha/errors/type.CaptchaResult.html new file mode 100644 index 0000000..4f17bf4 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/errors/type.CaptchaResult.html @@ -0,0 +1,5 @@ +m_captcha::errors::CaptchaResult - Rust + +

[][src]Type Definition m_captcha::errors::CaptchaResult

type CaptchaResult<V> = Result<V, CaptchaError>;

Result datatype for m_captcha

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/index.html b/api-docs/m_captcha/0.1.0/m_captcha/index.html new file mode 100644 index 0000000..8849dd2 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/index.html @@ -0,0 +1,156 @@ +m_captcha - Rust + +

[][src]Crate m_captcha

mCaptcha is a proof of work based Denaial-of-Service attack protection system. +This is is a server library that you can embed in your services to protect your +servers.

+

A commercial managed solution is in the works but I'd much rather prefer +folks host their own instances as it will make the more decentralized and free.

+

In mCaptcha, defense is adjusted in discrete levels that depend on the +ammount of traffic that a service is experiencing. So users of this library are +requested to benchmark their target machines before configuring their mCaptcha +component.

+

Terminology:

+
    +
  • Difficulty(Factor): Minimum ammount of work that a client must do to make a valid +request.
  • +
  • Defense: A datatype that various visitor-difficulty mappigns
  • +
  • Visitor: Smallest unit of traffic, usually a single request. The more you have, the busier +your service is. Determines mCaptcha defense defense
  • +
  • Visitor threshold: The threshold at which MCaptcha will adjust defense defense
  • +
  • Cache : A datatype that implements Save. Used to store +PoW requirements to defend against replay attacks and dictionary attacks.
  • +
  • Master: A datatype that manages MCaptcha actors. Works like a DNS for Visitor messages.
  • +
  • System: mCaptcha system that manages cache, master and provides +useful abstractions. An mCaptcha system/instance can have only a single +System
  • +
+

Example:

+
+use m_captcha::{
+    cache::HashCache,
+    master::{AddSiteBuilder, Master},
+    pow::{ConfigBuilder, Work},
+    system::SystemBuilder,
+    DefenseBuilder, LevelBuilder, MCaptchaBuilder,
+};
+// traits from actix needs to be in scope for starting actor
+use actix::prelude::*;
+
+#[actix_rt::main]
+async fn main() -> std::io::Result<()> {
+    // start cahce actor
+    // cache is used to store PoW requirements that are sent to clients
+    // This way, it can be verified that the client computed work over a config
+    // that _we_ sent. Offers protection against rainbow tables powered dictionary attacks
+    let cache = HashCache::default().start();
+
+    // create PoW config with unique salt. Salt has to be safely guarded.
+    // salts protect us from replay attacks
+    let pow = ConfigBuilder::default()
+        .salt("myrandomsaltisnotlongenoug".into())
+        .build()
+        .unwrap();
+
+    // start master actor. Master actor is responsible for managing MCaptcha actors
+    // each mCaptcha system should have only one master
+    let master = Master::new().start();
+
+    // Create system. System encapsulates master and cache and provides useful abstraction
+    // each mCaptcha system should have only one system
+    let system = SystemBuilder::default()
+        .master(master)
+        .cache(cache)
+        .pow(pow.clone())
+        .build()
+        .unwrap();
+
+    // configure defense. This is a per site configuration. A site can have several levels
+    // of defenses configured
+    let defense = DefenseBuilder::default()
+        // add as many defense as you see fit
+        .add_level(
+            LevelBuilder::default()
+                // visitor_threshold is the threshold/limit at which
+                // mCaptcha will adjust difficulty defense
+                // it is advisable to set small values for the first
+                // defense visitor_threshold and difficulty_factor
+                // as this will be the work that clients will be
+                // computing when there's no load
+                .visitor_threshold(50)
+                .difficulty_factor(500)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .add_level(
+            LevelBuilder::default()
+                .visitor_threshold(5000)
+                .difficulty_factor(50000)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .build()
+        .unwrap();
+
+    // create and start MCaptcha actor that uses the above defense configuration
+    // This is what manages the difficulty factor of sites that an mCaptcha protects
+    let mcaptcha = MCaptchaBuilder::default()
+        .defense(defense)
+        // leaky bucket algorithm's emission interval
+        .duration(30)
+        //   .cache(cache)
+        .build()
+        .unwrap()
+        .start();
+
+    // unique value identifying an MCaptcha actor
+    let mcaptcha_name = "batsense.net";
+
+    // add MCaptcha to Master
+    let msg = AddSiteBuilder::default()
+        .id(mcaptcha_name.into())
+        .addr(mcaptcha.clone())
+        .build()
+        .unwrap();
+    system.master.send(msg).await.unwrap();
+
+    // Get PoW config. Should be called everytime there's a visitor for a
+    // managed site(here mcaptcha_name)
+    let work_req = system.get_pow(mcaptcha_name.into()).await.unwrap();
+
+    // the following computation should be done on the client but for the purpose
+    // of this illustration, we are going to do it on the server it self
+    let work = pow
+        .prove_work(&work_req.string, work_req.difficulty_factor)
+        .unwrap();
+
+    // the payload that the client sends to the server
+    let payload = Work {
+        string: work_req.string,
+        result: work.result,
+        nonce: work.nonce,
+    };
+
+    // Server evaluates client's work. Returns true if everything
+    // checksout and Err() if something fishy is happening
+    let res = system.verify_pow(payload.clone()).await.unwrap();
+    assert!(res);
+
+    Ok(())
+}
+

Re-exports

+
pub use crate::cache::hashcache::HashCache;
pub use defense::Defense;
pub use defense::DefenseBuilder;
pub use defense::LevelBuilder;
pub use mcaptcha::MCaptcha;
pub use mcaptcha::MCaptchaBuilder;

Modules

+
cache

message datatypes to interact with MCaptcha actor +Cache is used to save proofof work details and nonces to prevent replay attacks +and rainbow/dictionary attacks

+
defense

Defense datatypes

+
errors

Errors and Result module

+
master

Master actor module that manages MCaptcha actors

+
mcaptcha

MCaptcha actor module that manages defense levels

+
pow

PoW datatypes used in client-server interaction

+
system

module describing mCaptcha system

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/master/index.html b/api-docs/m_captcha/0.1.0/m_captcha/master/index.html new file mode 100644 index 0000000..fbd42ff --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/master/index.html @@ -0,0 +1,13 @@ +m_captcha::master - Rust + +

[][src]Module m_captcha::master

Master actor module that manages MCaptcha actors

+

Structs

+
AddSite

Message to add an MCaptcha actor to Master

+
AddSiteBuilder

Builder for AddSite.

+
GetSite

Message to get an MCaptcha actor from master

+
Master

This Actor manages the MCaptcha actors. +A service can have several MCaptcha actors with +varying Defense configurations +so a "master" actor is needed to manage them all

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/master/sidebar-items.js b/api-docs/m_captcha/0.1.0/m_captcha/master/sidebar-items.js new file mode 100644 index 0000000..8d58108 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/master/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["AddSite","Message to add an [MCaptcha] actor to [Master]"],["AddSiteBuilder","Builder for `AddSite`."],["GetSite","Message to get an [MCaptcha] actor from master"],["Master","This Actor manages the [MCaptcha] actors. A service can have several [MCaptcha] actors with varying [Defense][crate::defense::Defense] configurations so a \"master\" actor is needed to manage them all"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/master/struct.AddSite.html b/api-docs/m_captcha/0.1.0/m_captcha/master/struct.AddSite.html new file mode 100644 index 0000000..aa3b807 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/master/struct.AddSite.html @@ -0,0 +1,23 @@ +m_captcha::master::AddSite - Rust + +

[][src]Struct m_captcha::master::AddSite

pub struct AddSite {
+    pub id: String,
+    pub addr: Addr<MCaptcha>,
+}

Message to add an MCaptcha actor to Master

+

+ Fields

id: Stringaddr: Addr<MCaptcha>

Trait Implementations

impl Handler<AddSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Message for AddSite[src]

type Result = ()

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/master/struct.AddSiteBuilder.html b/api-docs/m_captcha/0.1.0/m_captcha/master/struct.AddSiteBuilder.html new file mode 100644 index 0000000..f382261 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/master/struct.AddSiteBuilder.html @@ -0,0 +1,25 @@ +m_captcha::master::AddSiteBuilder - Rust + +

[][src]Struct m_captcha::master::AddSiteBuilder

pub struct AddSiteBuilder { /* fields omitted */ }

Builder for AddSite.

+

Implementations

impl AddSiteBuilder[src]

pub fn id(&mut self, value: String) -> &mut Self[src]

pub fn addr(&mut self, value: Addr<MCaptcha>) -> &mut Self[src]

pub fn build(&self) -> Result<AddSite, String>[src]

Builds a new AddSite.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for AddSiteBuilder[src]

impl Default for AddSiteBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/master/struct.GetSite.html b/api-docs/m_captcha/0.1.0/m_captcha/master/struct.GetSite.html new file mode 100644 index 0000000..de0c693 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/master/struct.GetSite.html @@ -0,0 +1,19 @@ +m_captcha::master::GetSite - Rust + +

[][src]Struct m_captcha::master::GetSite

pub struct GetSite(pub String);

Message to get an MCaptcha actor from master

+

Trait Implementations

impl Handler<GetSite> for Master[src]

type Result = MessageResult<GetSite>

The type of value that this handler will return. Read more

+

impl Message for GetSite[src]

type Result = Option<Addr<MCaptcha>>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/master/struct.Master.html b/api-docs/m_captcha/0.1.0/m_captcha/master/struct.Master.html new file mode 100644 index 0000000..fad2d4c --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/master/struct.Master.html @@ -0,0 +1,40 @@ +m_captcha::master::Master - Rust + +

[][src]Struct m_captcha::master::Master

pub struct Master { /* fields omitted */ }

This Actor manages the MCaptcha actors. +A service can have several MCaptcha actors with +varying Defense configurations +so a "master" actor is needed to manage them all

+

Implementations

impl Master[src]

pub fn add_site(&mut self, details: AddSite)[src]

add MCaptcha actor to Master

+

pub fn new() -> Self[src]

create new master

+

pub fn get_site<'a, 'b>(&'a self, id: &'b str) -> Option<&'a Addr<MCaptcha>>[src]

get MCaptcha actor from Master

+

Trait Implementations

impl Actor for Master[src]

type Context = Context<Self>

Actor execution context type

+

impl Clone for Master[src]

impl Handler<AddSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Handler<GetSite> for Master[src]

type Result = MessageResult<GetSite>

The type of value that this handler will return. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/index.html b/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/index.html new file mode 100644 index 0000000..20291f6 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/index.html @@ -0,0 +1,67 @@ +m_captcha::mcaptcha - Rust + +

[][src]Module m_captcha::mcaptcha

MCaptcha actor module that manages defense levels

+

Usage:

+
+use m_captcha::{mcaptcha::Visitor, MCaptchaBuilder, cache::HashCache, LevelBuilder, DefenseBuilder};
+// traits from actix needs to be in scope for starting actor
+use actix::prelude::*;
+
+#[actix_rt::main]
+async fn main() -> std::io::Result<()> {
+    // configure defense
+    let defense = DefenseBuilder::default()
+        // add as many levels as you see fit
+        .add_level(
+            LevelBuilder::default()
+                // visitor_threshold is the threshold/limit at which
+                // mCaptcha will adjust difficulty levels
+                // it is advisable to set small values for the first
+                // levels visitor_threshold and difficulty_factor
+                // as this will be the work that clients will be
+                // computing when there's no load
+                .visitor_threshold(50)
+                .difficulty_factor(500)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .add_level(
+            LevelBuilder::default()
+                .visitor_threshold(5000)
+                .difficulty_factor(50000)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .build()
+        .unwrap();
+
+    // create and start MCaptcha actor
+    //let cache = HashCache::default().start();
+    let mcaptcha = MCaptchaBuilder::default()
+        .defense(defense)
+        // leaky bucket algorithm's emission interval
+        .duration(30)
+        .build()
+        .unwrap()
+        .start();
+
+    // increment count when user visits protected routes
+    mcaptcha.send(Visitor).await.unwrap();
+
+    Ok(())
+}
+

Structs

+
MCaptcha

This struct represents the mCaptcha state and is used +to configure leaky-bucket lifetime and manage defense

+
MCaptchaBuilder

Builder for MCaptcha.

+
Visitor

Message to increment the visitor count +returns difficulty factor and lifetime

+
VisitorResult

Struct representing the return datatime of +Visitor message. Contains MCaptcha lifetime +and difficulty factor

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/sidebar-items.js b/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/sidebar-items.js new file mode 100644 index 0000000..619299f --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["MCaptcha","This struct represents the mCaptcha state and is used to configure leaky-bucket lifetime and manage defense"],["MCaptchaBuilder","Builder for `MCaptcha`."],["Visitor","Message to increment the visitor count returns difficulty factor and lifetime"],["VisitorResult","Struct representing the return datatime of [Visitor] message. Contains MCaptcha lifetime and difficulty factor"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/struct.MCaptcha.html b/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/struct.MCaptcha.html new file mode 100644 index 0000000..4ad0285 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/struct.MCaptcha.html @@ -0,0 +1,38 @@ +m_captcha::mcaptcha::MCaptcha - Rust + +

[][src]Struct m_captcha::mcaptcha::MCaptcha

pub struct MCaptcha { /* fields omitted */ }

This struct represents the mCaptcha state and is used +to configure leaky-bucket lifetime and manage defense

+

Implementations

impl MCaptcha[src]

pub fn add_visitor(&mut self)[src]

incerment visiotr count by one

+

pub fn decrement_visiotr(&mut self)[src]

deccerment visiotr count by one

+

pub fn get_difficulty(&self) -> u32[src]

get current difficulty factor

+

pub fn get_duration(&self) -> u64[src]

get MCaptcha's lifetime

+

Trait Implementations

impl Actor for MCaptcha[src]

type Context = Context<Self>

Actor execution context type

+

impl Clone for MCaptcha[src]

impl Debug for MCaptcha[src]

impl Handler<Visitor> for MCaptcha[src]

type Result = MessageResult<Visitor>

The type of value that this handler will return. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/struct.MCaptchaBuilder.html b/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/struct.MCaptchaBuilder.html new file mode 100644 index 0000000..3d89fab --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/struct.MCaptchaBuilder.html @@ -0,0 +1,25 @@ +m_captcha::mcaptcha::MCaptchaBuilder - Rust + +

[][src]Struct m_captcha::mcaptcha::MCaptchaBuilder

pub struct MCaptchaBuilder { /* fields omitted */ }

Builder for MCaptcha.

+

Implementations

impl MCaptchaBuilder[src]

pub fn defense(&mut self, value: Defense) -> &mut Self[src]

pub fn duration(&mut self, value: u64) -> &mut Self[src]

pub fn build(&self) -> Result<MCaptcha, String>[src]

Builds a new MCaptcha.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for MCaptchaBuilder[src]

impl Default for MCaptchaBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/struct.Visitor.html b/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/struct.Visitor.html new file mode 100644 index 0000000..fa6516e --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/struct.Visitor.html @@ -0,0 +1,20 @@ +m_captcha::mcaptcha::Visitor - Rust + +

[][src]Struct m_captcha::mcaptcha::Visitor

pub struct Visitor;

Message to increment the visitor count +returns difficulty factor and lifetime

+

Trait Implementations

impl Handler<Visitor> for MCaptcha[src]

type Result = MessageResult<Visitor>

The type of value that this handler will return. Read more

+

impl Message for Visitor[src]

type Result = VisitorResult

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/struct.VisitorResult.html b/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/struct.VisitorResult.html new file mode 100644 index 0000000..8dc6f93 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/mcaptcha/struct.VisitorResult.html @@ -0,0 +1,21 @@ +m_captcha::mcaptcha::VisitorResult - Rust + +

[][src]Struct m_captcha::mcaptcha::VisitorResult

pub struct VisitorResult {
+    pub duration: u64,
+    pub difficulty_factor: u32,
+}

Struct representing the return datatime of +Visitor message. Contains MCaptcha lifetime +and difficulty factor

+

+ Fields

duration: u64difficulty_factor: u32

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/pow/index.html b/api-docs/m_captcha/0.1.0/m_captcha/pow/index.html new file mode 100644 index 0000000..e175a5b --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/pow/index.html @@ -0,0 +1,9 @@ +m_captcha::pow - Rust + +

[][src]Module m_captcha::pow

PoW datatypes used in client-server interaction

+

Structs

+
ConfigBuilder

Builder for Config.

+
PoWConfig

PoW requirement datatype that is be sent to clients for generating PoW

+
Work

PoW datatype that clients send to server

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/pow/sidebar-items.js b/api-docs/m_captcha/0.1.0/m_captcha/pow/sidebar-items.js new file mode 100644 index 0000000..66a8cb8 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/pow/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["ConfigBuilder","Builder for `Config`."],["PoWConfig","PoW requirement datatype that is be sent to clients for generating PoW"],["Work","PoW datatype that clients send to server"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/pow/struct.ConfigBuilder.html b/api-docs/m_captcha/0.1.0/m_captcha/pow/struct.ConfigBuilder.html new file mode 100644 index 0000000..ace8116 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/pow/struct.ConfigBuilder.html @@ -0,0 +1,25 @@ +m_captcha::pow::ConfigBuilder - Rust + +

[]Struct m_captcha::pow::ConfigBuilder

pub struct ConfigBuilder { /* fields omitted */ }

Builder for Config.

+

Implementations

impl ConfigBuilder

pub fn salt(&mut self, value: String) -> &mut ConfigBuilder

pub fn build(&self) -> Result<Config, String>

Builds a new Config.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for ConfigBuilder

impl Default for ConfigBuilder

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/pow/struct.PoWConfig.html b/api-docs/m_captcha/0.1.0/m_captcha/pow/struct.PoWConfig.html new file mode 100644 index 0000000..eb1d135 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/pow/struct.PoWConfig.html @@ -0,0 +1,28 @@ +m_captcha::pow::PoWConfig - Rust + +

[][src]Struct m_captcha::pow::PoWConfig

pub struct PoWConfig {
+    pub string: String,
+    pub difficulty_factor: u32,
+}

PoW requirement datatype that is be sent to clients for generating PoW

+

+ Fields

string: Stringdifficulty_factor: u32

Implementations

impl PoWConfig[src]

pub fn new(m: u32) -> Self[src]

create new instance of PoWConfig

+

Trait Implementations

impl Clone for PoWConfig[src]

impl Debug for PoWConfig[src]

impl Serialize for PoWConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/pow/struct.Work.html b/api-docs/m_captcha/0.1.0/m_captcha/pow/struct.Work.html new file mode 100644 index 0000000..a846d60 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/pow/struct.Work.html @@ -0,0 +1,29 @@ +m_captcha::pow::Work - Rust + +

[][src]Struct m_captcha::pow::Work

pub struct Work {
+    pub string: String,
+    pub result: String,
+    pub nonce: u64,
+}

PoW datatype that clients send to server

+

+ Fields

string: Stringresult: Stringnonce: u64

Trait Implementations

impl Clone for Work[src]

impl Debug for Work[src]

impl From<Work> for PoW<String>[src]

impl Serialize for Work[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/sidebar-items.js b/api-docs/m_captcha/0.1.0/m_captcha/sidebar-items.js new file mode 100644 index 0000000..454ab30 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["cache","message datatypes to interact with [MCaptcha] actor Cache is used to save proofof work details and nonces to prevent replay attacks and rainbow/dictionary attacks"],["defense","Defense datatypes"],["errors","Errors and Result module"],["master","[Master] actor module that manages [MCaptcha] actors"],["mcaptcha","MCaptcha actor module that manages defense levels"],["pow","PoW datatypes used in client-server interaction"],["system","module describing mCaptcha system"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/system/index.html b/api-docs/m_captcha/0.1.0/m_captcha/system/index.html new file mode 100644 index 0000000..f140da0 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/system/index.html @@ -0,0 +1,8 @@ +m_captcha::system - Rust + +

[][src]Module m_captcha::system

module describing mCaptcha system

+

Structs

+
System

struct describing various bits of data required for an mCaptcha system

+
SystemBuilder

Builder for System.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/system/sidebar-items.js b/api-docs/m_captcha/0.1.0/m_captcha/system/sidebar-items.js new file mode 100644 index 0000000..61ff7ad --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/system/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["System","struct describing various bits of data required for an mCaptcha system"],["SystemBuilder","Builder for `System`."]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/system/struct.System.html b/api-docs/m_captcha/0.1.0/m_captcha/system/struct.System.html new file mode 100644 index 0000000..a356d3b --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/system/struct.System.html @@ -0,0 +1,27 @@ +m_captcha::system::System - Rust + +

[][src]Struct m_captcha::system::System

pub struct System<T: Save> {
+    pub master: Addr<Master>,
+    // some fields omitted
+}

struct describing various bits of data required for an mCaptcha system

+

+ Fields

master: Addr<Master>

Implementations

impl<T> System<T> where
    T: Save,
    <T as Actor>::Context: ToEnvelope<T, Cache> + ToEnvelope<T, Retrive>, 
[src]

pub async fn get_pow(&self, id: String) -> Option<PoWConfig>[src]

utility function to get difficulty factor of site id and cache it

+

pub async fn verify_pow(&self, work: Work) -> CaptchaResult<bool>[src]

utility function to verify Work

+

Trait Implementations

impl<T: Clone + Save> Clone for System<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for System<T>[src]

impl<T> Send for System<T>[src]

impl<T> Sync for System<T>[src]

impl<T> Unpin for System<T>[src]

impl<T> !UnwindSafe for System<T>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/m_captcha/system/struct.SystemBuilder.html b/api-docs/m_captcha/0.1.0/m_captcha/system/struct.SystemBuilder.html new file mode 100644 index 0000000..77b054d --- /dev/null +++ b/api-docs/m_captcha/0.1.0/m_captcha/system/struct.SystemBuilder.html @@ -0,0 +1,25 @@ +m_captcha::system::SystemBuilder - Rust + +

[][src]Struct m_captcha::system::SystemBuilder

pub struct SystemBuilder<T: Save> { /* fields omitted */ }

Builder for System.

+

Implementations

impl<T: Save + Clone> SystemBuilder<T>[src]

pub fn master(&mut self, value: Addr<Master>) -> &mut Self[src]

pub fn cache(&mut self, value: Addr<T>) -> &mut Self[src]

pub fn pow(&mut self, value: Config) -> &mut Self[src]

pub fn build(&self) -> Result<System<T>, String>[src]

Builds a new System.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl<T: Clone + Save> Clone for SystemBuilder<T>[src]

impl<T: Default + Save> Default for SystemBuilder<T>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/main.js b/api-docs/m_captcha/0.1.0/main.js new file mode 100644 index 0000000..03cfb2c --- /dev/null +++ b/api-docs/m_captcha/0.1.0/main.js @@ -0,0 +1,8 @@ +if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}function getSearchInput(){return document.getElementsByClassName("search-input")[0]}function getSearchElement(){return document.getElementById("search")}function getThemesElement(){return document.getElementById("theme-choices")}function getThemePickerElement(){return document.getElementById("theme-picker")}function focusSearchBar(){getSearchInput().focus()}function defocusSearchBar(){getSearchInput().blur()}(function(){"use strict";var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var disableShortcuts=getSettingValue("disable-shortcuts")==="true";var search_input=getSearchInput();var searchTimeout=null;var toggleAllDocsId="toggle-all-docs";var currentTab=0;var mouseMovedAfterSearch=true;var titleBeforeSearch=document.title;var searchTitle=null;function clearInputTimeout(){if(searchTimeout!==null){clearTimeout(searchTimeout);searchTimeout=null}}function getPageId(){if(window.location.hash){var tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}function showSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(main,"hidden");removeClass(search,"hidden");mouseMovedAfterSearch=false;document.title=searchTitle}function hideSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=titleBeforeSearch}var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function getQueryStringParams(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function isHidden(elem){return elem.offsetHeight===0}var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=getSearchElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){hideSearchResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(hash,"","?search=#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}elem=document.getElementById(savedHash.slice(1));if(!elem||!isHidden(elem)){return}var parent=elem.parentNode;if(parent&&hasClass(parent,"impl-items")){onEachLazy(parent.getElementsByClassName("collapsed"),function(e){if(e.parentNode===parent){e.click();return true}});if(isHidden(elem)){if(hasClass(parent.lastElementChild,"collapse-toggle")){parent.lastElementChild.click()}}}}}function highlightSourceLines(match,ev){if(typeof match==="undefined"){hideSidebar();match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to0){collapseDocs(collapses[0],"show")}}}}function getHelpElement(){buildHelperPopup();return document.getElementById("help")}function displayHelp(display,ev,help){help=help?help:getHelpElement();if(display===true){if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else if(hasClass(help,"hidden")===false){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}function handleEscape(ev){var help=getHelpElement();var search=getSearchElement();if(hasClass(help,"hidden")===false){displayHelp(false,ev,help)}else if(hasClass(search,"hidden")===false){clearInputTimeout();ev.preventDefault();hideSearchResults(search)}defocusSearchBar();hideThemeButtonState()}function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts===true){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();focusSearchBar();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:var themePicker=getThemePickerElement();if(themePicker.parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!=="theme-picker"){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!=="theme-picker"){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id==="theme-picker"&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}function findParentElement(elem,tagName){do{if(elem&&elem.tagName===tagName){return elem}elem=elem.parentNode}while(elem);return null}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function resetMouseMoved(ev){mouseMovedAfterSearch=true}document.addEventListener("mousemove",resetMouseMoved);var handleSourceHighlight=(function(){var prev_line_id=0;var set_fragment=function(name){var x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return function(ev){var cur_line_id=parseInt(ev.target.id,10);ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());document.addEventListener("click",function(ev){if(hasClass(ev.target,"help-button")){displayHelp(true,ev)}else if(hasClass(ev.target,"collapse-toggle")){collapseDocs(ev.target,"toggle")}else if(hasClass(ev.target.parentNode,"collapse-toggle")){collapseDocs(ev.target.parentNode,"toggle")}else if(ev.target.tagName==="SPAN"&&hasClass(ev.target.parentNode,"line-numbers")){handleSourceHighlight(ev)}else if(hasClass(getHelpElement(),"hidden")===false){var help=getHelpElement();var is_inside_help_popup=ev.target!==help&&help.contains(ev.target);if(is_inside_help_popup===false){addClass(help,"hidden");removeClass(document.body,"blur")}}else{var a=findParentElement(ev.target,"A");if(a&&a.hash){expandSection(a.hash.replace(/^#/,""))}}});(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=rootPath.match(/\.\.\//g).length+1;for(i=0;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;if(isType!==true||obj.type){var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnProperty(results,entry)){ar.push(results[entry])}}results=ar;var i;var nresults=results.length;for(i=0;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});var length=results.length;for(i=0;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function getObjectFromId(id){if(typeof id==="number"){return searchIndex[id]}return{'name':id}}function checkGenerics(obj,val){var lev_distance=MAX_LEV_DISTANCE+1;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var total=0;var done=0;var vlength=val.generics.length;for(var y=0;yGENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var allFound=true;for(var y=0;allFound===true&&yGENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch===true){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var length=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(aborted===false){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function generateId(ty){if(ty.parent&&ty.parent.name){return itemTypes[ty.ty]+ty.path+ty.parent.name+ty.name}return itemTypes[ty.ty]+ty.path+ty.name}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];var i;if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){for(i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i;var ty;var fullId;var returned;var in_args;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0;i1?paths.length-1:1);var lev;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=generateId(ty);if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||searchWords[j].replace(/_/g,"").indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=searchWords[j].replace(/_/g,"").indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){lev=MAX_LEV_DISTANCE+1}else{lev+=1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function initSearchNav(){var hoverTimeout;var click_func=function(e){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}var dst=e.target.getElementsByTagName("a");if(dst.length<1){return}dst=dst[0];if(window.location.pathname===dst.pathname){hideSearchResults();document.location.href=dst.href}};var mouseover_func=function(e){if(mouseMovedAfterSearch){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}clearTimeout(hoverTimeout);hoverTimeout=setTimeout(function(){onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){removeClass(i_e,"highlighted")})});addClass(el,"highlighted")},20)}};onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){i_e.onclick=click_func;i_e.onmouseover=mouseover_func})});search_input.onkeydown=function(e){var actives=[[],[],[]];var current=0;onEachLazy(document.getElementById("results").childNodes,function(e){onEachLazy(e.getElementsByClassName("highlighted"),function(h_e){actives[current].push(h_e)});current+=1});if(e.which===38){if(e.ctrlKey){printTab(currentTab>0?currentTab-1:2)}else{if(!actives[currentTab].length||!actives[currentTab][0].previousElementSibling){return}addClass(actives[currentTab][0].previousElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===40){if(e.ctrlKey){printTab(currentTab>1?0:currentTab+1)}else if(!actives[currentTab].length){var results=document.getElementById("results").childNodes;if(results.length>0){var res=results[currentTab].getElementsByClassName("result");if(res.length>0){addClass(res[0],"highlighted")}}}else if(actives[currentTab][0].nextElementSibling){addClass(actives[currentTab][0].nextElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===13){if(actives[currentTab].length){document.location.href=actives[currentTab][0].getElementsByTagName("a")[0].href}}else if(e.which===16){}else if(actives[currentTab].length>0){removeClass(actives[currentTab][0],"highlighted")}}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var splitPath=item.path.split("::");var enumName=splitPath.pop();path=splitPath.join("::");displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraStyle="";if(display===false){extraStyle=" style=\"display: none;\""}var output="";var duplicates={};var length=0;if(array.length>0){output="";array.forEach(function(item){var name,type;name=item.name;type=itemTypes[item.ty];if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}length+=1;output+=""});output+="
"+""+(item.is_alias===true?(""+item.alias+"  - see "):"")+item.displayPath+""+name+""+""+""+item.desc+" 
"}else{output="
No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:
"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(currentTab===tabNb){return""}return""}function showResults(results){var search=getSearchElement();if(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==getSearchLoadingText())){var elem=document.createElement("a");elem.href=results.others[0].href;elem.style.display="none";document.body.appendChild(elem);elem.click();return}var query=getQuery(search_input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var output="

Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"+ret_others[0]+ret_in_args[0]+ret_returned[0]+"
";search.innerHTML=output;showSearchResults(search);var tds=search.getElementsByTagName("td");var td_width=0;if(tds.length>0){td_width=tds[0].offsetWidth}var width=search.offsetWidth-40-td_width;onEachLazy(search.getElementsByClassName("desc"),function(e){e.style.width=width+"px"});initSearchNav();var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnProperty(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=getQueryStringParams();var query=getQuery(search_input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(forced!==true&&query.id===currentResults){if(query.query.length>0){putBackSearch(search_input)}return}searchTitle="Results for "+query.query+" - Rust";if(browserSupportsHistoryApi()){if(!history.state&&!params.search){history.pushState(query,"","?search="+encodeURIComponent(query.raw))}else{history.replaceState(query,"","?search="+encodeURIComponent(query.raw))}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates))}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i;var currentIndex=0;for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);searchIndex.push({crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,type:null,});currentIndex+=1;var items=rawSearchIndex[crate].i;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i0){search_input.value=params.search;search(e)}else{search_input.value="";hideSearchResults()}})}search()}index=buildIndex(rawSearchIndex);startSearch();if(rootPath==="../"||rootPath==="./"){var sidebar=document.getElementsByClassName("sidebar-elems")[0];if(sidebar){var div=document.createElement("div");div.className="block crate";div.innerHTML="

Crates

";var ul=document.createElement("ul");div.appendChild(ul);var crates=[];for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}crates.push(crate)}crates.sort();for(var i=0;i','`').replace('','`');return x.innerText}window.initSidebarItems=function(items){var sidebar=document.getElementsByClassName("sidebar-elems")[0];var current=window.sidebarCurrent;function block(shortty,longty){var filtered=items[shortty];if(!filtered){return}var div=document.createElement("div");div.className="block "+shortty;var h3=document.createElement("h3");h3.textContent=longty;div.appendChild(h3);var ul=document.createElement("ul");var length=filtered.length;for(var i=0;i"+""+"
"+code.outerHTML+"
";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function onEveryMatchingChild(elem,className,func){if(elem&&className&&func){var length=elem.childNodes.length;var nodes=elem.childNodes;for(var i=0;i"+labelForToggleButton(sectionIsCollapsed)+"
]";return toggle}function createToggle(toggle,otherMessage,fontSize,extraClass,show){var span=document.createElement("span");span.className="toggle-label";if(show){span.style.display="none"}if(!otherMessage){span.innerHTML=" Expand description"}else{span.innerHTML=otherMessage}if(fontSize){span.style.fontSize=fontSize}var mainToggle=toggle.cloneNode(true);mainToggle.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper";if(!show){addClass(wrapper,"collapsed");var inner=mainToggle.getElementsByClassName("inner");if(inner&&inner.length>0){inner[0].innerHTML="+"}}if(extraClass){addClass(wrapper,extraClass)}wrapper.appendChild(mainToggle);return wrapper}(function(){var toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}var toggle=createSimpleToggle(false);var hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";var hideImplementors=getSettingValue("auto-collapse-implementors")!=="false";var pageId=getPageId();var func=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(!next){return}if(hasClass(next,"docblock")){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideMethodDocs===true&&hasClass(e,"method")===true){collapseDocs(newToggle,"hide",pageId)}}};var funcImpl=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(next&&hasClass(next,"docblock")){next=next.nextElementSibling}if(!next){return}if(hasClass(e,"impl")&&(next.getElementsByClassName("method").length>0||next.getElementsByClassName("associatedconstant").length>0)){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideImplementors===true&&e.parentNode.id==="implementors-list"){collapseDocs(newToggle,"hide",pageId)}}};onEachLazy(document.getElementsByClassName("method"),func);onEachLazy(document.getElementsByClassName("associatedconstant"),func);onEachLazy(document.getElementsByClassName("impl"),funcImpl);var impl_call=function(){};if(hideMethodDocs===true){impl_call=function(e,newToggle){if(e.id.match(/^impl(?:-\d+)?$/)===null){if(hasClass(e,"impl")===true){collapseDocs(newToggle,"hide",pageId)}}}}var newToggle=document.createElement("a");newToggle.href="javascript:void(0)";newToggle.className="collapse-toggle hidden-default collapsed";newToggle.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items";function toggleClicked(){if(hasClass(this,"collapsed")){removeClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("hidden"),function(x){if(hasClass(x,"content")===false){removeClass(x,"hidden");addClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(false)+"] Hide undocumented items"}else{addClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("x"),function(x){if(hasClass(x,"content")===false){addClass(x,"hidden");removeClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items"}}onEachLazy(document.getElementsByClassName("impl-items"),function(e){onEachLazy(e.getElementsByClassName("associatedconstant"),func);var hiddenElems=e.getElementsByClassName("hidden");var needToggle=false;var hlength=hiddenElems.length;for(var i=0;i"+getSearchLoadingText()+"";showSearchResults(search)}var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")===true){hideSidebar()}else{showSidebar()}}}if(main){onEachLazy(main.getElementsByClassName("loading-content"),function(e){e.remove()});onEachLazy(main.childNodes,function(e){if(e.tagName==="H2"||e.tagName==="H3"){var nextTagName=e.nextElementSibling.tagName;if(nextTagName=="H2"||nextTagName=="H3"){e.nextElementSibling.style.display="flex"}else{e.nextElementSibling.style.display="block"}}})}function enableSearchInput(){if(search_input){search_input.removeAttribute('disabled')}}window.addSearchOptions=function(crates){var elem=document.getElementById("crate-search");if(!elem){enableSearchInput();return}var crates_text=[];if(Object.keys(crates).length>1){for(var crate in crates){if(hasOwnProperty(crates,crate)){crates_text.push(crate)}}}crates_text.sort(function(a,b){var lower_a=a.toLowerCase();var lower_b=b.toLowerCase();if(lower_alower_b){return 1}return 0});var savedCrate=getSettingValue("saved-filter-crate");for(var i=0;ithe rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["ctrl + ↑ / ↓","Switch result tab"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>(index&1)===0?""+y+"":y).join("")+"
"+x[1]+"
").join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";var infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + * -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ + str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);popup.appendChild(container);insertAfter(popup,getSearchElement());buildHelperPopup=function(){}}onHashChange(null);window.onhashchange=onHashChange}());window.onunload=function(){} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/normalize.css b/api-docs/m_captcha/0.1.0/normalize.css new file mode 100644 index 0000000..6d692b5 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/normalize.css @@ -0,0 +1,2 @@ + /*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/noscript.css b/api-docs/m_captcha/0.1.0/noscript.css new file mode 100644 index 0000000..5cbcb90 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/noscript.css @@ -0,0 +1 @@ + #main>h2+div,#main>h2+h3,#main>h3+div{display:block;}.loading-content{display:none;}#main>h2+div,#main>h3+div{display:block;}#main>h2+h3{display:flex;}#main .impl-items .hidden{display:block !important;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/rust-logo.png b/api-docs/m_captcha/0.1.0/rust-logo.png new file mode 100644 index 0000000..74b4bd6 Binary files /dev/null and b/api-docs/m_captcha/0.1.0/rust-logo.png differ diff --git a/api-docs/m_captcha/0.1.0/rustdoc.css b/api-docs/m_captcha/0.1.0/rustdoc.css new file mode 100644 index 0000000..757de19 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/rustdoc.css @@ -0,0 +1 @@ + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff") format('woff');}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:400;src:local('Source Serif Pro'),url("SourceSerifPro-Regular.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:italic;font-weight:400;src:local('Source Serif Pro Italic'),url("SourceSerifPro-It.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:700;src:local('Source Serif Pro Bold'),url("SourceSerifPro-Bold.ttf.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.woff") format('woff');}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif Pro",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.notable),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{border-bottom:1px dashed;margin-top:0;}h1.fqn>.in-band>a:hover{text-decoration:underline;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border-bottom:1px solid;}h3.impl,h3.method,h4.method,h3.type,h4.type,h4.associatedconstant{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}h3.impl,h3.method,h3.type{padding-left:15px;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.content table td:first-child>a,.collapse-toggle,div.item-list .out-of-band,#source-sidebar,#sidebar-toggle{font-family:"Fira Sans",sans-serif;}.content ul.crate a.crate{font:16px/1.6 "Fira Sans";}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}code,pre,a.test-arrow{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code,.docblock code.spotlight{padding:0;}.docblock code.spotlight :last-child{padding-bottom:0.6em;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;min-width:70em;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-child{font-weight:500;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{margin-top:0;margin-bottom:8px;text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc:not(.source) .example-wrap{display:inline-flex;margin-bottom:10px;position:relative;}.example-wrap{width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;border-top-left-radius:5px;border-bottom-left-radius:5px;padding:13px 8px;text-align:right;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results{position:absolute;right:0;left:0;overflow:auto;}#results>table{width:100%;table-layout:fixed;margin-bottom:40px;}.content pre.line-numbers{float:left;border:none;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock code,.docblock-short code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}#main>.docblock h1{font-size:1.3em;}#main>.docblock h2{font-size:1.15em;}#main>.docblock h3,#main>.docblock h4,#main>.docblock h5{font-size:1em;}#main>h2+div,#main>h2+h3,#main>h3+div{display:none;flex-wrap:wrap;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{float:right;font-size:23px;margin:0px;padding:0px;font-weight:normal;}h3.impl>.out-of-band{font-size:21px;}h4.method>.out-of-band{font-size:19px;}h4>code,h3>code,.invisible>code{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{margin:0px;padding:0px;}.in-band>code{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content .method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items>h4{border-bottom:0;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.toggle-wrapper.marg-left>.collapse-toggle{left:-24px;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;margin-top:-13px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:-6px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,h4>code+.srclink,h3>code+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results .desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results a{display:block;}.content .search-results td:first-child{padding-right:0;width:50%;}.content .search-results td:first-child a{padding-right:10px;}.content .search-results td:first-child a:after{clear:both;content:"";display:block;}.content .search-results td:first-child a span{float:left;}tr.result span.primitive::after{content:' (primitive type)';font-style:italic;}tr.result span.keyword::after{content:' (keyword)';font-style:italic;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;}#help>div>span{text-align:center;display:block;margin:10px 0;font-size:18px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.module-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since,.methods .since{flex-grow:0;padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code,.methods code{flex-grow:1;}.impl-items h4,h4.impl,h3.impl,.methods h3{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.collapse-toggle{font-weight:300;position:absolute;left:-23px;top:0;}h3>.collapse-toggle,h4>.collapse-toggle{font-size:0.8em;top:5px;}.toggle-wrapper>.collapse-toggle{left:-24px;margin-top:0px;}.toggle-wrapper{position:relative;margin-top:0;}.toggle-wrapper.collapsed{height:25px;transition:height .2s;margin-bottom:.6em;}.collapse-toggle>.inner{display:inline-block;width:1.2ch;text-align:center;}.collapse-toggle.hidden-default{position:relative;margin-left:20px;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.toggle-wrapper>.collapse-toggle{left:0;}.variant+.toggle-wrapper+.docblock>p{margin-top:5px;}.sub-variant,.sub-variant>h3{margin-top:1px !important;}#main>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.enum>.toggle-wrapper+.docblock,.struct>.toggle-wrapper+.docblock{margin-left:30px;margin-bottom:20px;margin-top:5px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}.enum>.collapsed,.struct>.collapsed{margin-bottom:25px;}#main>.variant,#main>.structfield{display:block;}.attributes{display:block;margin-top:0px !important;margin-right:0px;margin-bottom:0px !important;margin-left:30px;}.toggle-attributes.collapsed{margin-bottom:0;}.impl-items>.toggle-attributes{margin-left:20px;}.impl-items .attributes{font-weight:500;}:target>code{opacity:1;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}h4>.notable-traits{position:absolute;left:-44px;top:2px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,.help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}.help-button{right:30px;font-family:"Fira Sans",sans-serif;text-align:center;font-size:17px;}#theme-picker,#settings-menu,.help-button{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}@media (min-width:701px){.information:first-child>.tooltip{margin-top:16px;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;left:0;top:45px;bottom:0;overflow-y:auto;border-right:1px solid;display:none;}.sidebar>.block.version{border-bottom:none;margin-top:12px;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main{margin-top:45px;padding:0;}.content .in-band{width:100%;}.content h4>.out-of-band{position:inherit;}.toggle-wrapper>.collapse-toggle{left:0px;}.toggle-wrapper{height:1.5em;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{display:flex;}.anchor{display:none !important;}h1.fqn{overflow:initial;}.theme-picker{left:10px;top:54px;z-index:1;}h4>.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar{width:calc(100% + 30px);}.show-it{display:block;width:246px;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}.collapse-toggle{left:-20px;}.impl>.collapse-toggle{left:-10px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}.help-button{display:none;}.search-container>div{width:calc(100% - 32px);}}@media print{nav.sub,.content .out-of-band,.collapse-toggle{display:none;}}@media (max-width:416px){#titles,#titles>button{height:73px;}#main{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}}h3.notable{margin:0;margin-bottom:13px;font-size:19px;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}.type-decl>pre>.toggle-wrapper.toggle-attributes.top-attr{margin-left:0 !important;}.type-decl>pre>.docblock.attributes.top-attr{margin-left:1.8em !important;}.type-decl>pre>.toggle-attributes{margin-left:2.2em;}.type-decl>pre>.docblock.attributes{margin-left:4em;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/search-index.js b/api-docs/m_captcha/0.1.0/search-index.js new file mode 100644 index 0000000..3b62afe --- /dev/null +++ b/api-docs/m_captcha/0.1.0/search-index.js @@ -0,0 +1,4 @@ +var searchIndex = JSON.parse('{\ +"m_captcha":{"doc":"mCaptcha is a proof of work based Denaial-of-Service …","i":[[0,"defense","m_captcha","Defense datatypes",null,null],[3,"Level","m_captcha::defense","Level struct that describes threshold-difficulty factor …",null,null],[3,"LevelBuilder","","Bulder struct for [Level] to describe …",null,null],[11,"visitor_threshold","","set visitor count for level",0,[[]]],[11,"difficulty_factor","","set difficulty factor for level. difficulty_factor can\'t …",0,[[],["captcharesult",6]]],[11,"build","","build Level struct",0,[[],[["captcharesult",6],["level",3]]]],[3,"Defense","","struct describes all the different [Level]s at which an …",null,null],[3,"DefenseBuilder","","Builder struct for [Defense]",null,null],[11,"add_level","","add a level to [Defense]",1,[[["level",3]],["captcharesult",6]]],[11,"build","","Build [Defense]",1,[[],[["defense",3],["captcharesult",6]]]],[11,"get_difficulty","","! Difficulty is calculated as: ! …",2,[[]]],[11,"tighten_up","","tighten up defense. Increases defense level by a factor …",2,[[]]],[11,"loosen_up","","Loosen up defense. Decreases defense level by a factor of …",2,[[]]],[11,"max_defense","","Set defense to maximum level",2,[[]]],[11,"min_defense","","Set defense to minimum level",2,[[]]],[11,"visitor_threshold","","Get current level\'s visitor threshold",2,[[]]],[0,"errors","m_captcha","Errors and Result module",null,null],[4,"CaptchaError","m_captcha::errors","Error datatype",null,null],[13,"LevelEmpty","","When configuring m_captcha, [DefenseBuilder][…",3,null],[13,"DifficultyFactorZero","","Visitor count must be a whole number(zero and above). …",3,null],[13,"SetDifficultyFactor","","Difficulty factor must be set",3,null],[13,"SetVisitorThreshold","","Visitor threshold must be set",3,null],[13,"DuplicateVisitorCount","","Visitor count must be Unique",3,null],[13,"DecreaseingDifficultyFactor","","Difficulty factor should increase with level",3,null],[13,"MailboxError","","Difficulty factor should increase with level",3,null],[13,"InsuffiencientDifficulty","","Happens when submitted work doesn\'t satisfy the required …",3,null],[13,"StringNotFound","","Happens when submitted work is computed over string that …",3,null],[6,"CaptchaResult","","[Result] datatype for m_captcha",null,null],[0,"master","m_captcha","[Master] actor module that manages [MCaptcha] actors",null,null],[3,"Master","m_captcha::master","This Actor manages the [MCaptcha] actors. A service can …",null,null],[11,"add_site","","add [MCaptcha] actor to [Master]",4,[[["addsite",3]]]],[11,"new","","create new master",4,[[]]],[11,"get_site","","get [MCaptcha] actor from [Master]",4,[[],[["addr",3],["option",4]]]],[3,"GetSite","","Message to get an [MCaptcha] actor from master",null,null],[12,"0","","",5,null],[3,"AddSite","","Message to add an [MCaptcha] actor to [Master]",null,null],[12,"id","","",6,null],[12,"addr","","",6,null],[3,"AddSiteBuilder","","Builder for AddSite.",null,null],[11,"id","","",7,[[["string",3]]]],[11,"addr","","",7,[[["addr",3],["mcaptcha",3]]]],[11,"build","","Builds a new AddSite.",7,[[],[["result",4],["string",3],["addsite",3]]]],[0,"mcaptcha","m_captcha","MCaptcha actor module that manages defense levels",null,null],[3,"MCaptcha","m_captcha::mcaptcha","This struct represents the mCaptcha state and is used to …",null,null],[3,"MCaptchaBuilder","","Builder for MCaptcha.",null,null],[11,"defense","","",8,[[["defense",3]]]],[11,"duration","","",8,[[]]],[11,"build","","Builds a new MCaptcha.",8,[[],[["string",3],["result",4],["mcaptcha",3]]]],[11,"add_visitor","","incerment visiotr count by one",9,[[]]],[11,"decrement_visiotr","","deccerment visiotr count by one",9,[[]]],[11,"get_difficulty","","get current difficulty factor",9,[[]]],[11,"get_duration","","get [MCaptcha]\'s lifetime",9,[[]]],[3,"Visitor","","Message to increment the visitor count returns difficulty …",null,null],[3,"VisitorResult","","Struct representing the return datatime of [Visitor] …",null,null],[12,"duration","","",10,null],[12,"difficulty_factor","","",10,null],[0,"cache","m_captcha","message datatypes to interact with [MCaptcha] actor Cache …",null,null],[0,"hashcache","m_captcha::cache","In-memory cache implementation that uses [HashMap]",null,null],[3,"HashCache","m_captcha::cache::hashcache","cache datastructure implementing [Save]",null,null],[0,"messages","m_captcha::cache","Messages that can be sent to cache data structures …",null,null],[3,"Cache","m_captcha::cache::messages","Message to cache PoW difficulty factor and string",null,null],[12,"string","","",11,null],[12,"difficulty_factor","","",11,null],[12,"duration","","",11,null],[3,"CacheBuilder","","Builder for Cache.",null,null],[11,"string","","",12,[[["string",3]]]],[11,"difficulty_factor","","",12,[[]]],[11,"duration","","",12,[[]]],[11,"build","","Builds a new Cache.",12,[[],[["result",4],["cache",3],["string",3]]]],[11,"new","","",11,[[["powconfig",3],["visitorresult",3]]]],[3,"Retrive","","Message to retrive the the difficulty factor for the …",null,null],[12,"0","","",13,null],[3,"DeleteString","","Message to delete cached PoW difficulty factor and string …",null,null],[12,"0","","",14,null],[8,"Save","m_captcha::cache","Describes actor handler trait impls that are required by …",null,null],[0,"pow","m_captcha","PoW datatypes used in client-server interaction",null,null],[3,"ConfigBuilder","m_captcha::pow","Builder for Config.",null,null],[3,"PoWConfig","","PoW requirement datatype that is be sent to clients for …",null,null],[12,"string","","",15,null],[12,"difficulty_factor","","",15,null],[11,"new","","create new instance of [PoWConfig]",15,[[]]],[3,"Work","","PoW datatype that clients send to server",null,null],[12,"string","","",16,null],[12,"result","","",16,null],[12,"nonce","","",16,null],[0,"system","m_captcha","module describing mCaptcha system",null,null],[3,"System","m_captcha::system","struct describing various bits of data required for an …",null,null],[12,"master","","",17,null],[3,"SystemBuilder","","Builder for System.",null,null],[11,"master","","",18,[[["addr",3],["master",3]]]],[11,"cache","","",18,[[["addr",3]]]],[11,"pow","","",18,[[["config",3]]]],[11,"build","","Builds a new System.",18,[[],[["system",3],["string",3],["result",4]]]],[11,"get_pow","","utility function to get difficulty factor of site id and …",17,[[["string",3]]]],[11,"verify_pow","","utility function to verify [Work]",17,[[["work",3]]]],[11,"from","m_captcha::defense","",19,[[]]],[11,"into","","",19,[[]]],[11,"to_owned","","",19,[[]]],[11,"clone_into","","",19,[[]]],[11,"borrow","","",19,[[]]],[11,"borrow_mut","","",19,[[]]],[11,"try_from","","",19,[[],["result",4]]],[11,"try_into","","",19,[[],["result",4]]],[11,"type_id","","",19,[[],["typeid",3]]],[11,"vzip","","",19,[[]]],[11,"from","","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"vzip","","",0,[[]]],[11,"from","","",2,[[]]],[11,"into","","",2,[[]]],[11,"to_owned","","",2,[[]]],[11,"clone_into","","",2,[[]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"vzip","","",2,[[]]],[11,"from","","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_owned","","",1,[[]]],[11,"clone_into","","",1,[[]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"vzip","","",1,[[]]],[11,"from","m_captcha::errors","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"to_string","","",3,[[],["string",3]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"vzip","","",3,[[]]],[11,"from","m_captcha::master","",4,[[]]],[11,"into","","",4,[[]]],[11,"to_owned","","",4,[[]]],[11,"clone_into","","",4,[[]]],[11,"borrow","","",4,[[]]],[11,"borrow_mut","","",4,[[]]],[11,"try_from","","",4,[[],["result",4]]],[11,"try_into","","",4,[[],["result",4]]],[11,"type_id","","",4,[[],["typeid",3]]],[11,"vzip","","",4,[[]]],[11,"from","","",5,[[]]],[11,"into","","",5,[[]]],[11,"borrow","","",5,[[]]],[11,"borrow_mut","","",5,[[]]],[11,"try_from","","",5,[[],["result",4]]],[11,"try_into","","",5,[[],["result",4]]],[11,"type_id","","",5,[[],["typeid",3]]],[11,"vzip","","",5,[[]]],[11,"from","","",6,[[]]],[11,"into","","",6,[[]]],[11,"borrow","","",6,[[]]],[11,"borrow_mut","","",6,[[]]],[11,"try_from","","",6,[[],["result",4]]],[11,"try_into","","",6,[[],["result",4]]],[11,"type_id","","",6,[[],["typeid",3]]],[11,"vzip","","",6,[[]]],[11,"from","","",7,[[]]],[11,"into","","",7,[[]]],[11,"to_owned","","",7,[[]]],[11,"clone_into","","",7,[[]]],[11,"borrow","","",7,[[]]],[11,"borrow_mut","","",7,[[]]],[11,"try_from","","",7,[[],["result",4]]],[11,"try_into","","",7,[[],["result",4]]],[11,"type_id","","",7,[[],["typeid",3]]],[11,"vzip","","",7,[[]]],[11,"from","m_captcha::mcaptcha","",9,[[]]],[11,"into","","",9,[[]]],[11,"to_owned","","",9,[[]]],[11,"clone_into","","",9,[[]]],[11,"borrow","","",9,[[]]],[11,"borrow_mut","","",9,[[]]],[11,"try_from","","",9,[[],["result",4]]],[11,"try_into","","",9,[[],["result",4]]],[11,"type_id","","",9,[[],["typeid",3]]],[11,"vzip","","",9,[[]]],[11,"from","","",8,[[]]],[11,"into","","",8,[[]]],[11,"to_owned","","",8,[[]]],[11,"clone_into","","",8,[[]]],[11,"borrow","","",8,[[]]],[11,"borrow_mut","","",8,[[]]],[11,"try_from","","",8,[[],["result",4]]],[11,"try_into","","",8,[[],["result",4]]],[11,"type_id","","",8,[[],["typeid",3]]],[11,"vzip","","",8,[[]]],[11,"from","","",20,[[]]],[11,"into","","",20,[[]]],[11,"borrow","","",20,[[]]],[11,"borrow_mut","","",20,[[]]],[11,"try_from","","",20,[[],["result",4]]],[11,"try_into","","",20,[[],["result",4]]],[11,"type_id","","",20,[[],["typeid",3]]],[11,"vzip","","",20,[[]]],[11,"from","","",10,[[]]],[11,"into","","",10,[[]]],[11,"borrow","","",10,[[]]],[11,"borrow_mut","","",10,[[]]],[11,"try_from","","",10,[[],["result",4]]],[11,"try_into","","",10,[[],["result",4]]],[11,"type_id","","",10,[[],["typeid",3]]],[11,"vzip","","",10,[[]]],[11,"from","m_captcha::cache::hashcache","",21,[[]]],[11,"into","","",21,[[]]],[11,"to_owned","","",21,[[]]],[11,"clone_into","","",21,[[]]],[11,"borrow","","",21,[[]]],[11,"borrow_mut","","",21,[[]]],[11,"try_from","","",21,[[],["result",4]]],[11,"try_into","","",21,[[],["result",4]]],[11,"type_id","","",21,[[],["typeid",3]]],[11,"vzip","","",21,[[]]],[11,"from","m_captcha::cache::messages","",11,[[]]],[11,"into","","",11,[[]]],[11,"borrow","","",11,[[]]],[11,"borrow_mut","","",11,[[]]],[11,"try_from","","",11,[[],["result",4]]],[11,"try_into","","",11,[[],["result",4]]],[11,"type_id","","",11,[[],["typeid",3]]],[11,"vzip","","",11,[[]]],[11,"from","","",12,[[]]],[11,"into","","",12,[[]]],[11,"to_owned","","",12,[[]]],[11,"clone_into","","",12,[[]]],[11,"borrow","","",12,[[]]],[11,"borrow_mut","","",12,[[]]],[11,"try_from","","",12,[[],["result",4]]],[11,"try_into","","",12,[[],["result",4]]],[11,"type_id","","",12,[[],["typeid",3]]],[11,"vzip","","",12,[[]]],[11,"from","","",13,[[]]],[11,"into","","",13,[[]]],[11,"borrow","","",13,[[]]],[11,"borrow_mut","","",13,[[]]],[11,"try_from","","",13,[[],["result",4]]],[11,"try_into","","",13,[[],["result",4]]],[11,"type_id","","",13,[[],["typeid",3]]],[11,"vzip","","",13,[[]]],[11,"from","","",14,[[]]],[11,"into","","",14,[[]]],[11,"borrow","","",14,[[]]],[11,"borrow_mut","","",14,[[]]],[11,"try_from","","",14,[[],["result",4]]],[11,"try_into","","",14,[[],["result",4]]],[11,"type_id","","",14,[[],["typeid",3]]],[11,"vzip","","",14,[[]]],[11,"from","m_captcha::pow","",22,[[]]],[11,"into","","",22,[[]]],[11,"to_owned","","",22,[[]]],[11,"clone_into","","",22,[[]]],[11,"borrow","","",22,[[]]],[11,"borrow_mut","","",22,[[]]],[11,"try_from","","",22,[[],["result",4]]],[11,"try_into","","",22,[[],["result",4]]],[11,"type_id","","",22,[[],["typeid",3]]],[11,"vzip","","",22,[[]]],[11,"from","","",15,[[]]],[11,"into","","",15,[[]]],[11,"to_owned","","",15,[[]]],[11,"clone_into","","",15,[[]]],[11,"borrow","","",15,[[]]],[11,"borrow_mut","","",15,[[]]],[11,"try_from","","",15,[[],["result",4]]],[11,"try_into","","",15,[[],["result",4]]],[11,"type_id","","",15,[[],["typeid",3]]],[11,"vzip","","",15,[[]]],[11,"from","","",16,[[]]],[11,"into","","",16,[[]]],[11,"to_owned","","",16,[[]]],[11,"clone_into","","",16,[[]]],[11,"borrow","","",16,[[]]],[11,"borrow_mut","","",16,[[]]],[11,"try_from","","",16,[[],["result",4]]],[11,"try_into","","",16,[[],["result",4]]],[11,"type_id","","",16,[[],["typeid",3]]],[11,"vzip","","",16,[[]]],[11,"from","m_captcha::system","",17,[[]]],[11,"into","","",17,[[]]],[11,"to_owned","","",17,[[]]],[11,"clone_into","","",17,[[]]],[11,"borrow","","",17,[[]]],[11,"borrow_mut","","",17,[[]]],[11,"try_from","","",17,[[],["result",4]]],[11,"try_into","","",17,[[],["result",4]]],[11,"type_id","","",17,[[],["typeid",3]]],[11,"vzip","","",17,[[]]],[11,"from","","",18,[[]]],[11,"into","","",18,[[]]],[11,"to_owned","","",18,[[]]],[11,"clone_into","","",18,[[]]],[11,"borrow","","",18,[[]]],[11,"borrow_mut","","",18,[[]]],[11,"try_from","","",18,[[],["result",4]]],[11,"try_into","","",18,[[],["result",4]]],[11,"type_id","","",18,[[],["typeid",3]]],[11,"vzip","","",18,[[]]],[11,"default","m_captcha::pow","",22,[[],["configbuilder",3]]],[11,"clone","","",22,[[],["configbuilder",3]]],[11,"clone","m_captcha::defense","",19,[[],["level",3]]],[11,"clone","","",0,[[],["levelbuilder",3]]],[11,"clone","","",2,[[],["defense",3]]],[11,"clone","","",1,[[],["defensebuilder",3]]],[11,"clone","m_captcha::errors","",3,[[],["captchaerror",4]]],[11,"clone","m_captcha::master","",4,[[],["master",3]]],[11,"clone","","",7,[[],["addsitebuilder",3]]],[11,"clone","m_captcha::mcaptcha","",9,[[],["mcaptcha",3]]],[11,"clone","","",8,[[],["mcaptchabuilder",3]]],[11,"clone","m_captcha::cache::hashcache","",21,[[],["hashcache",3]]],[11,"clone","m_captcha::cache::messages","",12,[[],["cachebuilder",3]]],[11,"clone","m_captcha::pow","",15,[[],["powconfig",3]]],[11,"clone","","",16,[[],["work",3]]],[11,"clone","m_captcha::system","",17,[[],["system",3]]],[11,"clone","","",18,[[],["systembuilder",3]]],[11,"default","m_captcha::defense","",0,[[]]],[11,"default","","",1,[[]]],[11,"default","m_captcha::master","",7,[[],["addsitebuilder",3]]],[11,"default","m_captcha::mcaptcha","",8,[[],["mcaptchabuilder",3]]],[11,"default","m_captcha::cache::hashcache","",21,[[],["hashcache",3]]],[11,"default","m_captcha::cache::messages","",12,[[],["cachebuilder",3]]],[11,"default","m_captcha::system","",18,[[],["systembuilder",3]]],[11,"eq","m_captcha::defense","",19,[[["level",3]]]],[11,"ne","","",19,[[["level",3]]]],[11,"eq","","",0,[[["levelbuilder",3]]]],[11,"ne","","",0,[[["levelbuilder",3]]]],[11,"eq","","",2,[[["defense",3]]]],[11,"ne","","",2,[[["defense",3]]]],[11,"eq","","",1,[[["defensebuilder",3]]]],[11,"ne","","",1,[[["defensebuilder",3]]]],[11,"eq","m_captcha::errors","",3,[[["captchaerror",4]]]],[11,"fmt","m_captcha::defense","",19,[[["formatter",3]],["result",6]]],[11,"fmt","","",0,[[["formatter",3]],["result",6]]],[11,"fmt","","",2,[[["formatter",3]],["result",6]]],[11,"fmt","","",1,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::errors","",3,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::mcaptcha","",9,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::pow","",15,[[["formatter",3]],["result",6]]],[11,"fmt","","",16,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::errors","",3,[[["formatter",3]],["result",6]]],[11,"handle","m_captcha::master","",4,[[["getsite",3]]]],[11,"handle","","",4,[[["addsite",3]]]],[11,"handle","m_captcha::mcaptcha","",9,[[["visitor",3]]]],[11,"handle","m_captcha::cache::hashcache","",21,[[["cache",3]]]],[11,"handle","","",21,[[["deletestring",3]]]],[11,"handle","","",21,[[["retrive",3]]]],[11,"serialize","m_captcha::pow","",15,[[],["result",4]]],[11,"serialize","","",16,[[],["result",4]]],[11,"salt","","",22,[[["string",3]],["configbuilder",3]]],[11,"build","","Builds a new Config.",22,[[],[["result",4],["config",3],["string",3]]]]],"p":[[3,"LevelBuilder"],[3,"DefenseBuilder"],[3,"Defense"],[4,"CaptchaError"],[3,"Master"],[3,"GetSite"],[3,"AddSite"],[3,"AddSiteBuilder"],[3,"MCaptchaBuilder"],[3,"MCaptcha"],[3,"VisitorResult"],[3,"Cache"],[3,"CacheBuilder"],[3,"Retrive"],[3,"DeleteString"],[3,"PoWConfig"],[3,"Work"],[3,"System"],[3,"SystemBuilder"],[3,"Level"],[3,"Visitor"],[3,"HashCache"],[3,"ConfigBuilder"]]}\ +}'); +addSearchOptions(searchIndex);initSearch(searchIndex); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/settings.css b/api-docs/m_captcha/0.1.0/settings.css new file mode 100644 index 0000000..6709865 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/settings.css @@ -0,0 +1 @@ +.setting-line{padding:5px;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.select-wrapper{float:right;position:relative;height:27px;min-width:25%;}.select-wrapper select{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:2px solid #ccc;padding-right:28px;width:100%;}.select-wrapper img{pointer-events:none;position:absolute;right:0;bottom:0;background:#ccc;height:100%;width:28px;padding:0px 4px;}.select-wrapper select option{color:initial;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/settings.html b/api-docs/m_captcha/0.1.0/settings.html new file mode 100644 index 0000000..1762d2c --- /dev/null +++ b/api-docs/m_captcha/0.1.0/settings.html @@ -0,0 +1,6 @@ +Rustdoc settings + +

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
+
Auto-hide item declarations
Auto-hide structs declaration
Auto-hide enums declaration
Auto-hide unions declaration
Auto-hide traits declaration
Auto-hide macros declaration
+
Auto-hide item attributes.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Auto-hide implementors of a trait
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/settings.js b/api-docs/m_captcha/0.1.0/settings.js new file mode 100644 index 0000000..b4d6fdc --- /dev/null +++ b/api-docs/m_captcha/0.1.0/settings.js @@ -0,0 +1 @@ +(function(){function changeSetting(settingName,value){updateLocalStorage("rustdoc-"+settingName,value);switch(settingName){case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function setEvents(){onEachLazy(document.getElementsByClassName("slider"),function(elem){var toggle=elem.previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(document.getElementsByClassName("select-wrapper"),function(elem){var select=elem.getElementsByTagName("select")[0];var settingId=select.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}})}window.addEventListener("DOMContentLoaded",setEvents)})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/source-files.js b/api-docs/m_captcha/0.1.0/source-files.js new file mode 100644 index 0000000..96e9b69 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/source-files.js @@ -0,0 +1,3 @@ +var N = null;var sourcesIndex = {}; +sourcesIndex["m_captcha"] = {"name":"","dirs":[{"name":"cache","files":["hashcache.rs","mod.rs"]}],"files":["defense.rs","errors.rs","lib.rs","master.rs","mcaptcha.rs","pow.rs","system.rs","utils.rs"]}; +createSourceSidebar(); diff --git a/api-docs/m_captcha/0.1.0/source-script.js b/api-docs/m_captcha/0.1.0/source-script.js new file mode 100644 index 0000000..de663ca --- /dev/null +++ b/api-docs/m_captcha/0.1.0/source-script.js @@ -0,0 +1 @@ +function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0;i"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(window.rootPath.endsWith("/")===false){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/src/m_captcha/cache/hashcache.rs.html b/api-docs/m_captcha/0.1.0/src/m_captcha/cache/hashcache.rs.html new file mode 100644 index 0000000..034fc96 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/src/m_captcha/cache/hashcache.rs.html @@ -0,0 +1,276 @@ +hashcache.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! In-memory cache implementation that uses [HashMap]
+use std::collections::HashMap;
+
+use actix::prelude::*;
+
+use super::messages::*;
+use super::Save;
+use crate::errors::*;
+
+#[derive(Clone, Default)]
+/// cache datastructure implementing [Save]
+pub struct HashCache(HashMap<String, u32>);
+
+impl HashCache {
+    // save [PoWConfig] to cache
+    fn save(&mut self, config: Cache) -> CaptchaResult<()> {
+        self.0.insert(config.string, config.difficulty_factor);
+        Ok(())
+    }
+
+    // retrive [PoWConfig] from cache. Deletes config post retrival
+    fn retrive(&mut self, string: String) -> CaptchaResult<Option<u32>> {
+        if let Some(difficulty_factor) = self.remove(&string) {
+            Ok(Some(difficulty_factor.to_owned()))
+        } else {
+            Ok(None)
+        }
+    }
+
+    // delete [PoWConfig] from cache
+    fn remove(&mut self, string: &str) -> Option<u32> {
+        self.0.remove(string)
+    }
+}
+
+impl Save for HashCache {}
+
+impl Actor for HashCache {
+    type Context = Context<Self>;
+}
+
+/// cache a PoWConfig
+impl Handler<Cache> for HashCache {
+    type Result = MessageResult<Cache>;
+    fn handle(&mut self, msg: Cache, ctx: &mut Self::Context) -> Self::Result {
+        use actix::clock::delay_for;
+        use std::time::Duration;
+
+        let addr = ctx.address();
+        let del_msg = DeleteString(msg.string.clone());
+
+        let duration: Duration = Duration::new(msg.duration.clone(), 0);
+        let wait_for = async move {
+            delay_for(duration).await;
+            addr.send(del_msg).await.unwrap().unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(wait_for);
+
+        MessageResult(self.save(msg))
+    }
+}
+
+/// Delte a PoWConfig
+impl Handler<DeleteString> for HashCache {
+    type Result = MessageResult<DeleteString>;
+    fn handle(&mut self, msg: DeleteString, _ctx: &mut Self::Context) -> Self::Result {
+        self.remove(&msg.0);
+        MessageResult(Ok(()))
+    }
+}
+
+/// Retrive PoW difficulty_factor for a PoW string
+impl Handler<Retrive> for HashCache {
+    type Result = MessageResult<Retrive>;
+    fn handle(&mut self, msg: Retrive, _ctx: &mut Self::Context) -> Self::Result {
+        MessageResult(self.retrive(msg.0))
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::mcaptcha::VisitorResult;
+    use crate::pow::PoWConfig;
+
+    async fn sleep(time: u64) {
+        use actix::clock::delay_for;
+        use std::time::Duration;
+
+        let duration: Duration = Duration::new(time, 0);
+        delay_for(duration).await;
+    }
+
+    #[actix_rt::test]
+    async fn hashcache_works() {
+        const DIFFICULTY_FACTOR: u32 = 54;
+        const DURATION: u64 = 5;
+        let addr = HashCache::default().start();
+        let pow: PoWConfig = PoWConfig::new(DIFFICULTY_FACTOR);
+        let visitor_result = VisitorResult {
+            difficulty_factor: DIFFICULTY_FACTOR,
+            duration: DURATION,
+        };
+        let string = pow.string.clone();
+        let msg = Cache::new(&pow, &visitor_result);
+
+        addr.send(msg).await.unwrap().unwrap();
+
+        let cache_difficulty_factor = addr.send(Retrive(string.clone())).await.unwrap().unwrap();
+        assert_eq!(DIFFICULTY_FACTOR, cache_difficulty_factor.unwrap());
+
+        sleep(DURATION + DURATION).await;
+
+        let expired_string = addr.send(Retrive(string)).await.unwrap().unwrap();
+        assert_eq!(None, expired_string);
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/src/m_captcha/cache/mod.rs.html b/api-docs/m_captcha/0.1.0/src/m_captcha/cache/mod.rs.html new file mode 100644 index 0000000..b770f75 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/src/m_captcha/cache/mod.rs.html @@ -0,0 +1,146 @@ +mod.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! Cache is used to save proofof work details and nonces to prevent replay attacks
+//! and rainbow/dictionary attacks
+pub use hashcache::HashCache;
+use messages::*;
+
+pub mod hashcache;
+
+/// Describes actor handler trait impls that are required by a cache implementation
+pub trait Save:
+    actix::Actor + actix::Handler<Retrive> + actix::Handler<Cache> + actix::Handler<DeleteString>
+{
+}
+pub mod messages {
+    //! Messages that can be sent to cache data structures implementing [Save][super::Save]
+    use actix::dev::*;
+    use derive_builder::Builder;
+
+    use crate::errors::*;
+    use crate::mcaptcha::VisitorResult;
+    use crate::pow::PoWConfig;
+
+    /// Message to cache PoW difficulty factor and string
+    #[derive(Message, Builder)]
+    #[rtype(result = "CaptchaResult<()>")]
+    pub struct Cache {
+        pub string: String,
+        pub difficulty_factor: u32,
+        pub duration: u64,
+    }
+
+    impl Cache {
+        pub fn new(p: &PoWConfig, v: &VisitorResult) -> Self {
+            CacheBuilder::default()
+                .string(p.string.clone())
+                .difficulty_factor(v.difficulty_factor)
+                .duration(v.duration)
+                .build()
+                .unwrap()
+        }
+    }
+
+    /// Message to retrive the the difficulty factor for the specified
+    /// string from the cache
+    #[derive(Message)]
+    #[rtype(result = "CaptchaResult<Option<u32>>")]
+    pub struct Retrive(pub String);
+
+    /// Message to delete cached PoW difficulty factor and string
+    /// when they expire
+    #[derive(Message)]
+    #[rtype(result = "CaptchaResult<()>")]
+    pub struct DeleteString(pub String);
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/src/m_captcha/defense.rs.html b/api-docs/m_captcha/0.1.0/src/m_captcha/defense.rs.html new file mode 100644 index 0000000..07d9e4a --- /dev/null +++ b/api-docs/m_captcha/0.1.0/src/m_captcha/defense.rs.html @@ -0,0 +1,838 @@ +defense.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+//! Defense datatypes
+//! ```rust
+//! use m_captcha::{LevelBuilder, DefenseBuilder};
+//! DefenseBuilder::default()
+//!        .add_level(
+//!            LevelBuilder::default()
+//!                .visitor_threshold(50)
+//!                .difficulty_factor(50)
+//!                .unwrap()
+//!                .build()
+//!                .unwrap(),
+//!        )
+//!        .unwrap()
+//!        .add_level(
+//!            LevelBuilder::default()
+//!                .visitor_threshold(500)
+//!                .difficulty_factor(500)
+//!                .unwrap()
+//!                .build()
+//!                .unwrap(),
+//!        )
+//!        .unwrap()
+//!        .build()
+//!        .unwrap();
+//! ```
+
+use crate::errors::*;
+
+/// Level struct that describes threshold-difficulty factor mapping
+#[derive(Debug, Copy, Clone, PartialEq)]
+pub struct Level {
+    visitor_threshold: u32,
+    difficulty_factor: u32,
+}
+
+/// Bulder struct for [Level] to describe threshold-difficulty factor mapping
+#[derive(Debug, Copy, Clone, PartialEq)]
+pub struct LevelBuilder {
+    visitor_threshold: Option<u32>,
+    difficulty_factor: Option<u32>,
+}
+
+impl Default for LevelBuilder {
+    fn default() -> Self {
+        LevelBuilder {
+            visitor_threshold: None,
+            difficulty_factor: None,
+        }
+    }
+}
+
+impl LevelBuilder {
+    /// set visitor count for level
+    pub fn visitor_threshold(&mut self, visitor_threshold: u32) -> &mut Self {
+        self.visitor_threshold = Some(visitor_threshold);
+        self
+    }
+
+    /// set difficulty factor for level. difficulty_factor can't be zero because
+    /// Difficulty is calculated as:
+    /// ```no_run
+    /// let difficulty_factor = 500;
+    /// let difficulty = u128::max_value() - u128::max_value() / difficulty_factor;
+    /// ```
+    /// the higher the `difficulty_factor`, the higher the difficulty.
+    pub fn difficulty_factor(&mut self, difficulty_factor: u32) -> CaptchaResult<&mut Self> {
+        if difficulty_factor > 0 {
+            self.difficulty_factor = Some(difficulty_factor);
+            Ok(self)
+        } else {
+            Err(CaptchaError::DifficultyFactorZero)
+        }
+    }
+
+    /// build Level struct
+    pub fn build(&mut self) -> CaptchaResult<Level> {
+        if self.visitor_threshold.is_none() {
+            Err(CaptchaError::SetVisitorThreshold)
+        } else if self.difficulty_factor.is_none() {
+            Err(CaptchaError::SetDifficultyFactor)
+        } else {
+            Ok(Level {
+                difficulty_factor: self.difficulty_factor.unwrap(),
+                visitor_threshold: self.visitor_threshold.unwrap(),
+            })
+        }
+    }
+}
+
+/// struct describes all the different [Level]s at which an mCaptcha system operates
+#[derive(Debug, Clone, PartialEq)]
+pub struct Defense {
+    levels: Vec<Level>,
+    // index of current visitor threshold
+    current_visitor_threshold: usize,
+}
+
+/// Builder struct for [Defense]
+#[derive(Debug, Clone, PartialEq)]
+pub struct DefenseBuilder {
+    levels: Vec<Level>,
+}
+
+impl Default for DefenseBuilder {
+    fn default() -> Self {
+        DefenseBuilder { levels: vec![] }
+    }
+}
+
+impl DefenseBuilder {
+    /// add a level to [Defense]
+    pub fn add_level(&mut self, level: Level) -> CaptchaResult<&mut Self> {
+        for i in self.levels.iter() {
+            if i.visitor_threshold == level.visitor_threshold {
+                return Err(CaptchaError::DuplicateVisitorCount);
+            }
+        }
+        self.levels.push(level);
+        Ok(self)
+    }
+
+    /// Build [Defense]
+    pub fn build(&mut self) -> CaptchaResult<Defense> {
+        if !self.levels.is_empty() {
+            // sort levels to arrange in ascending order
+            self.levels.sort_by_key(|a| a.visitor_threshold);
+
+            for level in self.levels.iter() {
+                if level.difficulty_factor == 0 {
+                    return Err(CaptchaError::DifficultyFactorZero);
+                }
+            }
+
+            // as visitor count increases, difficulty_factor too should increse
+            // if it decreses, an error must be thrown
+            for i in 0..self.levels.len() - 1 {
+                if self.levels[i].difficulty_factor > self.levels[i + 1].difficulty_factor {
+                    return Err(CaptchaError::DecreaseingDifficultyFactor);
+                }
+            }
+
+            Ok(Defense {
+                levels: self.levels.to_owned(),
+                current_visitor_threshold: 0,
+            })
+        } else {
+            Err(CaptchaError::LevelEmpty)
+        }
+    }
+}
+
+impl Defense {
+    ///! Difficulty is calculated as:
+    ///! ```rust
+    ///! let difficulty = u128::max_value() - u128::max_value() / difficulty_factor;
+    ///! ```
+    ///! The higher the `difficulty_factor`, the higher the difficulty.
+
+    /// Get difficulty factor of current level of defense
+    pub fn get_difficulty(&self) -> u32 {
+        self.levels[self.current_visitor_threshold].difficulty_factor
+    }
+
+    /// tighten up defense. Increases defense level by a factor of one.
+    /// When defense is at max level, calling this method will have no effect
+    pub fn tighten_up(&mut self) {
+        if self.current_visitor_threshold != self.levels.len() - 1 {
+            self.current_visitor_threshold += 1;
+        }
+    }
+    /// Loosen up defense. Decreases defense level by a factor of one.
+    /// When defense is at the lowest level, calling this method will have no effect.
+    pub fn loosen_up(&mut self) {
+        if self.current_visitor_threshold != 0 {
+            self.current_visitor_threshold -= 1;
+        }
+    }
+
+    /// Set defense to maximum level
+    pub fn max_defense(&mut self) {
+        self.current_visitor_threshold = self.levels.len() - 1;
+    }
+
+    /// Set defense to minimum level
+    pub fn min_defense(&mut self) {
+        self.current_visitor_threshold = 0;
+    }
+
+    /// Get current level's  visitor threshold
+    pub fn visitor_threshold(&self) -> u32 {
+        self.levels[self.current_visitor_threshold].visitor_threshold
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn level_builder_works() {
+        let level = LevelBuilder::default()
+            .difficulty_factor(1)
+            .unwrap()
+            .visitor_threshold(0)
+            .build()
+            .unwrap();
+
+        assert_eq!(level.visitor_threshold, 0);
+        assert_eq!(level.difficulty_factor, 1);
+
+        assert_eq!(
+            LevelBuilder::default().difficulty_factor(0),
+            Err(CaptchaError::DifficultyFactorZero)
+        );
+
+        assert_eq!(
+            LevelBuilder::default()
+                .difficulty_factor(1)
+                .unwrap()
+                .build(),
+            Err(CaptchaError::SetVisitorThreshold)
+        );
+        assert_eq!(
+            LevelBuilder::default().visitor_threshold(10).build(),
+            Err(CaptchaError::SetDifficultyFactor)
+        );
+    }
+
+    #[test]
+    fn defense_builder_duplicate_visitor_threshold() {
+        let mut defense_builder = DefenseBuilder::default();
+        let err = defense_builder
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            );
+        assert_eq!(err, Err(CaptchaError::DuplicateVisitorCount));
+    }
+
+    #[test]
+    fn defense_builder_decreasing_difficulty_factor() {
+        let mut defense_builder = DefenseBuilder::default();
+        let err = defense_builder
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(500)
+                    .difficulty_factor(10)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .build();
+        assert_eq!(err, Err(CaptchaError::DecreaseingDifficultyFactor));
+    }
+
+    fn get_defense() -> Defense {
+        DefenseBuilder::default()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(500)
+                    .difficulty_factor(5000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(5000)
+                    .difficulty_factor(50000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50000)
+                    .difficulty_factor(500000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(500000)
+                    .difficulty_factor(5000000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .build()
+            .unwrap()
+    }
+    #[test]
+    fn defense_builder_works() {
+        let defense = get_defense();
+
+        assert_eq!(defense.levels[0].difficulty_factor, 50);
+        assert_eq!(defense.levels[1].difficulty_factor, 5000);
+        assert_eq!(defense.levels[2].difficulty_factor, 50_000);
+        assert_eq!(defense.levels[3].difficulty_factor, 500_000);
+        assert_eq!(defense.levels[4].difficulty_factor, 5_000_000);
+    }
+
+    #[test]
+    fn tighten_up_works() {
+        let mut defense = get_defense();
+
+        assert_eq!(defense.get_difficulty(), 50);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 5_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 50_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 500_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+    }
+
+    #[test]
+    fn max_defense_works() {
+        let mut defense = get_defense();
+        defense.max_defense();
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+    }
+
+    #[test]
+    fn minimum_defense_works() {
+        let mut defense = get_defense();
+        defense.min_defense();
+        assert_eq!(defense.get_difficulty(), 50);
+    }
+
+    #[test]
+    fn loosen_up_works() {
+        let mut defense = get_defense();
+        defense.max_defense();
+
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 500_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 50_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 5_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 50);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 50);
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/src/m_captcha/errors.rs.html b/api-docs/m_captcha/0.1.0/src/m_captcha/errors.rs.html new file mode 100644 index 0000000..677831a --- /dev/null +++ b/api-docs/m_captcha/0.1.0/src/m_captcha/errors.rs.html @@ -0,0 +1,144 @@ +errors.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+//! Errors and Result module
+use derive_more::{Display, Error};
+
+/// Error datatype
+#[derive(Debug, PartialEq, Display, Clone, Error)]
+#[cfg(not(tarpaulin_include))]
+pub enum CaptchaError {
+    /// When configuring m_captcha, [DefenseBuilder][crate::defense::DefenseBuilder]
+    /// must be passed atleast one `LevelConfig` if not this error will arise
+    #[display(fmt = "LevelBuilder should have atleaset one level configured")]
+    LevelEmpty,
+
+    /// Visitor count must be a whole number(zero and above).
+    /// When configuring m_captcha, [LevelBuilder][crate::defense::LevelBuilder].
+    /// difficulty_factor must be set to greater than zero.
+    #[display(fmt = "difficulty factor must be greater than zero")]
+    DifficultyFactorZero,
+
+    /// Difficulty factor must be set
+    #[display(fmt = "Set difficulty factor")]
+    SetDifficultyFactor,
+
+    /// Visitor threshold must be set
+    #[display(fmt = "Set visitor threshold")]
+    SetVisitorThreshold,
+
+    /// Visitor count must be Unique
+    #[display(fmt = "Duplicate visitor count")]
+    DuplicateVisitorCount,
+
+    /// Difficulty factor should increase with level
+    #[display(fmt = "Difficulty factor should increase with level")]
+    DecreaseingDifficultyFactor,
+
+    /// Difficulty factor should increase with level
+    #[display(fmt = "Actor mailbox error")]
+    MailboxError,
+
+    /// Happens when submitted work doesn't satisfy the required
+    /// difficulty factor
+    #[display(fmt = "Insuffiencient Difficulty")]
+    InsuffiencientDifficulty,
+
+    /// Happens when submitted work is computed over string that
+    /// isn't in cache
+    #[display(fmt = "String now found")]
+    StringNotFound,
+}
+
+/// [Result] datatype for m_captcha
+pub type CaptchaResult<V> = std::result::Result<V, CaptchaError>;
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/src/m_captcha/lib.rs.html b/api-docs/m_captcha/0.1.0/src/m_captcha/lib.rs.html new file mode 100644 index 0000000..741474e --- /dev/null +++ b/api-docs/m_captcha/0.1.0/src/m_captcha/lib.rs.html @@ -0,0 +1,362 @@ +lib.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! mCaptcha is a proof of work based Denaial-of-Service attack protection system.
+//! This is is a server library that you can embed in your services to protect your
+//! servers.
+//!
+//! A commercial managed solution is in the works but I'd much rather prefer
+//! folks host their own instances as it will make the more decentralized and free.
+//!
+//! In mCaptcha, defense is adjusted in discrete levels that depend on the
+//! ammount of traffic that a service is experiencing. So users of this library are
+//! requested to benchmark their target machines before configuring their mCaptcha
+//! component.
+//!
+//! ## Terminology:
+//! - Difficulty(Factor): Minimum ammount of work that a client must do to make a valid
+//! request.
+//! - [Defense]: A datatype that various visitor-difficulty mappigns
+//! - [Visitor][crate::mcaptcha::Visitor]: Smallest unit of traffic, usually a single request. The more you have, the busier
+//! your service is. Determines mCaptcha defense defense
+//! - Visitor threshold: The threshold at which [MCaptcha] will adjust defense defense
+//! - [Cache][crate::cache] : A datatype that implements [Save][crate::cache::Save]. Used to store
+//! PoW requirements to defend against replay attacks and dictionary attacks.
+//! - [Master][crate::master::Master]: A datatype that manages [MCaptcha][crate::mcaptcha::MCaptcha] actors. Works like a DNS for [Visitor][crate::mcaptcha::Visitor] messages.
+//! - [System][crate::system::System]: mCaptcha system that manages cache, master and provides
+//! useful abstractions. An mCaptcha system/instance can have only a single
+//! [System][crate::system::System]
+//!
+//! ## Example:
+//!
+//! ```rust
+//! use m_captcha::{
+//!     cache::HashCache,
+//!     master::{AddSiteBuilder, Master},
+//!     pow::{ConfigBuilder, Work},
+//!     system::SystemBuilder,
+//!     DefenseBuilder, LevelBuilder, MCaptchaBuilder,
+//! };
+//! // traits from actix needs to be in scope for starting actor
+//! use actix::prelude::*;
+//!
+//! #[actix_rt::main]
+//! async fn main() -> std::io::Result<()> {
+//!     // start cahce actor
+//!     // cache is used to store PoW requirements that are sent to clients
+//!     // This way, it can be verified that the client computed work over a config
+//!     // that _we_ sent. Offers protection against rainbow tables powered dictionary attacks
+//!     let cache = HashCache::default().start();
+//!
+//!     // create PoW config with unique salt. Salt has to be safely guarded.
+//!     // salts protect us from replay attacks
+//!     let pow = ConfigBuilder::default()
+//!         .salt("myrandomsaltisnotlongenoug".into())
+//!         .build()
+//!         .unwrap();
+//!
+//!     // start master actor. Master actor is responsible for managing MCaptcha actors
+//!     // each mCaptcha system should have only one master
+//!     let master = Master::new().start();
+//!
+//!     // Create system. System encapsulates master and cache and provides useful abstraction
+//!     // each mCaptcha system should have only one system
+//!     let system = SystemBuilder::default()
+//!         .master(master)
+//!         .cache(cache)
+//!         .pow(pow.clone())
+//!         .build()
+//!         .unwrap();
+//!
+//!     // configure defense. This is a per site configuration. A site can have several levels
+//!     // of defenses configured
+//!     let defense = DefenseBuilder::default()
+//!         // add as many defense as you see fit
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 // visitor_threshold is the threshold/limit at which
+//!                 // mCaptcha will adjust difficulty defense
+//!                 // it is advisable to set small values for the first
+//!                 // defense visitor_threshold and difficulty_factor
+//!                 // as this will be the work that clients will be
+//!                 // computing when there's no load
+//!                 .visitor_threshold(50)
+//!                 .difficulty_factor(500)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 .visitor_threshold(5000)
+//!                 .difficulty_factor(50000)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .build()
+//!         .unwrap();
+//!
+//!     // create and start MCaptcha actor that uses the above defense configuration
+//!     // This is what manages the difficulty factor of sites that an mCaptcha protects
+//!     let mcaptcha = MCaptchaBuilder::default()
+//!         .defense(defense)
+//!         // leaky bucket algorithm's emission interval
+//!         .duration(30)
+//!         //   .cache(cache)
+//!         .build()
+//!         .unwrap()
+//!         .start();
+//!
+//!     // unique value identifying an MCaptcha actor
+//!     let mcaptcha_name = "batsense.net";
+//!
+//!     // add MCaptcha to Master
+//!     let msg = AddSiteBuilder::default()
+//!         .id(mcaptcha_name.into())
+//!         .addr(mcaptcha.clone())
+//!         .build()
+//!         .unwrap();
+//!     system.master.send(msg).await.unwrap();
+//!
+//!     // Get PoW config. Should be called everytime there's a visitor for a
+//!     // managed site(here mcaptcha_name)
+//!     let work_req = system.get_pow(mcaptcha_name.into()).await.unwrap();
+//!
+//!     // the following computation should be done on the client but for the purpose
+//!     // of this illustration, we are going to do it on the server it self
+//!     let work = pow
+//!         .prove_work(&work_req.string, work_req.difficulty_factor)
+//!         .unwrap();
+//!
+//!     // the payload that the client sends to the server
+//!     let payload = Work {
+//!         string: work_req.string,
+//!         result: work.result,
+//!         nonce: work.nonce,
+//!     };
+//!
+//!     // Server evaluates client's work. Returns true if everything
+//!     // checksout and Err() if something fishy is happening
+//!     let res = system.verify_pow(payload.clone()).await.unwrap();
+//!     assert!(res);
+//!
+//!     Ok(())
+//! }
+//! ```
+
+pub mod defense;
+pub mod errors;
+pub mod master;
+pub mod mcaptcha;
+
+/// message datatypes to interact with [MCaptcha] actor
+pub mod cache;
+pub mod pow;
+pub mod system;
+mod utils;
+
+pub use crate::cache::hashcache::HashCache;
+
+pub use defense::{Defense, DefenseBuilder, LevelBuilder};
+pub use mcaptcha::{MCaptcha, MCaptchaBuilder};
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/src/m_captcha/master.rs.html b/api-docs/m_captcha/0.1.0/src/m_captcha/master.rs.html new file mode 100644 index 0000000..cb9f0fb --- /dev/null +++ b/api-docs/m_captcha/0.1.0/src/m_captcha/master.rs.html @@ -0,0 +1,238 @@ +master.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! [Master] actor module that manages [MCaptcha] actors
+use std::collections::BTreeMap;
+
+use actix::dev::*;
+use derive_builder::Builder;
+
+use crate::mcaptcha::MCaptcha;
+
+/// This Actor manages the [MCaptcha] actors.
+/// A service can have several [MCaptcha] actors with
+/// varying [Defense][crate::defense::Defense] configurations
+/// so a "master" actor is needed to manage them all
+#[derive(Clone)]
+pub struct Master {
+    sites: BTreeMap<String, Addr<MCaptcha>>,
+}
+
+impl Master {
+    /// add [MCaptcha] actor to [Master]
+    pub fn add_site(&mut self, details: AddSite) {
+        self.sites.insert(details.id, details.addr.to_owned());
+    }
+
+    /// create new master
+    pub fn new() -> Self {
+        Master {
+            sites: BTreeMap::new(),
+        }
+    }
+
+    /// get [MCaptcha] actor from [Master]
+    pub fn get_site<'a, 'b>(&'a self, id: &'b str) -> Option<&'a Addr<MCaptcha>> {
+        self.sites.get(id)
+    }
+}
+
+impl Actor for Master {
+    type Context = Context<Self>;
+}
+
+/// Message to get an [MCaptcha] actor from master
+#[derive(Message)]
+#[rtype(result = "Option<Addr<MCaptcha>>")]
+pub struct GetSite(pub String);
+
+impl Handler<GetSite> for Master {
+    type Result = MessageResult<GetSite>;
+
+    fn handle(&mut self, m: GetSite, _ctx: &mut Self::Context) -> Self::Result {
+        let addr = self.get_site(&m.0);
+        if addr.is_none() {
+            return MessageResult(None);
+        } else {
+            return MessageResult(Some(addr.unwrap().clone()));
+        }
+    }
+}
+
+/// Message to add an [MCaptcha] actor to [Master]
+#[derive(Message, Builder)]
+#[rtype(result = "()")]
+pub struct AddSite {
+    pub id: String,
+    pub addr: Addr<MCaptcha>,
+}
+
+impl Handler<AddSite> for Master {
+    type Result = ();
+
+    fn handle(&mut self, m: AddSite, _ctx: &mut Self::Context) -> Self::Result {
+        self.add_site(m);
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::mcaptcha::tests::*;
+
+    #[actix_rt::test]
+    async fn master_actor_works() {
+        let addr = Master::new().start();
+
+        let id = "yo";
+        let mcaptcha = get_counter().start();
+        let msg = AddSiteBuilder::default()
+            .id(id.into())
+            .addr(mcaptcha.clone())
+            .build()
+            .unwrap();
+        addr.send(msg).await.unwrap();
+
+        let mcaptcha_addr = addr.send(GetSite(id.into())).await.unwrap();
+        assert_eq!(mcaptcha_addr, Some(mcaptcha));
+
+        let addr_doesnt_exist = addr.send(GetSite("a".into())).await.unwrap();
+        assert!(addr_doesnt_exist.is_none());
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/src/m_captcha/mcaptcha.rs.html b/api-docs/m_captcha/0.1.0/src/m_captcha/mcaptcha.rs.html new file mode 100644 index 0000000..af9ae0c --- /dev/null +++ b/api-docs/m_captcha/0.1.0/src/m_captcha/mcaptcha.rs.html @@ -0,0 +1,524 @@ +mcaptcha.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! MCaptcha actor module that manages defense levels
+//!
+//! ## Usage:
+//! ```rust
+//! use m_captcha::{mcaptcha::Visitor, MCaptchaBuilder, cache::HashCache, LevelBuilder, DefenseBuilder};
+//! // traits from actix needs to be in scope for starting actor
+//! use actix::prelude::*;
+//!
+//! #[actix_rt::main]
+//! async fn main() -> std::io::Result<()> {
+//!     // configure defense
+//!     let defense = DefenseBuilder::default()
+//!         // add as many levels as you see fit
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 // visitor_threshold is the threshold/limit at which
+//!                 // mCaptcha will adjust difficulty levels
+//!                 // it is advisable to set small values for the first
+//!                 // levels visitor_threshold and difficulty_factor
+//!                 // as this will be the work that clients will be
+//!                 // computing when there's no load
+//!                 .visitor_threshold(50)
+//!                 .difficulty_factor(500)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 .visitor_threshold(5000)
+//!                 .difficulty_factor(50000)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .build()
+//!         .unwrap();
+//!
+//!     // create and start MCaptcha actor
+//!     //let cache = HashCache::default().start();
+//!     let mcaptcha = MCaptchaBuilder::default()
+//!         .defense(defense)
+//!         // leaky bucket algorithm's emission interval
+//!         .duration(30)
+//!         .build()
+//!         .unwrap()
+//!         .start();
+//!
+//!     // increment count when user visits protected routes
+//!     mcaptcha.send(Visitor).await.unwrap();
+//!
+//!     Ok(())
+//! }
+//! ```
+
+use std::time::Duration;
+
+use actix::dev::*;
+use derive_builder::Builder;
+
+use crate::defense::Defense;
+
+/// This struct represents the mCaptcha state and is used
+/// to configure leaky-bucket lifetime and manage defense
+#[derive(Clone, Debug, Builder)]
+pub struct MCaptcha {
+    #[builder(default = "0", setter(skip))]
+    visitor_threshold: u32,
+    defense: Defense,
+    duration: u64,
+}
+
+impl MCaptcha {
+    /// incerment visiotr count by one
+    pub fn add_visitor(&mut self) {
+        self.visitor_threshold += 1;
+        if self.visitor_threshold > self.defense.visitor_threshold() {
+            self.defense.tighten_up();
+        } else {
+            self.defense.loosen_up();
+        }
+    }
+
+    /// deccerment visiotr count by one
+    pub fn decrement_visiotr(&mut self) {
+        if self.visitor_threshold > 0 {
+            self.visitor_threshold -= 1;
+        }
+    }
+
+    /// get current difficulty factor
+    pub fn get_difficulty(&self) -> u32 {
+        self.defense.get_difficulty()
+    }
+
+    /// get [MCaptcha]'s lifetime
+    pub fn get_duration(&self) -> u64 {
+        self.duration
+    }
+}
+impl Actor for MCaptcha {
+    type Context = Context<Self>;
+}
+
+/// Message to decrement the visitor count
+#[derive(Message)]
+#[rtype(result = "()")]
+struct DeleteVisitor;
+
+impl Handler<DeleteVisitor> for MCaptcha {
+    type Result = ();
+    fn handle(&mut self, _msg: DeleteVisitor, _ctx: &mut Self::Context) -> Self::Result {
+        self.decrement_visiotr();
+    }
+}
+
+/// Message to increment the visitor count
+/// returns difficulty factor and lifetime
+#[derive(Message)]
+#[rtype(result = "VisitorResult")]
+pub struct Visitor;
+
+/// Struct representing the return datatime of
+/// [Visitor] message. Contains MCaptcha lifetime
+/// and difficulty factor
+pub struct VisitorResult {
+    pub duration: u64,
+    pub difficulty_factor: u32,
+}
+
+impl VisitorResult {
+    fn new(m: &MCaptcha) -> Self {
+        VisitorResult {
+            duration: m.get_duration(),
+            difficulty_factor: m.get_difficulty(),
+        }
+    }
+}
+
+impl Handler<Visitor> for MCaptcha {
+    type Result = MessageResult<Visitor>;
+
+    fn handle(&mut self, _: Visitor, ctx: &mut Self::Context) -> Self::Result {
+        use actix::clock::delay_for;
+
+        let addr = ctx.address();
+
+        let duration: Duration = Duration::new(self.duration.clone(), 0);
+        let wait_for = async move {
+            delay_for(duration).await;
+            addr.send(DeleteVisitor).await.unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(wait_for);
+
+        self.add_visitor();
+        MessageResult(VisitorResult::new(&self))
+    }
+}
+
+#[cfg(test)]
+pub mod tests {
+    use super::*;
+    use crate::defense::*;
+
+    // constants for testing
+    // (visitor count, level)
+    pub const LEVEL_1: (u32, u32) = (50, 50);
+    pub const LEVEL_2: (u32, u32) = (500, 500);
+    pub const DURATION: u64 = 10;
+
+    type MyActor = Addr<MCaptcha>;
+
+    pub fn get_defense() -> Defense {
+        DefenseBuilder::default()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(LEVEL_1.0)
+                    .difficulty_factor(LEVEL_1.1)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(LEVEL_2.0)
+                    .difficulty_factor(LEVEL_2.1)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .build()
+            .unwrap()
+    }
+
+    async fn race(addr: Addr<MCaptcha>, count: (u32, u32)) {
+        for _ in 0..count.0 as usize - 1 {
+            let _ = addr.send(Visitor).await.unwrap();
+        }
+    }
+
+    pub fn get_counter() -> MCaptcha {
+        MCaptchaBuilder::default()
+            .defense(get_defense())
+            .duration(DURATION)
+            .build()
+            .unwrap()
+    }
+
+    #[actix_rt::test]
+    async fn counter_defense_tightenup_works() {
+        let addr: MyActor = get_counter().start();
+
+        let mut mcaptcha = addr.send(Visitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_1.0);
+
+        race(addr.clone(), LEVEL_2).await;
+        mcaptcha = addr.send(Visitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_2.1);
+    }
+
+    #[actix_rt::test]
+    async fn counter_defense_loosenup_works() {
+        use actix::clock::delay_for;
+        let addr: MyActor = get_counter().start();
+
+        race(addr.clone(), LEVEL_2).await;
+        race(addr.clone(), LEVEL_2).await;
+        let mut mcaptcha = addr.send(Visitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_2.1);
+
+        let duration = Duration::new(DURATION, 0);
+        delay_for(duration).await;
+
+        mcaptcha = addr.send(Visitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_1.1);
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/src/m_captcha/pow.rs.html b/api-docs/m_captcha/0.1.0/src/m_captcha/pow.rs.html new file mode 100644 index 0000000..23df644 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/src/m_captcha/pow.rs.html @@ -0,0 +1,126 @@ +pow.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+//! PoW datatypes used in client-server interaction
+use pow_sha256::PoW;
+use serde::Serialize;
+
+pub use pow_sha256::ConfigBuilder;
+
+/// PoW requirement datatype that is be sent to clients for generating PoW
+#[derive(Clone, Serialize, Debug)]
+pub struct PoWConfig {
+    pub string: String,
+    pub difficulty_factor: u32,
+}
+impl PoWConfig {
+    /// create new instance of [PoWConfig]
+    pub fn new(m: u32) -> Self {
+        use crate::utils::get_random;
+
+        PoWConfig {
+            string: get_random(32),
+            difficulty_factor: m,
+        }
+    }
+}
+
+/// PoW datatype that clients send to server
+#[derive(Clone, Serialize, Debug)]
+pub struct Work {
+    pub string: String,
+    pub result: String,
+    pub nonce: u64,
+}
+
+impl From<Work> for PoW<String> {
+    fn from(w: Work) -> Self {
+        use pow_sha256::PoWBuilder;
+        PoWBuilder::default()
+            .result(w.result)
+            .nonce(w.nonce)
+            .build()
+            .unwrap()
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/src/m_captcha/system.rs.html b/api-docs/m_captcha/0.1.0/src/m_captcha/system.rs.html new file mode 100644 index 0000000..1bc08fc --- /dev/null +++ b/api-docs/m_captcha/0.1.0/src/m_captcha/system.rs.html @@ -0,0 +1,332 @@ +system.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! module describing mCaptcha system
+use actix::dev::*;
+use derive_builder::Builder;
+use pow_sha256::{Config, PoW};
+
+use crate::cache::messages;
+use crate::cache::Save;
+use crate::errors::*;
+use crate::master::Master;
+use crate::pow::*;
+
+/// struct describing various bits of data required for an mCaptcha system
+#[derive(Clone, Builder)]
+pub struct System<T: Save> {
+    pub master: Addr<Master>,
+    cache: Addr<T>,
+    pow: Config,
+}
+
+impl<T> System<T>
+where
+    T: Save,
+    <T as actix::Actor>::Context: ToEnvelope<T, messages::Cache> + ToEnvelope<T, messages::Retrive>,
+{
+    /// utility function to get difficulty factor of site `id` and cache it
+    pub async fn get_pow(&self, id: String) -> Option<PoWConfig> {
+        use crate::cache::messages::Cache;
+        use crate::master::GetSite;
+        use crate::mcaptcha::Visitor;
+
+        let site_addr = self.master.send(GetSite(id)).await.unwrap();
+        if site_addr.is_none() {
+            return None;
+        }
+        let mcaptcha = site_addr.unwrap().send(Visitor).await.unwrap();
+        let pow_config = PoWConfig::new(mcaptcha.difficulty_factor);
+
+        let cache_msg = Cache::new(&pow_config, &mcaptcha);
+        self.cache.send(cache_msg).await.unwrap().unwrap();
+        Some(pow_config)
+    }
+
+    /// utility function to verify [Work]
+    pub async fn verify_pow(&self, work: Work) -> CaptchaResult<bool> {
+        use crate::cache::messages::Retrive;
+
+        let string = work.string.clone();
+        let msg = Retrive(string.clone());
+        let pow: PoW<String> = work.into();
+
+        let difficulty = self.cache.send(msg).await.unwrap()?;
+        match difficulty {
+            Some(difficulty) => {
+                if self.pow.is_sufficient_difficulty(&pow, difficulty) {
+                    Ok(self.pow.is_valid_proof(&pow, &string))
+                } else {
+                    Err(CaptchaError::InsuffiencientDifficulty)
+                }
+            }
+            None => Err(CaptchaError::StringNotFound),
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+
+    use pow_sha256::ConfigBuilder;
+
+    use super::System;
+    use super::*;
+    use crate::cache::HashCache;
+    use crate::master::*;
+    use crate::mcaptcha::tests::*;
+
+    const MCAPTCHA_NAME: &str = "batsense.net";
+
+    async fn boostrap_system() -> System<HashCache> {
+        let master = Master::new().start();
+        let mcaptcha = get_counter().start();
+        let pow = get_config();
+
+        let cache = HashCache::default().start();
+        let msg = AddSiteBuilder::default()
+            .id(MCAPTCHA_NAME.into())
+            .addr(mcaptcha.clone())
+            .build()
+            .unwrap();
+
+        master.send(msg).await.unwrap();
+
+        SystemBuilder::default()
+            .master(master)
+            .cache(cache)
+            .pow(pow)
+            .build()
+            .unwrap()
+    }
+
+    fn get_config() -> Config {
+        ConfigBuilder::default()
+            .salt("myrandomsaltisnotlongenoug".into())
+            .build()
+            .unwrap()
+    }
+
+    #[actix_rt::test]
+    async fn get_pow_works() {
+        let actors = boostrap_system().await;
+        let pow = actors.get_pow(MCAPTCHA_NAME.into()).await.unwrap();
+        assert_eq!(pow.difficulty_factor, LEVEL_1.0);
+    }
+
+    #[actix_rt::test]
+    async fn verify_pow_works() {
+        let actors = boostrap_system().await;
+        let work_req = actors.get_pow(MCAPTCHA_NAME.into()).await.unwrap();
+        let config = get_config();
+
+        let work = config
+            .prove_work(&work_req.string, work_req.difficulty_factor)
+            .unwrap();
+        let mut payload = Work {
+            string: work_req.string,
+            result: work.result,
+            nonce: work.nonce,
+        };
+
+        let res = actors.verify_pow(payload.clone()).await.unwrap();
+        assert!(res);
+
+        payload.string = "wrongstring".into();
+        let res = actors.verify_pow(payload.clone()).await;
+        assert_eq!(res, Err(CaptchaError::StringNotFound));
+
+        let insufficient_work_req = actors.get_pow(MCAPTCHA_NAME.into()).await.unwrap();
+        let insufficient_work = config.prove_work(&insufficient_work_req.string, 1).unwrap();
+        let insufficient_work_payload = Work {
+            string: insufficient_work_req.string,
+            result: insufficient_work.result,
+            nonce: insufficient_work.nonce,
+        };
+        let res = actors.verify_pow(insufficient_work_payload.clone()).await;
+        assert_eq!(res, Err(CaptchaError::InsuffiencientDifficulty));
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/src/m_captcha/utils.rs.html b/api-docs/m_captcha/0.1.0/src/m_captcha/utils.rs.html new file mode 100644 index 0000000..5532440 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/src/m_captcha/utils.rs.html @@ -0,0 +1,72 @@ +utils.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+// utility function to get a randomly generated string
+// of size len
+pub fn get_random(len: usize) -> String {
+    use std::iter;
+
+    use rand::{distributions::Alphanumeric, rngs::ThreadRng, thread_rng, Rng};
+
+    let mut rng: ThreadRng = thread_rng();
+
+    iter::repeat(())
+        .map(|()| rng.sample(Alphanumeric))
+        .map(char::from)
+        .take(len)
+        .collect::<String>()
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/storage.js b/api-docs/m_captcha/0.1.0/storage.js new file mode 100644 index 0000000..318275e --- /dev/null +++ b/api-docs/m_captcha/0.1.0/storage.js @@ -0,0 +1 @@ +var resourcesSuffix="";var darkThemes=["dark","ayu"];var currentTheme=document.getElementById("themeStyle");var mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed!==true){for(i=0;i=0;--i){if(func(arr[i])===true){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function hasOwnProperty(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function usableLocalStorage(){if(typeof Storage==="undefined"){return false}try{return window.localStorage!==null&&window.localStorage!==undefined}catch(err){return false}}function updateLocalStorage(name,value){if(usableLocalStorage()){localStorage[name]=value}else{}}function getCurrentValue(name){if(usableLocalStorage()&&localStorage[name]!==undefined){return localStorage[name]}return null}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){var fullBasicCss="rustdoc"+resourcesSuffix+".css";var fullNewTheme=newTheme+resourcesSuffix+".css";var newHref=mainStyleElem.href.replace(fullBasicCss,fullNewTheme);if(saveTheme===true){updateLocalStorage("rustdoc-theme",newTheme)}if(styleElem.href===newHref){return}var found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),function(el){savedHref.push(el.href)})}onEach(savedHref,function(el){if(el===newHref){found=true;return true}});if(found===true){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("rustdoc-use-system-theme",value);var toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}var updateSystemTheme=(function(){if(!window.matchMedia){return function(){let cssTheme=getComputedStyle(document.documentElement).getPropertyValue('content');switchTheme(currentTheme,mainTheme,JSON.parse(cssTheme)||light,true)}}var mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){if(getSettingValue("use-system-theme")!=="false"){var lightTheme=getSettingValue("preferred-light-theme")||"light";var darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){switchTheme(currentTheme,mainTheme,darkTheme,true)}else{switchTheme(currentTheme,mainTheme,lightTheme,true)}}}mql.addListener(handlePreferenceChange);return function(){handlePreferenceChange(mql)}})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(currentTheme,mainTheme,getSettingValue("theme")||"light",false)} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/theme.js b/api-docs/m_captcha/0.1.0/theme.js new file mode 100644 index 0000000..8f9c49a --- /dev/null +++ b/api-docs/m_captcha/0.1.0/theme.js @@ -0,0 +1 @@ +var themes=document.getElementById("theme-choices");var themePicker=document.getElementById("theme-picker");function showThemeButtonState(){themes.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){themes.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}function switchThemeButtonState(){if(themes.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}};function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!=="theme-picker"&&(!active.parentNode||active.parentNode.id!=="theme-choices")&&(!related||(related.id!=="theme-picker"&&(!related.parentNode||related.parentNode.id!=="theme-choices")))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;["ayu","dark","light"].forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(el){switchTheme(currentTheme,mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themes.appendChild(but)}) \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.0/wheel.svg b/api-docs/m_captcha/0.1.0/wheel.svg new file mode 100644 index 0000000..01da3b2 --- /dev/null +++ b/api-docs/m_captcha/0.1.0/wheel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/COPYRIGHT.txt b/api-docs/m_captcha/0.1.1/COPYRIGHT.txt new file mode 100644 index 0000000..af77776 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/COPYRIGHT.txt @@ -0,0 +1,45 @@ +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif Pro (SourceSerifPro-Regular.ttf.woff, + SourceSerifPro-Bold.ttf.woff, SourceSerifPro-It.ttf.woff): + + Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with + Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of + Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerifPro-LICENSE.txt. + +This copyright file is intended to be distributed with rustdoc output. diff --git a/api-docs/m_captcha/0.1.1/FiraSans-LICENSE.txt b/api-docs/m_captcha/0.1.1/FiraSans-LICENSE.txt new file mode 100644 index 0000000..d444ea9 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/FiraSans-LICENSE.txt @@ -0,0 +1,94 @@ +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/m_captcha/0.1.1/FiraSans-Medium.woff b/api-docs/m_captcha/0.1.1/FiraSans-Medium.woff new file mode 100644 index 0000000..7d742c5 Binary files /dev/null and b/api-docs/m_captcha/0.1.1/FiraSans-Medium.woff differ diff --git a/api-docs/m_captcha/0.1.1/FiraSans-Regular.woff b/api-docs/m_captcha/0.1.1/FiraSans-Regular.woff new file mode 100644 index 0000000..d8e0363 Binary files /dev/null and b/api-docs/m_captcha/0.1.1/FiraSans-Regular.woff differ diff --git a/api-docs/m_captcha/0.1.1/LICENSE-APACHE.txt b/api-docs/m_captcha/0.1.1/LICENSE-APACHE.txt new file mode 100644 index 0000000..16fe87b --- /dev/null +++ b/api-docs/m_captcha/0.1.1/LICENSE-APACHE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/api-docs/m_captcha/0.1.1/LICENSE-MIT.txt b/api-docs/m_captcha/0.1.1/LICENSE-MIT.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/LICENSE-MIT.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/api-docs/m_captcha/0.1.1/SourceCodePro-LICENSE.txt b/api-docs/m_captcha/0.1.1/SourceCodePro-LICENSE.txt new file mode 100644 index 0000000..0754257 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/SourceCodePro-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/m_captcha/0.1.1/SourceCodePro-Regular.woff b/api-docs/m_captcha/0.1.1/SourceCodePro-Regular.woff new file mode 100644 index 0000000..5576670 Binary files /dev/null and b/api-docs/m_captcha/0.1.1/SourceCodePro-Regular.woff differ diff --git a/api-docs/m_captcha/0.1.1/SourceCodePro-Semibold.woff b/api-docs/m_captcha/0.1.1/SourceCodePro-Semibold.woff new file mode 100644 index 0000000..ca972a1 Binary files /dev/null and b/api-docs/m_captcha/0.1.1/SourceCodePro-Semibold.woff differ diff --git a/api-docs/m_captcha/0.1.1/SourceSerifPro-Bold.ttf.woff b/api-docs/m_captcha/0.1.1/SourceSerifPro-Bold.ttf.woff new file mode 100644 index 0000000..ca25431 Binary files /dev/null and b/api-docs/m_captcha/0.1.1/SourceSerifPro-Bold.ttf.woff differ diff --git a/api-docs/m_captcha/0.1.1/SourceSerifPro-It.ttf.woff b/api-docs/m_captcha/0.1.1/SourceSerifPro-It.ttf.woff new file mode 100644 index 0000000..a287bbe Binary files /dev/null and b/api-docs/m_captcha/0.1.1/SourceSerifPro-It.ttf.woff differ diff --git a/api-docs/m_captcha/0.1.1/SourceSerifPro-LICENSE.md b/api-docs/m_captcha/0.1.1/SourceSerifPro-LICENSE.md new file mode 100644 index 0000000..22cb755 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/SourceSerifPro-LICENSE.md @@ -0,0 +1,93 @@ +Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/m_captcha/0.1.1/SourceSerifPro-Regular.ttf.woff b/api-docs/m_captcha/0.1.1/SourceSerifPro-Regular.ttf.woff new file mode 100644 index 0000000..a3d55cf Binary files /dev/null and b/api-docs/m_captcha/0.1.1/SourceSerifPro-Regular.ttf.woff differ diff --git a/api-docs/m_captcha/0.1.1/ayu.css b/api-docs/m_captcha/0.1.1/ayu.css new file mode 100644 index 0000000..096f6f3 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/ayu.css @@ -0,0 +1 @@ + body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod){border-bottom-color:#5c6773;}h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}code{color:#ffb454;}h3>code,h4>code,h5>code{color:#e6e1cf;}pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#5c6773;}.docblock table,.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.content .highlighted{color:#000 !important;background-color:#c6afb3;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted{background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a span.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}.collapse-toggle{color:#999;}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-focus:disabled{color:#929292;}.module-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background-color:transparent;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help>div>span{border-bottom-color:#5c6773;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.content .highlighted.mod,.content .highlighted.externcrate{}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content .highlighted.trait{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content .highlighted.traitalias{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}.content .highlighted.foreigntype{}pre.rust .lifetime{}.content .highlighted.primitive{}.content .highlighted.constant,.content .highlighted.static{}.stab.unstable{}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content .highlighted.enum{}.content .highlighted.struct{}.content .highlighted.keyword{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{}.stab.portability{}.content .highlighted.union{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}.content .highlighted.type{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results td span.alias{color:#c5c5c5;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/brush.svg b/api-docs/m_captcha/0.1.1/brush.svg new file mode 100644 index 0000000..ea266e8 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/brush.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/cfg_if/all.html b/api-docs/m_captcha/0.1.1/cfg_if/all.html new file mode 100644 index 0000000..fb218fa --- /dev/null +++ b/api-docs/m_captcha/0.1.1/cfg_if/all.html @@ -0,0 +1,6 @@ +List of all items in this crate + +

[] + + List of all items

Macros

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/cfg_if/index.html b/api-docs/m_captcha/0.1.1/cfg_if/index.html new file mode 100644 index 0000000..3ec7309 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/cfg_if/index.html @@ -0,0 +1,25 @@ +cfg_if - Rust + +

[][src]Crate cfg_if

A macro for defining #[cfg] if-else statements.

+

The macro provided by this crate, cfg_if, is similar to the if/elif C +preprocessor macro by allowing definition of a cascade of #[cfg] cases, +emitting the implementation which matches first.

+

This allows you to conveniently provide a long list #[cfg]'d blocks of code +without having to rewrite each clause multiple times.

+

Example

+
+cfg_if::cfg_if! {
+    if #[cfg(unix)] {
+        fn foo() { /* unix specific functionality */ }
+    } else if #[cfg(target_pointer_width = "32")] {
+        fn foo() { /* non-unix, 32-bit functionality */ }
+    } else {
+        fn foo() { /* fallback implementation */ }
+    }
+}
+
+

Macros

+
cfg_if

The main macro provided by this crate. See crate documentation for more +information.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/cfg_if/macro.cfg_if!.html b/api-docs/m_captcha/0.1.1/cfg_if/macro.cfg_if!.html new file mode 100644 index 0000000..36f9a6d --- /dev/null +++ b/api-docs/m_captcha/0.1.1/cfg_if/macro.cfg_if!.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to macro.cfg_if.html...

+ + + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/cfg_if/macro.cfg_if.html b/api-docs/m_captcha/0.1.1/cfg_if/macro.cfg_if.html new file mode 100644 index 0000000..cbde7d5 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/cfg_if/macro.cfg_if.html @@ -0,0 +1,23 @@ +cfg_if::cfg_if - Rust + +

[][src]Macro cfg_if::cfg_if

+macro_rules! cfg_if {
+    ($(
+        if #[cfg($meta:meta)] { $($tokens:tt)* }
+    ) else * else {
+        $($tokens2:tt)*
+    }) => { ... };
+    (
+        if #[cfg($i_met:meta)] { $($i_tokens:tt)* }
+        $(
+            else if #[cfg($e_met:meta)] { $($e_tokens:tt)* }
+        )*
+    ) => { ... };
+    (@__items ($($not:meta,)*) ; ) => { ... };
+    (@__items ($($not:meta,)*) ; ( ($($m:meta),*) ($($tokens:tt)*) ), $($rest:tt)*) => { ... };
+    (@__identity $($tokens:tt)*) => { ... };
+}
+

The main macro provided by this crate. See crate documentation for more +information.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/cfg_if/sidebar-items.js b/api-docs/m_captcha/0.1.1/cfg_if/sidebar-items.js new file mode 100644 index 0000000..dbc0f91 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/cfg_if/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"macro":[["cfg_if","The main macro provided by this crate. See crate documentation for more information."]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/dark.css b/api-docs/m_captcha/0.1.1/dark.css new file mode 100644 index 0000000..85dec48 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/dark.css @@ -0,0 +1 @@ +body{background-color:#353535;color:#ddd;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.content .highlighted{color:#eee !important;background-color:#616161;}.content .highlighted a,.content .highlighted span{color:#eee !important;}.content .highlighted.trait{background-color:#013191;}.content .highlighted.traitalias{background-color:#013191;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.mod{background-color:#803a1b;}.content .highlighted.externcrate{background-color:#396bac;}.content .highlighted.enum{background-color:#5b4e68;}.content .highlighted.struct{background-color:#194e9f;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#4950ed;}.content .highlighted.type{background-color:#38902c;}.content .highlighted.foreigntype{background-color:#b200d6;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#217d1c;}.content .highlighted.constant,.content .highlighted.static{background-color:#0063cc;}.content .highlighted.primitive{background-color:#00708a;}.content .highlighted.keyword{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}.collapse-toggle{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-focus:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;color:#2f2f2f;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;color:#2f2f2f;}.stab.portability>code{color:#ddd;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);color:black;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#ffb900;}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results td span.alias{color:#fff;}.search-results td span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/down-arrow.svg b/api-docs/m_captcha/0.1.1/down-arrow.svg new file mode 100644 index 0000000..35437e7 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/down-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/favicon-16x16.png b/api-docs/m_captcha/0.1.1/favicon-16x16.png new file mode 100644 index 0000000..7cfe6c1 Binary files /dev/null and b/api-docs/m_captcha/0.1.1/favicon-16x16.png differ diff --git a/api-docs/m_captcha/0.1.1/favicon-32x32.png b/api-docs/m_captcha/0.1.1/favicon-32x32.png new file mode 100644 index 0000000..5109c1d Binary files /dev/null and b/api-docs/m_captcha/0.1.1/favicon-32x32.png differ diff --git a/api-docs/m_captcha/0.1.1/favicon.svg b/api-docs/m_captcha/0.1.1/favicon.svg new file mode 100644 index 0000000..8b34b51 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/favicon.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/api-docs/m_captcha/0.1.1/implementors/actix/actor/trait.Actor.js b/api-docs/m_captcha/0.1.1/implementors/actix/actor/trait.Actor.js new file mode 100644 index 0000000..16ec94a --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/actix/actor/trait.Actor.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Actor for Master","synthetic":false,"types":[]},{"text":"impl Actor for MCaptcha","synthetic":false,"types":[]},{"text":"impl Actor for HashCache","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/actix/handler/trait.Handler.js b/api-docs/m_captcha/0.1.1/implementors/actix/handler/trait.Handler.js new file mode 100644 index 0000000..dd1ed80 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/actix/handler/trait.Handler.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Handler<GetSite> for Master","synthetic":false,"types":[]},{"text":"impl Handler<CleanUp> for Master","synthetic":false,"types":[]},{"text":"impl Handler<RemoveSite> for Master","synthetic":false,"types":[]},{"text":"impl Handler<AddSite> for Master","synthetic":false,"types":[]},{"text":"impl Handler<AddVisitor> for MCaptcha","synthetic":false,"types":[]},{"text":"impl Handler<GetCurrentVisitorCount> for MCaptcha","synthetic":false,"types":[]},{"text":"impl Handler<Stop> for MCaptcha","synthetic":false,"types":[]},{"text":"impl Handler<Cache> for HashCache","synthetic":false,"types":[]},{"text":"impl Handler<DeleteString> for HashCache","synthetic":false,"types":[]},{"text":"impl Handler<Retrive> for HashCache","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/actix/handler/trait.Message.js b/api-docs/m_captcha/0.1.1/implementors/actix/handler/trait.Message.js new file mode 100644 index 0000000..d015e4e --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/actix/handler/trait.Message.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Message for GetSite","synthetic":false,"types":[]},{"text":"impl Message for CleanUp","synthetic":false,"types":[]},{"text":"impl Message for RemoveSite","synthetic":false,"types":[]},{"text":"impl Message for AddSite","synthetic":false,"types":[]},{"text":"impl Message for AddVisitor","synthetic":false,"types":[]},{"text":"impl Message for GetCurrentVisitorCount","synthetic":false,"types":[]},{"text":"impl Message for Stop","synthetic":false,"types":[]},{"text":"impl Message for Cache","synthetic":false,"types":[]},{"text":"impl Message for Retrive","synthetic":false,"types":[]},{"text":"impl Message for DeleteString","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/core/clone/trait.Clone.js b/api-docs/m_captcha/0.1.1/implementors/core/clone/trait.Clone.js new file mode 100644 index 0000000..3098fa4 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Clone for Level","synthetic":false,"types":[]},{"text":"impl Clone for LevelBuilder","synthetic":false,"types":[]},{"text":"impl Clone for Defense","synthetic":false,"types":[]},{"text":"impl Clone for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl Clone for CaptchaError","synthetic":false,"types":[]},{"text":"impl Clone for Master","synthetic":false,"types":[]},{"text":"impl Clone for AddSiteBuilder","synthetic":false,"types":[]},{"text":"impl Clone for MCaptchaBuilder","synthetic":false,"types":[]},{"text":"impl Clone for MCaptcha","synthetic":false,"types":[]},{"text":"impl Clone for AddVisitorResult","synthetic":false,"types":[]},{"text":"impl Clone for HashCache","synthetic":false,"types":[]},{"text":"impl Clone for CacheBuilder","synthetic":false,"types":[]},{"text":"impl Clone for PoWConfig","synthetic":false,"types":[]},{"text":"impl Clone for Work","synthetic":false,"types":[]},{"text":"impl<T: Clone + Save> Clone for System<T>","synthetic":false,"types":[]},{"text":"impl<T: Clone + Save> Clone for SystemBuilder<T>","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/core/cmp/trait.PartialEq.js b/api-docs/m_captcha/0.1.1/implementors/core/cmp/trait.PartialEq.js new file mode 100644 index 0000000..cf1c21e --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl PartialEq<Level> for Level","synthetic":false,"types":[]},{"text":"impl PartialEq<LevelBuilder> for LevelBuilder","synthetic":false,"types":[]},{"text":"impl PartialEq<Defense> for Defense","synthetic":false,"types":[]},{"text":"impl PartialEq<DefenseBuilder> for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl PartialEq<CaptchaError> for CaptchaError","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/core/convert/trait.From.js b/api-docs/m_captcha/0.1.1/implementors/core/convert/trait.From.js new file mode 100644 index 0000000..9f519a6 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/core/convert/trait.From.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl From<Work> for PoW<String>","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/core/default/trait.Default.js b/api-docs/m_captcha/0.1.1/implementors/core/default/trait.Default.js new file mode 100644 index 0000000..17ac631 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/core/default/trait.Default.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Default for LevelBuilder","synthetic":false,"types":[]},{"text":"impl Default for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl Default for AddSiteBuilder","synthetic":false,"types":[]},{"text":"impl Default for MCaptchaBuilder","synthetic":false,"types":[]},{"text":"impl Default for HashCache","synthetic":false,"types":[]},{"text":"impl Default for CacheBuilder","synthetic":false,"types":[]},{"text":"impl<T: Default + Save> Default for SystemBuilder<T>","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/core/fmt/trait.Debug.js b/api-docs/m_captcha/0.1.1/implementors/core/fmt/trait.Debug.js new file mode 100644 index 0000000..0e52c98 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Debug for Level","synthetic":false,"types":[]},{"text":"impl Debug for LevelBuilder","synthetic":false,"types":[]},{"text":"impl Debug for Defense","synthetic":false,"types":[]},{"text":"impl Debug for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl Debug for CaptchaError","synthetic":false,"types":[]},{"text":"impl Debug for MCaptchaBuilder","synthetic":false,"types":[]},{"text":"impl Debug for MCaptcha","synthetic":false,"types":[]},{"text":"impl Debug for AddVisitorResult","synthetic":false,"types":[]},{"text":"impl Debug for PoWConfig","synthetic":false,"types":[]},{"text":"impl Debug for Work","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/core/fmt/trait.Display.js b/api-docs/m_captcha/0.1.1/implementors/core/fmt/trait.Display.js new file mode 100644 index 0000000..3aa76f3 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/core/fmt/trait.Display.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Display for CaptchaError","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Copy.js b/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Copy.js new file mode 100644 index 0000000..802c013 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Copy.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Copy for Level","synthetic":false,"types":[]},{"text":"impl Copy for LevelBuilder","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Freeze.js b/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Freeze.js new file mode 100644 index 0000000..40e7468 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Freeze for Level","synthetic":true,"types":[]},{"text":"impl Freeze for LevelBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for Defense","synthetic":true,"types":[]},{"text":"impl Freeze for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for CaptchaError","synthetic":true,"types":[]},{"text":"impl Freeze for Master","synthetic":true,"types":[]},{"text":"impl Freeze for GetSite","synthetic":true,"types":[]},{"text":"impl Freeze for CleanUp","synthetic":true,"types":[]},{"text":"impl Freeze for RemoveSite","synthetic":true,"types":[]},{"text":"impl Freeze for AddSite","synthetic":true,"types":[]},{"text":"impl Freeze for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for MCaptcha","synthetic":true,"types":[]},{"text":"impl Freeze for AddVisitor","synthetic":true,"types":[]},{"text":"impl Freeze for AddVisitorResult","synthetic":true,"types":[]},{"text":"impl Freeze for GetCurrentVisitorCount","synthetic":true,"types":[]},{"text":"impl Freeze for Stop","synthetic":true,"types":[]},{"text":"impl Freeze for HashCache","synthetic":true,"types":[]},{"text":"impl Freeze for Cache","synthetic":true,"types":[]},{"text":"impl Freeze for CacheBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for Retrive","synthetic":true,"types":[]},{"text":"impl Freeze for DeleteString","synthetic":true,"types":[]},{"text":"impl Freeze for PoWConfig","synthetic":true,"types":[]},{"text":"impl Freeze for Work","synthetic":true,"types":[]},{"text":"impl<T> Freeze for System<T>","synthetic":true,"types":[]},{"text":"impl<T> Freeze for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Send.js b/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Send.js new file mode 100644 index 0000000..e1dbcd2 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Send for Level","synthetic":true,"types":[]},{"text":"impl Send for LevelBuilder","synthetic":true,"types":[]},{"text":"impl Send for Defense","synthetic":true,"types":[]},{"text":"impl Send for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl Send for CaptchaError","synthetic":true,"types":[]},{"text":"impl Send for Master","synthetic":true,"types":[]},{"text":"impl Send for GetSite","synthetic":true,"types":[]},{"text":"impl Send for CleanUp","synthetic":true,"types":[]},{"text":"impl Send for RemoveSite","synthetic":true,"types":[]},{"text":"impl Send for AddSite","synthetic":true,"types":[]},{"text":"impl Send for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl Send for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl Send for MCaptcha","synthetic":true,"types":[]},{"text":"impl Send for AddVisitor","synthetic":true,"types":[]},{"text":"impl Send for AddVisitorResult","synthetic":true,"types":[]},{"text":"impl Send for GetCurrentVisitorCount","synthetic":true,"types":[]},{"text":"impl Send for Stop","synthetic":true,"types":[]},{"text":"impl Send for HashCache","synthetic":true,"types":[]},{"text":"impl Send for Cache","synthetic":true,"types":[]},{"text":"impl Send for CacheBuilder","synthetic":true,"types":[]},{"text":"impl Send for Retrive","synthetic":true,"types":[]},{"text":"impl Send for DeleteString","synthetic":true,"types":[]},{"text":"impl Send for PoWConfig","synthetic":true,"types":[]},{"text":"impl Send for Work","synthetic":true,"types":[]},{"text":"impl<T> Send for System<T>","synthetic":true,"types":[]},{"text":"impl<T> Send for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.StructuralPartialEq.js b/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 0000000..d87286d --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl StructuralPartialEq for Level","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for LevelBuilder","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Defense","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for CaptchaError","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Sync.js b/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Sync.js new file mode 100644 index 0000000..98050da --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Sync for Level","synthetic":true,"types":[]},{"text":"impl Sync for LevelBuilder","synthetic":true,"types":[]},{"text":"impl Sync for Defense","synthetic":true,"types":[]},{"text":"impl Sync for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl Sync for CaptchaError","synthetic":true,"types":[]},{"text":"impl Sync for Master","synthetic":true,"types":[]},{"text":"impl Sync for GetSite","synthetic":true,"types":[]},{"text":"impl Sync for CleanUp","synthetic":true,"types":[]},{"text":"impl Sync for RemoveSite","synthetic":true,"types":[]},{"text":"impl Sync for AddSite","synthetic":true,"types":[]},{"text":"impl Sync for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl Sync for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl Sync for MCaptcha","synthetic":true,"types":[]},{"text":"impl Sync for AddVisitor","synthetic":true,"types":[]},{"text":"impl Sync for AddVisitorResult","synthetic":true,"types":[]},{"text":"impl Sync for GetCurrentVisitorCount","synthetic":true,"types":[]},{"text":"impl Sync for Stop","synthetic":true,"types":[]},{"text":"impl Sync for HashCache","synthetic":true,"types":[]},{"text":"impl Sync for Cache","synthetic":true,"types":[]},{"text":"impl Sync for CacheBuilder","synthetic":true,"types":[]},{"text":"impl Sync for Retrive","synthetic":true,"types":[]},{"text":"impl Sync for DeleteString","synthetic":true,"types":[]},{"text":"impl Sync for PoWConfig","synthetic":true,"types":[]},{"text":"impl Sync for Work","synthetic":true,"types":[]},{"text":"impl<T> Sync for System<T>","synthetic":true,"types":[]},{"text":"impl<T> Sync for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Unpin.js b/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Unpin.js new file mode 100644 index 0000000..1cfa5f9 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Unpin for Level","synthetic":true,"types":[]},{"text":"impl Unpin for LevelBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for Defense","synthetic":true,"types":[]},{"text":"impl Unpin for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for CaptchaError","synthetic":true,"types":[]},{"text":"impl Unpin for Master","synthetic":true,"types":[]},{"text":"impl Unpin for GetSite","synthetic":true,"types":[]},{"text":"impl Unpin for CleanUp","synthetic":true,"types":[]},{"text":"impl Unpin for RemoveSite","synthetic":true,"types":[]},{"text":"impl Unpin for AddSite","synthetic":true,"types":[]},{"text":"impl Unpin for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for MCaptcha","synthetic":true,"types":[]},{"text":"impl Unpin for AddVisitor","synthetic":true,"types":[]},{"text":"impl Unpin for AddVisitorResult","synthetic":true,"types":[]},{"text":"impl Unpin for GetCurrentVisitorCount","synthetic":true,"types":[]},{"text":"impl Unpin for Stop","synthetic":true,"types":[]},{"text":"impl Unpin for HashCache","synthetic":true,"types":[]},{"text":"impl Unpin for Cache","synthetic":true,"types":[]},{"text":"impl Unpin for CacheBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for Retrive","synthetic":true,"types":[]},{"text":"impl Unpin for DeleteString","synthetic":true,"types":[]},{"text":"impl Unpin for PoWConfig","synthetic":true,"types":[]},{"text":"impl Unpin for Work","synthetic":true,"types":[]},{"text":"impl<T> Unpin for System<T>","synthetic":true,"types":[]},{"text":"impl<T> Unpin for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/m_captcha/cache/trait.Save.js b/api-docs/m_captcha/0.1.1/implementors/m_captcha/cache/trait.Save.js new file mode 100644 index 0000000..218677b --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/m_captcha/cache/trait.Save.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/serde/de/trait.Deserialize.js b/api-docs/m_captcha/0.1.1/implementors/serde/de/trait.Deserialize.js new file mode 100644 index 0000000..3a49487 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/serde/de/trait.Deserialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl<'de> Deserialize<'de> for Level","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Defense","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for MCaptchaBuilder","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for MCaptcha","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for AddVisitorResult","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Cache","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for PoWConfig","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Work","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/serde/ser/trait.Serialize.js b/api-docs/m_captcha/0.1.1/implementors/serde/ser/trait.Serialize.js new file mode 100644 index 0000000..a6b6444 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/serde/ser/trait.Serialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Serialize for Level","synthetic":false,"types":[]},{"text":"impl Serialize for Defense","synthetic":false,"types":[]},{"text":"impl Serialize for MCaptchaBuilder","synthetic":false,"types":[]},{"text":"impl Serialize for MCaptcha","synthetic":false,"types":[]},{"text":"impl Serialize for AddVisitorResult","synthetic":false,"types":[]},{"text":"impl Serialize for Cache","synthetic":false,"types":[]},{"text":"impl Serialize for PoWConfig","synthetic":false,"types":[]},{"text":"impl Serialize for Work","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/std/error/trait.Error.js b/api-docs/m_captcha/0.1.1/implementors/std/error/trait.Error.js new file mode 100644 index 0000000..2536e5d --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/std/error/trait.Error.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Error for CaptchaError","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/std/panic/trait.RefUnwindSafe.js b/api-docs/m_captcha/0.1.1/implementors/std/panic/trait.RefUnwindSafe.js new file mode 100644 index 0000000..0e703d0 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/std/panic/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl RefUnwindSafe for Level","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for LevelBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Defense","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for CaptchaError","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for Master","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for GetSite","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for CleanUp","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for RemoveSite","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for AddSite","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for MCaptcha","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for AddVisitor","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for AddVisitorResult","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for GetCurrentVisitorCount","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Stop","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for HashCache","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Cache","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for CacheBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Retrive","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for DeleteString","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for PoWConfig","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Work","synthetic":true,"types":[]},{"text":"impl<T> !RefUnwindSafe for System<T>","synthetic":true,"types":[]},{"text":"impl<T> !RefUnwindSafe for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/std/panic/trait.UnwindSafe.js b/api-docs/m_captcha/0.1.1/implementors/std/panic/trait.UnwindSafe.js new file mode 100644 index 0000000..8dc35fa --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/std/panic/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl UnwindSafe for Level","synthetic":true,"types":[]},{"text":"impl UnwindSafe for LevelBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Defense","synthetic":true,"types":[]},{"text":"impl UnwindSafe for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for CaptchaError","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for Master","synthetic":true,"types":[]},{"text":"impl UnwindSafe for GetSite","synthetic":true,"types":[]},{"text":"impl UnwindSafe for CleanUp","synthetic":true,"types":[]},{"text":"impl UnwindSafe for RemoveSite","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for AddSite","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for MCaptcha","synthetic":true,"types":[]},{"text":"impl UnwindSafe for AddVisitor","synthetic":true,"types":[]},{"text":"impl UnwindSafe for AddVisitorResult","synthetic":true,"types":[]},{"text":"impl UnwindSafe for GetCurrentVisitorCount","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Stop","synthetic":true,"types":[]},{"text":"impl UnwindSafe for HashCache","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Cache","synthetic":true,"types":[]},{"text":"impl UnwindSafe for CacheBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Retrive","synthetic":true,"types":[]},{"text":"impl UnwindSafe for DeleteString","synthetic":true,"types":[]},{"text":"impl UnwindSafe for PoWConfig","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Work","synthetic":true,"types":[]},{"text":"impl<T> !UnwindSafe for System<T>","synthetic":true,"types":[]},{"text":"impl<T> !UnwindSafe for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/implementors/unicode_xid/trait.UnicodeXID.js b/api-docs/m_captcha/0.1.1/implementors/unicode_xid/trait.UnicodeXID.js new file mode 100644 index 0000000..bde1c01 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/implementors/unicode_xid/trait.UnicodeXID.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["unicode_xid"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/light.css b/api-docs/m_captcha/0.1.1/light.css new file mode 100644 index 0000000..fa73fe2 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/light.css @@ -0,0 +1 @@ + body{background-color:white;color:black;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.content .highlighted{color:#000 !important;background-color:#ccc;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted.trait{background-color:#c7b6ff;}.content .highlighted.traitalias{background-color:#c7b6ff;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.enum{background-color:#b4d1b9;}.content .highlighted.struct{background-color:#e7b1a0;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#c6afb3;}.content .highlighted.type{background-color:#ffc891;}.content .highlighted.foreigntype{background-color:#f5c4ff;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#8ce488;}.content .highlighted.constant,.content .highlighted.static{background-color:#c3e0ff;}.content .highlighted.primitive{background-color:#9aecff;}.content .highlighted.keyword{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}.collapse-toggle{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-focus:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;}.stab.portability>code{color:#000;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:#FDFFD3;border-right:3px solid #ffb44c;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#717171;}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results td span.alias{color:#000;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/all.html b/api-docs/m_captcha/0.1.1/m_captcha/all.html new file mode 100644 index 0000000..c8768b1 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/all.html @@ -0,0 +1,6 @@ +List of all items in this crate + +

[] + + List of all items

Structs

Enums

Traits

Typedefs

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/cache/hashcache/index.html b/api-docs/m_captcha/0.1.1/m_captcha/cache/hashcache/index.html new file mode 100644 index 0000000..1ec8070 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/cache/hashcache/index.html @@ -0,0 +1,7 @@ +m_captcha::cache::hashcache - Rust + +

[][src]Module m_captcha::cache::hashcache

In-memory cache implementation that uses HashMap

+

Structs

+
HashCache

cache datastructure implementing Save

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/cache/hashcache/sidebar-items.js b/api-docs/m_captcha/0.1.1/m_captcha/cache/hashcache/sidebar-items.js new file mode 100644 index 0000000..5dadaea --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/cache/hashcache/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["HashCache","cache datastructure implementing [Save]"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/cache/hashcache/struct.HashCache.html b/api-docs/m_captcha/0.1.1/m_captcha/cache/hashcache/struct.HashCache.html new file mode 100644 index 0000000..ec40a0d --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/cache/hashcache/struct.HashCache.html @@ -0,0 +1,40 @@ +m_captcha::cache::hashcache::HashCache - Rust + +

[][src]Struct m_captcha::cache::hashcache::HashCache

pub struct HashCache(_);

cache datastructure implementing Save

+

Trait Implementations

impl Actor for HashCache[src]

type Context = Context<Self>

Actor execution context type

+

impl Clone for HashCache[src]

impl Default for HashCache[src]

impl Handler<Cache> for HashCache[src]

cache a PoWConfig

+

type Result = MessageResult<Cache>

The type of value that this handler will return. Read more

+

impl Handler<DeleteString> for HashCache[src]

Delte a PoWConfig

+

type Result = MessageResult<DeleteString>

The type of value that this handler will return. Read more

+

impl Handler<Retrive> for HashCache[src]

Retrive PoW difficulty_factor for a PoW string

+

type Result = MessageResult<Retrive>

The type of value that this handler will return. Read more

+

impl Save for HashCache[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/cache/index.html b/api-docs/m_captcha/0.1.1/m_captcha/cache/index.html new file mode 100644 index 0000000..2c1d0c1 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/cache/index.html @@ -0,0 +1,13 @@ +m_captcha::cache - Rust + +

[][src]Module m_captcha::cache

message datatypes to interact with MCaptcha actor +Cache is used to save proofof work details and nonces to prevent replay attacks +and rainbow/dictionary attacks

+

Re-exports

+
pub use hashcache::HashCache;

Modules

+
hashcache

In-memory cache implementation that uses HashMap

+
messages

Messages that can be sent to cache data structures implementing Save

+

Traits

+
Save

Describes actor handler trait impls that are required by a cache implementation

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/index.html b/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/index.html new file mode 100644 index 0000000..1bebdf8 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/index.html @@ -0,0 +1,12 @@ +m_captcha::cache::messages - Rust + +

[][src]Module m_captcha::cache::messages

Messages that can be sent to cache data structures implementing Save

+

Structs

+
Cache

Message to cache PoW difficulty factor and string

+
CacheBuilder

Builder for Cache.

+
DeleteString

Message to delete cached PoW difficulty factor and string +when they expire

+
Retrive

Message to retrive the the difficulty factor for the specified +string from the cache

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/sidebar-items.js b/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/sidebar-items.js new file mode 100644 index 0000000..829b034 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Cache","Message to cache PoW difficulty factor and string"],["CacheBuilder","Builder for `Cache`."],["DeleteString","Message to delete cached PoW difficulty factor and string when they expire"],["Retrive","Message to retrive the the difficulty factor for the specified string from the cache"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/struct.Cache.html b/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/struct.Cache.html new file mode 100644 index 0000000..057caf1 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/struct.Cache.html @@ -0,0 +1,27 @@ +m_captcha::cache::messages::Cache - Rust + +

[][src]Struct m_captcha::cache::messages::Cache

pub struct Cache {
+    pub string: String,
+    pub difficulty_factor: u32,
+    pub duration: u64,
+}

Message to cache PoW difficulty factor and string

+

+ Fields

string: Stringdifficulty_factor: u32duration: u64

Implementations

impl Cache[src]

pub fn new(p: &PoWConfig, v: &AddVisitorResult) -> Self[src]

Trait Implementations

impl<'de> Deserialize<'de> for Cache[src]

impl Handler<Cache> for HashCache[src]

cache a PoWConfig

+

type Result = MessageResult<Cache>

The type of value that this handler will return. Read more

+

impl Message for Cache[src]

type Result = CaptchaResult<()>

The type of value that this message will resolved with if it is +successful. Read more

+

impl Serialize for Cache[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/struct.CacheBuilder.html b/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/struct.CacheBuilder.html new file mode 100644 index 0000000..2361a21 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/struct.CacheBuilder.html @@ -0,0 +1,25 @@ +m_captcha::cache::messages::CacheBuilder - Rust + +

[][src]Struct m_captcha::cache::messages::CacheBuilder

pub struct CacheBuilder { /* fields omitted */ }

Builder for Cache.

+

Implementations

impl CacheBuilder[src]

pub fn string(&mut self, value: String) -> &mut Self[src]

pub fn difficulty_factor(&mut self, value: u32) -> &mut Self[src]

pub fn duration(&mut self, value: u64) -> &mut Self[src]

pub fn build(&self) -> Result<Cache, String>[src]

Builds a new Cache.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for CacheBuilder[src]

impl Default for CacheBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/struct.DeleteString.html b/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/struct.DeleteString.html new file mode 100644 index 0000000..a1e2c08 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/struct.DeleteString.html @@ -0,0 +1,21 @@ +m_captcha::cache::messages::DeleteString - Rust + +

[][src]Struct m_captcha::cache::messages::DeleteString

pub struct DeleteString(pub String);

Message to delete cached PoW difficulty factor and string +when they expire

+

Trait Implementations

impl Handler<DeleteString> for HashCache[src]

Delte a PoWConfig

+

type Result = MessageResult<DeleteString>

The type of value that this handler will return. Read more

+

impl Message for DeleteString[src]

type Result = CaptchaResult<()>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/struct.Retrive.html b/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/struct.Retrive.html new file mode 100644 index 0000000..2a0ae09 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/cache/messages/struct.Retrive.html @@ -0,0 +1,21 @@ +m_captcha::cache::messages::Retrive - Rust + +

[][src]Struct m_captcha::cache::messages::Retrive

pub struct Retrive(pub String);

Message to retrive the the difficulty factor for the specified +string from the cache

+

Trait Implementations

impl Handler<Retrive> for HashCache[src]

Retrive PoW difficulty_factor for a PoW string

+

type Result = MessageResult<Retrive>

The type of value that this handler will return. Read more

+

impl Message for Retrive[src]

type Result = CaptchaResult<Option<u32>>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/cache/sidebar-items.js b/api-docs/m_captcha/0.1.1/m_captcha/cache/sidebar-items.js new file mode 100644 index 0000000..d2c721a --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/cache/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["hashcache","In-memory cache implementation that uses [HashMap]"],["messages","Messages that can be sent to cache data structures implementing [Save][super::Save]"]],"trait":[["Save","Describes actor handler trait impls that are required by a cache implementation"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/cache/trait.Save.html b/api-docs/m_captcha/0.1.1/m_captcha/cache/trait.Save.html new file mode 100644 index 0000000..20e3e84 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/cache/trait.Save.html @@ -0,0 +1,5 @@ +m_captcha::cache::Save - Rust + +

[][src]Trait m_captcha::cache::Save

pub trait Save: Actor + Handler<Retrive> + Handler<Cache> + Handler<DeleteString> { }

Describes actor handler trait impls that are required by a cache implementation

+

Implementors

impl Save for HashCache[src]

Loading content...
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/defense/index.html b/api-docs/m_captcha/0.1.1/m_captcha/defense/index.html new file mode 100644 index 0000000..cba2223 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/defense/index.html @@ -0,0 +1,34 @@ +m_captcha::defense - Rust + +

[][src]Module m_captcha::defense

Defense datatypes

+ +
+use m_captcha::{LevelBuilder, DefenseBuilder};
+DefenseBuilder::default()
+       .add_level(
+           LevelBuilder::default()
+               .visitor_threshold(50)
+               .difficulty_factor(50)
+               .unwrap()
+               .build()
+               .unwrap(),
+       )
+       .unwrap()
+       .add_level(
+           LevelBuilder::default()
+               .visitor_threshold(500)
+               .difficulty_factor(500)
+               .unwrap()
+               .build()
+               .unwrap(),
+       )
+       .unwrap()
+       .build()
+       .unwrap();
+

Structs

+
Defense

struct describes all the different Levels at which an mCaptcha system operates

+
DefenseBuilder

Builder struct for Defense

+
Level

Level struct that describes threshold-difficulty factor mapping

+
LevelBuilder

Bulder struct for Level to describe threshold-difficulty factor mapping

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/defense/sidebar-items.js b/api-docs/m_captcha/0.1.1/m_captcha/defense/sidebar-items.js new file mode 100644 index 0000000..49f37fb --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/defense/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Defense","struct describes all the different [Level]s at which an mCaptcha system operates"],["DefenseBuilder","Builder struct for [Defense]"],["Level","Level struct that describes threshold-difficulty factor mapping"],["LevelBuilder","Bulder struct for [Level] to describe threshold-difficulty factor mapping"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/defense/struct.Defense.html b/api-docs/m_captcha/0.1.1/m_captcha/defense/struct.Defense.html new file mode 100644 index 0000000..5d7e384 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/defense/struct.Defense.html @@ -0,0 +1,38 @@ +m_captcha::defense::Defense - Rust + +

[][src]Struct m_captcha::defense::Defense

pub struct Defense { /* fields omitted */ }

struct describes all the different Levels at which an mCaptcha system operates

+

Implementations

impl Defense[src]

pub fn get_difficulty(&self) -> u32[src]

! Difficulty is calculated as: +! rust ! let difficulty = u128::max_value() - u128::max_value() / difficulty_factor; ! +! The higher the difficulty_factor, the higher the difficulty. +Get difficulty factor of current level of defense

+

pub fn tighten_up(&mut self)[src]

tighten up defense. Increases defense level by a factor of one. +When defense is at max level, calling this method will have no effect

+

pub fn loosen_up(&mut self)[src]

Loosen up defense. Decreases defense level by a factor of one. +When defense is at the lowest level, calling this method will have no effect.

+

pub fn max_defense(&mut self)[src]

Set defense to maximum level

+

pub fn min_defense(&mut self)[src]

Set defense to minimum level

+

pub fn visitor_threshold(&self) -> u32[src]

Get current level's visitor threshold

+

Trait Implementations

impl Clone for Defense[src]

impl Debug for Defense[src]

impl<'de> Deserialize<'de> for Defense[src]

impl PartialEq<Defense> for Defense[src]

impl Serialize for Defense[src]

impl StructuralPartialEq for Defense[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/defense/struct.DefenseBuilder.html b/api-docs/m_captcha/0.1.1/m_captcha/defense/struct.DefenseBuilder.html new file mode 100644 index 0000000..a9c926d --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/defense/struct.DefenseBuilder.html @@ -0,0 +1,28 @@ +m_captcha::defense::DefenseBuilder - Rust + +

[][src]Struct m_captcha::defense::DefenseBuilder

pub struct DefenseBuilder { /* fields omitted */ }

Builder struct for Defense

+

Implementations

impl DefenseBuilder[src]

pub fn add_level(&mut self, level: Level) -> CaptchaResult<&mut Self>[src]

add a level to Defense

+

pub fn build(&mut self) -> CaptchaResult<Defense>[src]

Build Defense

+

Trait Implementations

impl Clone for DefenseBuilder[src]

impl Debug for DefenseBuilder[src]

impl Default for DefenseBuilder[src]

impl PartialEq<DefenseBuilder> for DefenseBuilder[src]

impl StructuralPartialEq for DefenseBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/defense/struct.Level.html b/api-docs/m_captcha/0.1.1/m_captcha/defense/struct.Level.html new file mode 100644 index 0000000..7b3d146 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/defense/struct.Level.html @@ -0,0 +1,31 @@ +m_captcha::defense::Level - Rust + +

[][src]Struct m_captcha::defense::Level

pub struct Level {
+    pub visitor_threshold: u32,
+    pub difficulty_factor: u32,
+}

Level struct that describes threshold-difficulty factor mapping

+

+ Fields

visitor_threshold: u32difficulty_factor: u32

Trait Implementations

impl Clone for Level[src]

impl Copy for Level[src]

impl Debug for Level[src]

impl<'de> Deserialize<'de> for Level[src]

impl PartialEq<Level> for Level[src]

impl Serialize for Level[src]

impl StructuralPartialEq for Level[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/defense/struct.LevelBuilder.html b/api-docs/m_captcha/0.1.1/m_captcha/defense/struct.LevelBuilder.html new file mode 100644 index 0000000..1ad0d06 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/defense/struct.LevelBuilder.html @@ -0,0 +1,35 @@ +m_captcha::defense::LevelBuilder - Rust + +

[][src]Struct m_captcha::defense::LevelBuilder

pub struct LevelBuilder { /* fields omitted */ }

Bulder struct for Level to describe threshold-difficulty factor mapping

+

Implementations

impl LevelBuilder[src]

pub fn visitor_threshold(&mut self, visitor_threshold: u32) -> &mut Self[src]

set visitor count for level

+

pub fn difficulty_factor(
    &mut self,
    difficulty_factor: u32
) -> CaptchaResult<&mut Self>
[src]

set difficulty factor for level. difficulty_factor can't be zero because +Difficulty is calculated as:

+ +
+let difficulty_factor = 500;
+let difficulty = u128::max_value() - u128::max_value() / difficulty_factor;
+

the higher the difficulty_factor, the higher the difficulty.

+

pub fn build(&mut self) -> CaptchaResult<Level>[src]

build Level struct

+

Trait Implementations

impl Clone for LevelBuilder[src]

impl Copy for LevelBuilder[src]

impl Debug for LevelBuilder[src]

impl Default for LevelBuilder[src]

impl PartialEq<LevelBuilder> for LevelBuilder[src]

impl StructuralPartialEq for LevelBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/errors/enum.CaptchaError.html b/api-docs/m_captcha/0.1.1/m_captcha/errors/enum.CaptchaError.html new file mode 100644 index 0000000..691a883 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/errors/enum.CaptchaError.html @@ -0,0 +1,61 @@ +m_captcha::errors::CaptchaError - Rust + +

[][src]Enum m_captcha::errors::CaptchaError

pub enum CaptchaError {
+    LevelEmpty,
+    DifficultyFactorZero,
+    CaptchaDurationZero,
+    SetDifficultyFactor,
+    SetVisitorThreshold,
+    DuplicateVisitorCount,
+    DecreaseingDifficultyFactor,
+    MailboxError,
+    InsuffiencientDifficulty,
+    StringNotFound,
+    PleaseSetValue(String),
+}

Error datatype

+

+ Variants

+
LevelEmpty

When configuring m_captcha, DefenseBuilder +must be passed atleast one LevelConfig if not this error will arise

+
DifficultyFactorZero

Visitor count must be a whole number(zero and above). +When configuring m_captcha, LevelBuilder. +difficulty_factor must be set to greater than zero.

+
CaptchaDurationZero

captcha cooldown duration must be greater than 0

+
SetDifficultyFactor

Difficulty factor must be set

+
SetVisitorThreshold

Visitor threshold must be set

+
DuplicateVisitorCount

Visitor count must be Unique

+
DecreaseingDifficultyFactor

Difficulty factor should increase with level

+
MailboxError

Difficulty factor should increase with level

+
InsuffiencientDifficulty

Happens when submitted work doesn't satisfy the required +difficulty factor

+
StringNotFound

Happens when submitted work is computed over string that +isn't in cache

+
PleaseSetValue(String)

Used in builder structs when a value is not set

+

Trait Implementations

impl Clone for CaptchaError[src]

impl Debug for CaptchaError[src]

impl Display for CaptchaError[src]

impl Error for CaptchaError[src]

impl PartialEq<CaptchaError> for CaptchaError[src]

impl StructuralPartialEq for CaptchaError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/errors/index.html b/api-docs/m_captcha/0.1.1/m_captcha/errors/index.html new file mode 100644 index 0000000..ba16508 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/errors/index.html @@ -0,0 +1,9 @@ +m_captcha::errors - Rust + +

[][src]Module m_captcha::errors

Errors and Result module

+

Enums

+
CaptchaError

Error datatype

+

Type Definitions

+
CaptchaResult

Result datatype for m_captcha

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/errors/sidebar-items.js b/api-docs/m_captcha/0.1.1/m_captcha/errors/sidebar-items.js new file mode 100644 index 0000000..ddfbf69 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/errors/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["CaptchaError","Error datatype"]],"type":[["CaptchaResult","[Result] datatype for m_captcha"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/errors/type.CaptchaResult.html b/api-docs/m_captcha/0.1.1/m_captcha/errors/type.CaptchaResult.html new file mode 100644 index 0000000..42f90eb --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/errors/type.CaptchaResult.html @@ -0,0 +1,5 @@ +m_captcha::errors::CaptchaResult - Rust + +

[][src]Type Definition m_captcha::errors::CaptchaResult

type CaptchaResult<V> = Result<V, CaptchaError>;

Result datatype for m_captcha

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/index.html b/api-docs/m_captcha/0.1.1/m_captcha/index.html new file mode 100644 index 0000000..9c3b6d6 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/index.html @@ -0,0 +1,158 @@ +m_captcha - Rust + +

[][src]Crate m_captcha

mCaptcha is a proof of work based Denaial-of-Service attack protection system. +This is is a server library that you can embed in your services to protect your +servers.

+

A commercial managed solution is in the works but I'd much rather prefer +folks host their own instances as it will make the more decentralized and free.

+

In mCaptcha, defense is adjusted in discrete levels that depend on the +ammount of traffic that a service is experiencing. So users of this library are +requested to benchmark their target machines before configuring their mCaptcha +component.

+

Terminology:

+
    +
  • Difficulty(Factor): Minimum ammount of work that a client must do to make a valid +request.
  • +
  • Defense: A datatype that various visitor-difficulty mappigns
  • +
  • Visitor: Smallest unit of traffic, usually a single request. The more you have, the busier +your service is. Determines mCaptcha defense defense
  • +
  • Visitor threshold: The threshold at which MCaptcha will adjust defense defense
  • +
  • Cache : A datatype that implements Save. Used to store +PoW requirements to defend against replay attacks and dictionary attacks.
  • +
  • Master: A datatype that manages +MCaptcha actors. Works like a DNS for +AddVisitor messages.
  • +
  • System: mCaptcha system that manages cache, master and provides +useful abstractions. An mCaptcha system/instance can have only a single +System
  • +
+

Example:

+
+use m_captcha::{
+    cache::HashCache,
+    master::{AddSiteBuilder, Master},
+    pow::{ConfigBuilder, Work},
+    system::SystemBuilder,
+    DefenseBuilder, LevelBuilder, MCaptchaBuilder,
+};
+// traits from actix needs to be in scope for starting actor
+use actix::prelude::*;
+
+#[actix_rt::main]
+async fn main() -> std::io::Result<()> {
+    // start cahce actor
+    // cache is used to store PoW requirements that are sent to clients
+    // This way, it can be verified that the client computed work over a config
+    // that _we_ sent. Offers protection against rainbow tables powered dictionary attacks
+    let cache = HashCache::default().start();
+
+    // create PoW config with unique salt. Salt has to be safely guarded.
+    // salts protect us from replay attacks
+    let pow = ConfigBuilder::default()
+        .salt("myrandomsaltisnotlongenoug".into())
+        .build()
+        .unwrap();
+
+    // start master actor. Master actor is responsible for managing MCaptcha actors
+    // each mCaptcha system should have only one master
+    let master = Master::new(5).start();
+
+    // Create system. System encapsulates master and cache and provides useful abstraction
+    // each mCaptcha system should have only one system
+    let system = SystemBuilder::default()
+        .master(master)
+        .cache(cache)
+        .pow(pow.clone())
+        .build()
+        .unwrap();
+
+    // configure defense. This is a per site configuration. A site can have several levels
+    // of defenses configured
+    let defense = DefenseBuilder::default()
+        // add as many defense as you see fit
+        .add_level(
+            LevelBuilder::default()
+                // visitor_threshold is the threshold/limit at which
+                // mCaptcha will adjust difficulty defense
+                // it is advisable to set small values for the first
+                // defense visitor_threshold and difficulty_factor
+                // as this will be the work that clients will be
+                // computing when there's no load
+                .visitor_threshold(50)
+                .difficulty_factor(500)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .add_level(
+            LevelBuilder::default()
+                .visitor_threshold(5000)
+                .difficulty_factor(50000)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .build()
+        .unwrap();
+
+    // create and start MCaptcha actor that uses the above defense configuration
+    // This is what manages the difficulty factor of sites that an mCaptcha protects
+    let mcaptcha = MCaptchaBuilder::default()
+        .defense(defense)
+        // leaky bucket algorithm's emission interval
+        .duration(30)
+        //   .cache(cache)
+        .build()
+        .unwrap()
+        .start();
+
+    // unique value identifying an MCaptcha actor
+    let mcaptcha_name = "batsense.net";
+
+    // add MCaptcha to Master
+    let msg = AddSiteBuilder::default()
+        .id(mcaptcha_name.into())
+        .addr(mcaptcha.clone())
+        .build()
+        .unwrap();
+    system.master.send(msg).await.unwrap();
+
+    // Get PoW config. Should be called everytime there's a visitor for a
+    // managed site(here mcaptcha_name)
+    let work_req = system.get_pow(mcaptcha_name.into()).await.unwrap();
+
+    // the following computation should be done on the client but for the purpose
+    // of this illustration, we are going to do it on the server it self
+    let work = pow
+        .prove_work(&work_req.string, work_req.difficulty_factor)
+        .unwrap();
+
+    // the payload that the client sends to the server
+    let payload = Work {
+        string: work_req.string,
+        result: work.result,
+        nonce: work.nonce,
+    };
+
+    // Server evaluates client's work. Returns true if everything
+    // checksout and Err() if something fishy is happening
+    let res = system.verify_pow(payload.clone()).await.unwrap();
+    assert!(res);
+
+    Ok(())
+}
+

Re-exports

+
pub use crate::cache::hashcache::HashCache;
pub use defense::Defense;
pub use defense::DefenseBuilder;
pub use defense::LevelBuilder;
pub use mcaptcha::MCaptcha;
pub use mcaptcha::MCaptchaBuilder;

Modules

+
cache

message datatypes to interact with MCaptcha actor +Cache is used to save proofof work details and nonces to prevent replay attacks +and rainbow/dictionary attacks

+
defense

Defense datatypes

+
errors

Errors and Result module

+
master

Master actor module that manages MCaptcha actors

+
mcaptcha

MCaptcha actor module that manages defense levels

+
pow

PoW datatypes used in client-server interaction

+
system

module describing mCaptcha system

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/master/index.html b/api-docs/m_captcha/0.1.1/m_captcha/master/index.html new file mode 100644 index 0000000..8d1c165 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/master/index.html @@ -0,0 +1,15 @@ +m_captcha::master - Rust + +

[][src]Module m_captcha::master

Master actor module that manages MCaptcha actors

+

Structs

+
AddSite

Message to add an MCaptcha actor to Master

+
AddSiteBuilder

Builder for AddSite.

+
CleanUp

Message to clean up master of MCaptcha actors with zero visitor count

+
GetSite

Message to get an MCaptcha actor from master

+
Master

This Actor manages the MCaptcha actors. +A service can have several MCaptcha actors with +varying Defense configurations +so a "master" actor is needed to manage them all

+
RemoveSite

Message to delete MCaptcha actor

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/master/sidebar-items.js b/api-docs/m_captcha/0.1.1/m_captcha/master/sidebar-items.js new file mode 100644 index 0000000..c5ff518 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/master/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["AddSite","Message to add an [MCaptcha] actor to [Master]"],["AddSiteBuilder","Builder for `AddSite`."],["CleanUp","Message to clean up master of [MCaptcha] actors with zero visitor count"],["GetSite","Message to get an [MCaptcha] actor from master"],["Master","This Actor manages the [MCaptcha] actors. A service can have several [MCaptcha] actors with varying [Defense][crate::defense::Defense] configurations so a \"master\" actor is needed to manage them all"],["RemoveSite","Message to delete [MCaptcha] actor"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/master/struct.AddSite.html b/api-docs/m_captcha/0.1.1/m_captcha/master/struct.AddSite.html new file mode 100644 index 0000000..a4ec85e --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/master/struct.AddSite.html @@ -0,0 +1,23 @@ +m_captcha::master::AddSite - Rust + +

[][src]Struct m_captcha::master::AddSite

pub struct AddSite {
+    pub id: String,
+    pub addr: Addr<MCaptcha>,
+}

Message to add an MCaptcha actor to Master

+

+ Fields

id: Stringaddr: Addr<MCaptcha>

Trait Implementations

impl Handler<AddSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Message for AddSite[src]

type Result = ()

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/master/struct.AddSiteBuilder.html b/api-docs/m_captcha/0.1.1/m_captcha/master/struct.AddSiteBuilder.html new file mode 100644 index 0000000..7528487 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/master/struct.AddSiteBuilder.html @@ -0,0 +1,25 @@ +m_captcha::master::AddSiteBuilder - Rust + +

[][src]Struct m_captcha::master::AddSiteBuilder

pub struct AddSiteBuilder { /* fields omitted */ }

Builder for AddSite.

+

Implementations

impl AddSiteBuilder[src]

pub fn id(&mut self, value: String) -> &mut Self[src]

pub fn addr(&mut self, value: Addr<MCaptcha>) -> &mut Self[src]

pub fn build(&self) -> Result<AddSite, String>[src]

Builds a new AddSite.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for AddSiteBuilder[src]

impl Default for AddSiteBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/master/struct.CleanUp.html b/api-docs/m_captcha/0.1.1/m_captcha/master/struct.CleanUp.html new file mode 100644 index 0000000..5b668b6 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/master/struct.CleanUp.html @@ -0,0 +1,19 @@ +m_captcha::master::CleanUp - Rust + +

[][src]Struct m_captcha::master::CleanUp

pub struct CleanUp;

Message to clean up master of MCaptcha actors with zero visitor count

+

Trait Implementations

impl Handler<CleanUp> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Message for CleanUp[src]

type Result = ()

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/master/struct.GetSite.html b/api-docs/m_captcha/0.1.1/m_captcha/master/struct.GetSite.html new file mode 100644 index 0000000..b20cb68 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/master/struct.GetSite.html @@ -0,0 +1,19 @@ +m_captcha::master::GetSite - Rust + +

[][src]Struct m_captcha::master::GetSite

pub struct GetSite(pub String);

Message to get an MCaptcha actor from master

+

Trait Implementations

impl Handler<GetSite> for Master[src]

type Result = MessageResult<GetSite>

The type of value that this handler will return. Read more

+

impl Message for GetSite[src]

type Result = Option<Addr<MCaptcha>>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/master/struct.Master.html b/api-docs/m_captcha/0.1.1/m_captcha/master/struct.Master.html new file mode 100644 index 0000000..0543e39 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/master/struct.Master.html @@ -0,0 +1,46 @@ +m_captcha::master::Master - Rust + +

[][src]Struct m_captcha::master::Master

pub struct Master { /* fields omitted */ }

This Actor manages the MCaptcha actors. +A service can have several MCaptcha actors with +varying Defense configurations +so a "master" actor is needed to manage them all

+

Implementations

impl Master[src]

pub fn add_site(&mut self, details: AddSite)[src]

add MCaptcha actor to Master

+

pub fn new(gc: u64) -> Self[src]

create new master +accepts a u64 to configure garbage collection period

+

pub fn get_site<'a, 'b>(&'a mut self, id: &'b str) -> Option<Addr<MCaptcha>>[src]

get MCaptcha actor from Master

+

pub fn rm_site(&mut self, id: &str)[src]

remvoes MCaptcha actor from Master

+

Trait Implementations

impl Actor for Master[src]

type Context = Context<Self>

Actor execution context type

+

impl Clone for Master[src]

impl Handler<AddSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Handler<CleanUp> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Handler<GetSite> for Master[src]

type Result = MessageResult<GetSite>

The type of value that this handler will return. Read more

+

impl Handler<RemoveSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/master/struct.RemoveSite.html b/api-docs/m_captcha/0.1.1/m_captcha/master/struct.RemoveSite.html new file mode 100644 index 0000000..6ca58be --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/master/struct.RemoveSite.html @@ -0,0 +1,19 @@ +m_captcha::master::RemoveSite - Rust + +

[][src]Struct m_captcha::master::RemoveSite

pub struct RemoveSite(pub String);

Message to delete MCaptcha actor

+

Trait Implementations

impl Handler<RemoveSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Message for RemoveSite[src]

type Result = ()

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/index.html b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/index.html new file mode 100644 index 0000000..1c43ef6 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/index.html @@ -0,0 +1,69 @@ +m_captcha::mcaptcha - Rust + +

[][src]Module m_captcha::mcaptcha

MCaptcha actor module that manages defense levels

+

Usage:

+
+use m_captcha::{mcaptcha::AddVisitor, MCaptchaBuilder, cache::HashCache, LevelBuilder, DefenseBuilder};
+// traits from actix needs to be in scope for starting actor
+use actix::prelude::*;
+
+#[actix_rt::main]
+async fn main() -> std::io::Result<()> {
+    // configure defense
+    let defense = DefenseBuilder::default()
+        // add as many levels as you see fit
+        .add_level(
+            LevelBuilder::default()
+                // visitor_threshold is the threshold/limit at which
+                // mCaptcha will adjust difficulty levels
+                // it is advisable to set small values for the first
+                // levels visitor_threshold and difficulty_factor
+                // as this will be the work that clients will be
+                // computing when there's no load
+                .visitor_threshold(50)
+                .difficulty_factor(500)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .add_level(
+            LevelBuilder::default()
+                .visitor_threshold(5000)
+                .difficulty_factor(50000)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .build()
+        .unwrap();
+
+    // create and start MCaptcha actor
+    //let cache = HashCache::default().start();
+    let mcaptcha = MCaptchaBuilder::default()
+        .defense(defense)
+        // leaky bucket algorithm's emission interval
+        .duration(30)
+        .build()
+        .unwrap()
+        .start();
+
+    // increment count when user visits protected routes
+    mcaptcha.send(AddVisitor).await.unwrap();
+
+    Ok(())
+}
+

Structs

+
AddVisitor

Message to increment the visitor count +returns difficulty factor and lifetime

+
AddVisitorResult

Struct representing the return datatime of +AddVisitor message. Contains MCaptcha lifetime +and difficulty factor

+
GetCurrentVisitorCount

Message to get the visitor count

+
MCaptcha

This struct represents the mCaptcha state and is used +to configure leaky-bucket lifetime and manage defense

+
MCaptchaBuilder

Builder for MCaptcha

+
Stop

Message to stop MCaptcha

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/sidebar-items.js b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/sidebar-items.js new file mode 100644 index 0000000..a4685eb --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["AddVisitor","Message to increment the visitor count returns difficulty factor and lifetime"],["AddVisitorResult","Struct representing the return datatime of [AddVisitor] message. Contains MCaptcha lifetime and difficulty factor"],["GetCurrentVisitorCount","Message to get the visitor count"],["MCaptcha","This struct represents the mCaptcha state and is used to configure leaky-bucket lifetime and manage defense"],["MCaptchaBuilder","Builder for [MCaptcha]"],["Stop","Message to stop [MCaptcha]"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.AddVisitor.html b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.AddVisitor.html new file mode 100644 index 0000000..2f6a7f4 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.AddVisitor.html @@ -0,0 +1,20 @@ +m_captcha::mcaptcha::AddVisitor - Rust + +

[][src]Struct m_captcha::mcaptcha::AddVisitor

pub struct AddVisitor;

Message to increment the visitor count +returns difficulty factor and lifetime

+

Trait Implementations

impl Handler<AddVisitor> for MCaptcha[src]

type Result = MessageResult<AddVisitor>

The type of value that this handler will return. Read more

+

impl Message for AddVisitor[src]

type Result = AddVisitorResult

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.AddVisitorResult.html b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.AddVisitorResult.html new file mode 100644 index 0000000..3844c21 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.AddVisitorResult.html @@ -0,0 +1,30 @@ +m_captcha::mcaptcha::AddVisitorResult - Rust + +

[][src]Struct m_captcha::mcaptcha::AddVisitorResult

pub struct AddVisitorResult {
+    pub duration: u64,
+    pub difficulty_factor: u32,
+}

Struct representing the return datatime of +AddVisitor message. Contains MCaptcha lifetime +and difficulty factor

+

+ Fields

duration: u64difficulty_factor: u32

Trait Implementations

impl Clone for AddVisitorResult[src]

impl Debug for AddVisitorResult[src]

impl<'de> Deserialize<'de> for AddVisitorResult[src]

impl Serialize for AddVisitorResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.GetCurrentVisitorCount.html b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.GetCurrentVisitorCount.html new file mode 100644 index 0000000..0c2ff38 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.GetCurrentVisitorCount.html @@ -0,0 +1,19 @@ +m_captcha::mcaptcha::GetCurrentVisitorCount - Rust + +

[][src]Struct m_captcha::mcaptcha::GetCurrentVisitorCount

pub struct GetCurrentVisitorCount;

Message to get the visitor count

+

Trait Implementations

impl Handler<GetCurrentVisitorCount> for MCaptcha[src]

type Result = MessageResult<GetCurrentVisitorCount>

The type of value that this handler will return. Read more

+

impl Message for GetCurrentVisitorCount[src]

type Result = u32

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.MCaptcha.html b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.MCaptcha.html new file mode 100644 index 0000000..9a59f74 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.MCaptcha.html @@ -0,0 +1,44 @@ +m_captcha::mcaptcha::MCaptcha - Rust + +

[][src]Struct m_captcha::mcaptcha::MCaptcha

pub struct MCaptcha { /* fields omitted */ }

This struct represents the mCaptcha state and is used +to configure leaky-bucket lifetime and manage defense

+

Implementations

impl MCaptcha[src]

pub fn add_visitor(&mut self)[src]

increments the visitor count by one

+

pub fn decrement_visitor(&mut self)[src]

decrements the visitor count by one

+

pub fn get_difficulty(&self) -> u32[src]

get current difficulty factor

+

pub fn get_duration(&self) -> u64[src]

get MCaptcha's lifetime

+

Trait Implementations

impl Actor for MCaptcha[src]

type Context = Context<Self>

Actor execution context type

+

impl Clone for MCaptcha[src]

impl Debug for MCaptcha[src]

impl<'de> Deserialize<'de> for MCaptcha[src]

impl Handler<AddVisitor> for MCaptcha[src]

type Result = MessageResult<AddVisitor>

The type of value that this handler will return. Read more

+

impl Handler<GetCurrentVisitorCount> for MCaptcha[src]

type Result = MessageResult<GetCurrentVisitorCount>

The type of value that this handler will return. Read more

+

impl Handler<Stop> for MCaptcha[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Serialize for MCaptcha[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.MCaptchaBuilder.html b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.MCaptchaBuilder.html new file mode 100644 index 0000000..b347e7e --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.MCaptchaBuilder.html @@ -0,0 +1,28 @@ +m_captcha::mcaptcha::MCaptchaBuilder - Rust + +

[][src]Struct m_captcha::mcaptcha::MCaptchaBuilder

pub struct MCaptchaBuilder { /* fields omitted */ }

Builder for MCaptcha

+

Implementations

impl MCaptchaBuilder[src]

pub fn defense(&mut self, d: Defense) -> &mut Self[src]

set defense

+

pub fn duration(&mut self, d: u64) -> &mut Self[src]

set duration

+

pub fn build(&mut self) -> CaptchaResult<MCaptcha>[src]

Builds new MCaptcha

+

Trait Implementations

impl Clone for MCaptchaBuilder[src]

impl Debug for MCaptchaBuilder[src]

impl Default for MCaptchaBuilder[src]

impl<'de> Deserialize<'de> for MCaptchaBuilder[src]

impl Serialize for MCaptchaBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.Stop.html b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.Stop.html new file mode 100644 index 0000000..26803b4 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.Stop.html @@ -0,0 +1,19 @@ +m_captcha::mcaptcha::Stop - Rust + +

[][src]Struct m_captcha::mcaptcha::Stop

pub struct Stop;

Message to stop MCaptcha

+

Trait Implementations

impl Handler<Stop> for MCaptcha[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Message for Stop[src]

type Result = ()

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.Visitor.html b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.Visitor.html new file mode 100644 index 0000000..fa6516e --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.Visitor.html @@ -0,0 +1,20 @@ +m_captcha::mcaptcha::Visitor - Rust + +

[][src]Struct m_captcha::mcaptcha::Visitor

pub struct Visitor;

Message to increment the visitor count +returns difficulty factor and lifetime

+

Trait Implementations

impl Handler<Visitor> for MCaptcha[src]

type Result = MessageResult<Visitor>

The type of value that this handler will return. Read more

+

impl Message for Visitor[src]

type Result = VisitorResult

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.VisitorResult.html b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.VisitorResult.html new file mode 100644 index 0000000..8dc6f93 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/mcaptcha/struct.VisitorResult.html @@ -0,0 +1,21 @@ +m_captcha::mcaptcha::VisitorResult - Rust + +

[][src]Struct m_captcha::mcaptcha::VisitorResult

pub struct VisitorResult {
+    pub duration: u64,
+    pub difficulty_factor: u32,
+}

Struct representing the return datatime of +Visitor message. Contains MCaptcha lifetime +and difficulty factor

+

+ Fields

duration: u64difficulty_factor: u32

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/pow/index.html b/api-docs/m_captcha/0.1.1/m_captcha/pow/index.html new file mode 100644 index 0000000..e175a5b --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/pow/index.html @@ -0,0 +1,9 @@ +m_captcha::pow - Rust + +

[][src]Module m_captcha::pow

PoW datatypes used in client-server interaction

+

Structs

+
ConfigBuilder

Builder for Config.

+
PoWConfig

PoW requirement datatype that is be sent to clients for generating PoW

+
Work

PoW datatype that clients send to server

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/pow/sidebar-items.js b/api-docs/m_captcha/0.1.1/m_captcha/pow/sidebar-items.js new file mode 100644 index 0000000..66a8cb8 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/pow/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["ConfigBuilder","Builder for `Config`."],["PoWConfig","PoW requirement datatype that is be sent to clients for generating PoW"],["Work","PoW datatype that clients send to server"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/pow/struct.ConfigBuilder.html b/api-docs/m_captcha/0.1.1/m_captcha/pow/struct.ConfigBuilder.html new file mode 100644 index 0000000..ace8116 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/pow/struct.ConfigBuilder.html @@ -0,0 +1,25 @@ +m_captcha::pow::ConfigBuilder - Rust + +

[]Struct m_captcha::pow::ConfigBuilder

pub struct ConfigBuilder { /* fields omitted */ }

Builder for Config.

+

Implementations

impl ConfigBuilder

pub fn salt(&mut self, value: String) -> &mut ConfigBuilder

pub fn build(&self) -> Result<Config, String>

Builds a new Config.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for ConfigBuilder

impl Default for ConfigBuilder

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/pow/struct.PoWConfig.html b/api-docs/m_captcha/0.1.1/m_captcha/pow/struct.PoWConfig.html new file mode 100644 index 0000000..61b4e1c --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/pow/struct.PoWConfig.html @@ -0,0 +1,29 @@ +m_captcha::pow::PoWConfig - Rust + +

[][src]Struct m_captcha::pow::PoWConfig

pub struct PoWConfig {
+    pub string: String,
+    pub difficulty_factor: u32,
+}

PoW requirement datatype that is be sent to clients for generating PoW

+

+ Fields

string: Stringdifficulty_factor: u32

Implementations

impl PoWConfig[src]

pub fn new(m: u32) -> Self[src]

create new instance of PoWConfig

+

Trait Implementations

impl Clone for PoWConfig[src]

impl Debug for PoWConfig[src]

impl<'de> Deserialize<'de> for PoWConfig[src]

impl Serialize for PoWConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/pow/struct.Work.html b/api-docs/m_captcha/0.1.1/m_captcha/pow/struct.Work.html new file mode 100644 index 0000000..bea7016 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/pow/struct.Work.html @@ -0,0 +1,30 @@ +m_captcha::pow::Work - Rust + +

[][src]Struct m_captcha::pow::Work

pub struct Work {
+    pub string: String,
+    pub result: String,
+    pub nonce: u64,
+}

PoW datatype that clients send to server

+

+ Fields

string: Stringresult: Stringnonce: u64

Trait Implementations

impl Clone for Work[src]

impl Debug for Work[src]

impl<'de> Deserialize<'de> for Work[src]

impl From<Work> for PoW<String>[src]

impl Serialize for Work[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/sidebar-items.js b/api-docs/m_captcha/0.1.1/m_captcha/sidebar-items.js new file mode 100644 index 0000000..454ab30 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["cache","message datatypes to interact with [MCaptcha] actor Cache is used to save proofof work details and nonces to prevent replay attacks and rainbow/dictionary attacks"],["defense","Defense datatypes"],["errors","Errors and Result module"],["master","[Master] actor module that manages [MCaptcha] actors"],["mcaptcha","MCaptcha actor module that manages defense levels"],["pow","PoW datatypes used in client-server interaction"],["system","module describing mCaptcha system"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/system/index.html b/api-docs/m_captcha/0.1.1/m_captcha/system/index.html new file mode 100644 index 0000000..f140da0 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/system/index.html @@ -0,0 +1,8 @@ +m_captcha::system - Rust + +

[][src]Module m_captcha::system

module describing mCaptcha system

+

Structs

+
System

struct describing various bits of data required for an mCaptcha system

+
SystemBuilder

Builder for System.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/system/sidebar-items.js b/api-docs/m_captcha/0.1.1/m_captcha/system/sidebar-items.js new file mode 100644 index 0000000..61ff7ad --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/system/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["System","struct describing various bits of data required for an mCaptcha system"],["SystemBuilder","Builder for `System`."]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/system/struct.System.html b/api-docs/m_captcha/0.1.1/m_captcha/system/struct.System.html new file mode 100644 index 0000000..a356d3b --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/system/struct.System.html @@ -0,0 +1,27 @@ +m_captcha::system::System - Rust + +

[][src]Struct m_captcha::system::System

pub struct System<T: Save> {
+    pub master: Addr<Master>,
+    // some fields omitted
+}

struct describing various bits of data required for an mCaptcha system

+

+ Fields

master: Addr<Master>

Implementations

impl<T> System<T> where
    T: Save,
    <T as Actor>::Context: ToEnvelope<T, Cache> + ToEnvelope<T, Retrive>, 
[src]

pub async fn get_pow(&self, id: String) -> Option<PoWConfig>[src]

utility function to get difficulty factor of site id and cache it

+

pub async fn verify_pow(&self, work: Work) -> CaptchaResult<bool>[src]

utility function to verify Work

+

Trait Implementations

impl<T: Clone + Save> Clone for System<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for System<T>[src]

impl<T> Send for System<T>[src]

impl<T> Sync for System<T>[src]

impl<T> Unpin for System<T>[src]

impl<T> !UnwindSafe for System<T>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/m_captcha/system/struct.SystemBuilder.html b/api-docs/m_captcha/0.1.1/m_captcha/system/struct.SystemBuilder.html new file mode 100644 index 0000000..77b054d --- /dev/null +++ b/api-docs/m_captcha/0.1.1/m_captcha/system/struct.SystemBuilder.html @@ -0,0 +1,25 @@ +m_captcha::system::SystemBuilder - Rust + +

[][src]Struct m_captcha::system::SystemBuilder

pub struct SystemBuilder<T: Save> { /* fields omitted */ }

Builder for System.

+

Implementations

impl<T: Save + Clone> SystemBuilder<T>[src]

pub fn master(&mut self, value: Addr<Master>) -> &mut Self[src]

pub fn cache(&mut self, value: Addr<T>) -> &mut Self[src]

pub fn pow(&mut self, value: Config) -> &mut Self[src]

pub fn build(&self) -> Result<System<T>, String>[src]

Builds a new System.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl<T: Clone + Save> Clone for SystemBuilder<T>[src]

impl<T: Default + Save> Default for SystemBuilder<T>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/main.js b/api-docs/m_captcha/0.1.1/main.js new file mode 100644 index 0000000..03cfb2c --- /dev/null +++ b/api-docs/m_captcha/0.1.1/main.js @@ -0,0 +1,8 @@ +if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}function getSearchInput(){return document.getElementsByClassName("search-input")[0]}function getSearchElement(){return document.getElementById("search")}function getThemesElement(){return document.getElementById("theme-choices")}function getThemePickerElement(){return document.getElementById("theme-picker")}function focusSearchBar(){getSearchInput().focus()}function defocusSearchBar(){getSearchInput().blur()}(function(){"use strict";var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var disableShortcuts=getSettingValue("disable-shortcuts")==="true";var search_input=getSearchInput();var searchTimeout=null;var toggleAllDocsId="toggle-all-docs";var currentTab=0;var mouseMovedAfterSearch=true;var titleBeforeSearch=document.title;var searchTitle=null;function clearInputTimeout(){if(searchTimeout!==null){clearTimeout(searchTimeout);searchTimeout=null}}function getPageId(){if(window.location.hash){var tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}function showSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(main,"hidden");removeClass(search,"hidden");mouseMovedAfterSearch=false;document.title=searchTitle}function hideSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=titleBeforeSearch}var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function getQueryStringParams(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function isHidden(elem){return elem.offsetHeight===0}var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=getSearchElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){hideSearchResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(hash,"","?search=#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}elem=document.getElementById(savedHash.slice(1));if(!elem||!isHidden(elem)){return}var parent=elem.parentNode;if(parent&&hasClass(parent,"impl-items")){onEachLazy(parent.getElementsByClassName("collapsed"),function(e){if(e.parentNode===parent){e.click();return true}});if(isHidden(elem)){if(hasClass(parent.lastElementChild,"collapse-toggle")){parent.lastElementChild.click()}}}}}function highlightSourceLines(match,ev){if(typeof match==="undefined"){hideSidebar();match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to0){collapseDocs(collapses[0],"show")}}}}function getHelpElement(){buildHelperPopup();return document.getElementById("help")}function displayHelp(display,ev,help){help=help?help:getHelpElement();if(display===true){if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else if(hasClass(help,"hidden")===false){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}function handleEscape(ev){var help=getHelpElement();var search=getSearchElement();if(hasClass(help,"hidden")===false){displayHelp(false,ev,help)}else if(hasClass(search,"hidden")===false){clearInputTimeout();ev.preventDefault();hideSearchResults(search)}defocusSearchBar();hideThemeButtonState()}function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts===true){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();focusSearchBar();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:var themePicker=getThemePickerElement();if(themePicker.parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!=="theme-picker"){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!=="theme-picker"){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id==="theme-picker"&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}function findParentElement(elem,tagName){do{if(elem&&elem.tagName===tagName){return elem}elem=elem.parentNode}while(elem);return null}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function resetMouseMoved(ev){mouseMovedAfterSearch=true}document.addEventListener("mousemove",resetMouseMoved);var handleSourceHighlight=(function(){var prev_line_id=0;var set_fragment=function(name){var x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return function(ev){var cur_line_id=parseInt(ev.target.id,10);ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());document.addEventListener("click",function(ev){if(hasClass(ev.target,"help-button")){displayHelp(true,ev)}else if(hasClass(ev.target,"collapse-toggle")){collapseDocs(ev.target,"toggle")}else if(hasClass(ev.target.parentNode,"collapse-toggle")){collapseDocs(ev.target.parentNode,"toggle")}else if(ev.target.tagName==="SPAN"&&hasClass(ev.target.parentNode,"line-numbers")){handleSourceHighlight(ev)}else if(hasClass(getHelpElement(),"hidden")===false){var help=getHelpElement();var is_inside_help_popup=ev.target!==help&&help.contains(ev.target);if(is_inside_help_popup===false){addClass(help,"hidden");removeClass(document.body,"blur")}}else{var a=findParentElement(ev.target,"A");if(a&&a.hash){expandSection(a.hash.replace(/^#/,""))}}});(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=rootPath.match(/\.\.\//g).length+1;for(i=0;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;if(isType!==true||obj.type){var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnProperty(results,entry)){ar.push(results[entry])}}results=ar;var i;var nresults=results.length;for(i=0;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});var length=results.length;for(i=0;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function getObjectFromId(id){if(typeof id==="number"){return searchIndex[id]}return{'name':id}}function checkGenerics(obj,val){var lev_distance=MAX_LEV_DISTANCE+1;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var total=0;var done=0;var vlength=val.generics.length;for(var y=0;yGENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var allFound=true;for(var y=0;allFound===true&&yGENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch===true){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var length=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(aborted===false){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function generateId(ty){if(ty.parent&&ty.parent.name){return itemTypes[ty.ty]+ty.path+ty.parent.name+ty.name}return itemTypes[ty.ty]+ty.path+ty.name}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];var i;if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){for(i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i;var ty;var fullId;var returned;var in_args;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0;i1?paths.length-1:1);var lev;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=generateId(ty);if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||searchWords[j].replace(/_/g,"").indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=searchWords[j].replace(/_/g,"").indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){lev=MAX_LEV_DISTANCE+1}else{lev+=1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function initSearchNav(){var hoverTimeout;var click_func=function(e){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}var dst=e.target.getElementsByTagName("a");if(dst.length<1){return}dst=dst[0];if(window.location.pathname===dst.pathname){hideSearchResults();document.location.href=dst.href}};var mouseover_func=function(e){if(mouseMovedAfterSearch){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}clearTimeout(hoverTimeout);hoverTimeout=setTimeout(function(){onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){removeClass(i_e,"highlighted")})});addClass(el,"highlighted")},20)}};onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){i_e.onclick=click_func;i_e.onmouseover=mouseover_func})});search_input.onkeydown=function(e){var actives=[[],[],[]];var current=0;onEachLazy(document.getElementById("results").childNodes,function(e){onEachLazy(e.getElementsByClassName("highlighted"),function(h_e){actives[current].push(h_e)});current+=1});if(e.which===38){if(e.ctrlKey){printTab(currentTab>0?currentTab-1:2)}else{if(!actives[currentTab].length||!actives[currentTab][0].previousElementSibling){return}addClass(actives[currentTab][0].previousElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===40){if(e.ctrlKey){printTab(currentTab>1?0:currentTab+1)}else if(!actives[currentTab].length){var results=document.getElementById("results").childNodes;if(results.length>0){var res=results[currentTab].getElementsByClassName("result");if(res.length>0){addClass(res[0],"highlighted")}}}else if(actives[currentTab][0].nextElementSibling){addClass(actives[currentTab][0].nextElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===13){if(actives[currentTab].length){document.location.href=actives[currentTab][0].getElementsByTagName("a")[0].href}}else if(e.which===16){}else if(actives[currentTab].length>0){removeClass(actives[currentTab][0],"highlighted")}}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var splitPath=item.path.split("::");var enumName=splitPath.pop();path=splitPath.join("::");displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraStyle="";if(display===false){extraStyle=" style=\"display: none;\""}var output="";var duplicates={};var length=0;if(array.length>0){output="";array.forEach(function(item){var name,type;name=item.name;type=itemTypes[item.ty];if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}length+=1;output+=""});output+="
"+""+(item.is_alias===true?(""+item.alias+"  - see "):"")+item.displayPath+""+name+""+""+""+item.desc+" 
"}else{output="
No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:
"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(currentTab===tabNb){return""}return""}function showResults(results){var search=getSearchElement();if(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==getSearchLoadingText())){var elem=document.createElement("a");elem.href=results.others[0].href;elem.style.display="none";document.body.appendChild(elem);elem.click();return}var query=getQuery(search_input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var output="

Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"+ret_others[0]+ret_in_args[0]+ret_returned[0]+"
";search.innerHTML=output;showSearchResults(search);var tds=search.getElementsByTagName("td");var td_width=0;if(tds.length>0){td_width=tds[0].offsetWidth}var width=search.offsetWidth-40-td_width;onEachLazy(search.getElementsByClassName("desc"),function(e){e.style.width=width+"px"});initSearchNav();var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnProperty(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=getQueryStringParams();var query=getQuery(search_input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(forced!==true&&query.id===currentResults){if(query.query.length>0){putBackSearch(search_input)}return}searchTitle="Results for "+query.query+" - Rust";if(browserSupportsHistoryApi()){if(!history.state&&!params.search){history.pushState(query,"","?search="+encodeURIComponent(query.raw))}else{history.replaceState(query,"","?search="+encodeURIComponent(query.raw))}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates))}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i;var currentIndex=0;for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);searchIndex.push({crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,type:null,});currentIndex+=1;var items=rawSearchIndex[crate].i;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i0){search_input.value=params.search;search(e)}else{search_input.value="";hideSearchResults()}})}search()}index=buildIndex(rawSearchIndex);startSearch();if(rootPath==="../"||rootPath==="./"){var sidebar=document.getElementsByClassName("sidebar-elems")[0];if(sidebar){var div=document.createElement("div");div.className="block crate";div.innerHTML="

Crates

";var ul=document.createElement("ul");div.appendChild(ul);var crates=[];for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}crates.push(crate)}crates.sort();for(var i=0;i','`').replace('','`');return x.innerText}window.initSidebarItems=function(items){var sidebar=document.getElementsByClassName("sidebar-elems")[0];var current=window.sidebarCurrent;function block(shortty,longty){var filtered=items[shortty];if(!filtered){return}var div=document.createElement("div");div.className="block "+shortty;var h3=document.createElement("h3");h3.textContent=longty;div.appendChild(h3);var ul=document.createElement("ul");var length=filtered.length;for(var i=0;i"+""+"
"+code.outerHTML+"
";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function onEveryMatchingChild(elem,className,func){if(elem&&className&&func){var length=elem.childNodes.length;var nodes=elem.childNodes;for(var i=0;i"+labelForToggleButton(sectionIsCollapsed)+"
]";return toggle}function createToggle(toggle,otherMessage,fontSize,extraClass,show){var span=document.createElement("span");span.className="toggle-label";if(show){span.style.display="none"}if(!otherMessage){span.innerHTML=" Expand description"}else{span.innerHTML=otherMessage}if(fontSize){span.style.fontSize=fontSize}var mainToggle=toggle.cloneNode(true);mainToggle.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper";if(!show){addClass(wrapper,"collapsed");var inner=mainToggle.getElementsByClassName("inner");if(inner&&inner.length>0){inner[0].innerHTML="+"}}if(extraClass){addClass(wrapper,extraClass)}wrapper.appendChild(mainToggle);return wrapper}(function(){var toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}var toggle=createSimpleToggle(false);var hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";var hideImplementors=getSettingValue("auto-collapse-implementors")!=="false";var pageId=getPageId();var func=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(!next){return}if(hasClass(next,"docblock")){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideMethodDocs===true&&hasClass(e,"method")===true){collapseDocs(newToggle,"hide",pageId)}}};var funcImpl=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(next&&hasClass(next,"docblock")){next=next.nextElementSibling}if(!next){return}if(hasClass(e,"impl")&&(next.getElementsByClassName("method").length>0||next.getElementsByClassName("associatedconstant").length>0)){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideImplementors===true&&e.parentNode.id==="implementors-list"){collapseDocs(newToggle,"hide",pageId)}}};onEachLazy(document.getElementsByClassName("method"),func);onEachLazy(document.getElementsByClassName("associatedconstant"),func);onEachLazy(document.getElementsByClassName("impl"),funcImpl);var impl_call=function(){};if(hideMethodDocs===true){impl_call=function(e,newToggle){if(e.id.match(/^impl(?:-\d+)?$/)===null){if(hasClass(e,"impl")===true){collapseDocs(newToggle,"hide",pageId)}}}}var newToggle=document.createElement("a");newToggle.href="javascript:void(0)";newToggle.className="collapse-toggle hidden-default collapsed";newToggle.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items";function toggleClicked(){if(hasClass(this,"collapsed")){removeClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("hidden"),function(x){if(hasClass(x,"content")===false){removeClass(x,"hidden");addClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(false)+"] Hide undocumented items"}else{addClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("x"),function(x){if(hasClass(x,"content")===false){addClass(x,"hidden");removeClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items"}}onEachLazy(document.getElementsByClassName("impl-items"),function(e){onEachLazy(e.getElementsByClassName("associatedconstant"),func);var hiddenElems=e.getElementsByClassName("hidden");var needToggle=false;var hlength=hiddenElems.length;for(var i=0;i"+getSearchLoadingText()+"";showSearchResults(search)}var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")===true){hideSidebar()}else{showSidebar()}}}if(main){onEachLazy(main.getElementsByClassName("loading-content"),function(e){e.remove()});onEachLazy(main.childNodes,function(e){if(e.tagName==="H2"||e.tagName==="H3"){var nextTagName=e.nextElementSibling.tagName;if(nextTagName=="H2"||nextTagName=="H3"){e.nextElementSibling.style.display="flex"}else{e.nextElementSibling.style.display="block"}}})}function enableSearchInput(){if(search_input){search_input.removeAttribute('disabled')}}window.addSearchOptions=function(crates){var elem=document.getElementById("crate-search");if(!elem){enableSearchInput();return}var crates_text=[];if(Object.keys(crates).length>1){for(var crate in crates){if(hasOwnProperty(crates,crate)){crates_text.push(crate)}}}crates_text.sort(function(a,b){var lower_a=a.toLowerCase();var lower_b=b.toLowerCase();if(lower_alower_b){return 1}return 0});var savedCrate=getSettingValue("saved-filter-crate");for(var i=0;ithe rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["ctrl + ↑ / ↓","Switch result tab"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>(index&1)===0?""+y+"":y).join("")+"
"+x[1]+"
").join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";var infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + * -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ + str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);popup.appendChild(container);insertAfter(popup,getSearchElement());buildHelperPopup=function(){}}onHashChange(null);window.onhashchange=onHashChange}());window.onunload=function(){} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/normalize.css b/api-docs/m_captcha/0.1.1/normalize.css new file mode 100644 index 0000000..6d692b5 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/normalize.css @@ -0,0 +1,2 @@ + /*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/noscript.css b/api-docs/m_captcha/0.1.1/noscript.css new file mode 100644 index 0000000..5cbcb90 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/noscript.css @@ -0,0 +1 @@ + #main>h2+div,#main>h2+h3,#main>h3+div{display:block;}.loading-content{display:none;}#main>h2+div,#main>h3+div{display:block;}#main>h2+h3{display:flex;}#main .impl-items .hidden{display:block !important;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/rust-logo.png b/api-docs/m_captcha/0.1.1/rust-logo.png new file mode 100644 index 0000000..74b4bd6 Binary files /dev/null and b/api-docs/m_captcha/0.1.1/rust-logo.png differ diff --git a/api-docs/m_captcha/0.1.1/rustdoc.css b/api-docs/m_captcha/0.1.1/rustdoc.css new file mode 100644 index 0000000..757de19 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/rustdoc.css @@ -0,0 +1 @@ + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff") format('woff');}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:400;src:local('Source Serif Pro'),url("SourceSerifPro-Regular.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:italic;font-weight:400;src:local('Source Serif Pro Italic'),url("SourceSerifPro-It.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:700;src:local('Source Serif Pro Bold'),url("SourceSerifPro-Bold.ttf.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.woff") format('woff');}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif Pro",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.notable),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{border-bottom:1px dashed;margin-top:0;}h1.fqn>.in-band>a:hover{text-decoration:underline;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border-bottom:1px solid;}h3.impl,h3.method,h4.method,h3.type,h4.type,h4.associatedconstant{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}h3.impl,h3.method,h3.type{padding-left:15px;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.content table td:first-child>a,.collapse-toggle,div.item-list .out-of-band,#source-sidebar,#sidebar-toggle{font-family:"Fira Sans",sans-serif;}.content ul.crate a.crate{font:16px/1.6 "Fira Sans";}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}code,pre,a.test-arrow{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code,.docblock code.spotlight{padding:0;}.docblock code.spotlight :last-child{padding-bottom:0.6em;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;min-width:70em;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-child{font-weight:500;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{margin-top:0;margin-bottom:8px;text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc:not(.source) .example-wrap{display:inline-flex;margin-bottom:10px;position:relative;}.example-wrap{width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;border-top-left-radius:5px;border-bottom-left-radius:5px;padding:13px 8px;text-align:right;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results{position:absolute;right:0;left:0;overflow:auto;}#results>table{width:100%;table-layout:fixed;margin-bottom:40px;}.content pre.line-numbers{float:left;border:none;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock code,.docblock-short code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}#main>.docblock h1{font-size:1.3em;}#main>.docblock h2{font-size:1.15em;}#main>.docblock h3,#main>.docblock h4,#main>.docblock h5{font-size:1em;}#main>h2+div,#main>h2+h3,#main>h3+div{display:none;flex-wrap:wrap;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{float:right;font-size:23px;margin:0px;padding:0px;font-weight:normal;}h3.impl>.out-of-band{font-size:21px;}h4.method>.out-of-band{font-size:19px;}h4>code,h3>code,.invisible>code{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{margin:0px;padding:0px;}.in-band>code{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content .method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items>h4{border-bottom:0;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.toggle-wrapper.marg-left>.collapse-toggle{left:-24px;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;margin-top:-13px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:-6px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,h4>code+.srclink,h3>code+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results .desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results a{display:block;}.content .search-results td:first-child{padding-right:0;width:50%;}.content .search-results td:first-child a{padding-right:10px;}.content .search-results td:first-child a:after{clear:both;content:"";display:block;}.content .search-results td:first-child a span{float:left;}tr.result span.primitive::after{content:' (primitive type)';font-style:italic;}tr.result span.keyword::after{content:' (keyword)';font-style:italic;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;}#help>div>span{text-align:center;display:block;margin:10px 0;font-size:18px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.module-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since,.methods .since{flex-grow:0;padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code,.methods code{flex-grow:1;}.impl-items h4,h4.impl,h3.impl,.methods h3{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.collapse-toggle{font-weight:300;position:absolute;left:-23px;top:0;}h3>.collapse-toggle,h4>.collapse-toggle{font-size:0.8em;top:5px;}.toggle-wrapper>.collapse-toggle{left:-24px;margin-top:0px;}.toggle-wrapper{position:relative;margin-top:0;}.toggle-wrapper.collapsed{height:25px;transition:height .2s;margin-bottom:.6em;}.collapse-toggle>.inner{display:inline-block;width:1.2ch;text-align:center;}.collapse-toggle.hidden-default{position:relative;margin-left:20px;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.toggle-wrapper>.collapse-toggle{left:0;}.variant+.toggle-wrapper+.docblock>p{margin-top:5px;}.sub-variant,.sub-variant>h3{margin-top:1px !important;}#main>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.enum>.toggle-wrapper+.docblock,.struct>.toggle-wrapper+.docblock{margin-left:30px;margin-bottom:20px;margin-top:5px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}.enum>.collapsed,.struct>.collapsed{margin-bottom:25px;}#main>.variant,#main>.structfield{display:block;}.attributes{display:block;margin-top:0px !important;margin-right:0px;margin-bottom:0px !important;margin-left:30px;}.toggle-attributes.collapsed{margin-bottom:0;}.impl-items>.toggle-attributes{margin-left:20px;}.impl-items .attributes{font-weight:500;}:target>code{opacity:1;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}h4>.notable-traits{position:absolute;left:-44px;top:2px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,.help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}.help-button{right:30px;font-family:"Fira Sans",sans-serif;text-align:center;font-size:17px;}#theme-picker,#settings-menu,.help-button{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}@media (min-width:701px){.information:first-child>.tooltip{margin-top:16px;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;left:0;top:45px;bottom:0;overflow-y:auto;border-right:1px solid;display:none;}.sidebar>.block.version{border-bottom:none;margin-top:12px;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main{margin-top:45px;padding:0;}.content .in-band{width:100%;}.content h4>.out-of-band{position:inherit;}.toggle-wrapper>.collapse-toggle{left:0px;}.toggle-wrapper{height:1.5em;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{display:flex;}.anchor{display:none !important;}h1.fqn{overflow:initial;}.theme-picker{left:10px;top:54px;z-index:1;}h4>.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar{width:calc(100% + 30px);}.show-it{display:block;width:246px;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}.collapse-toggle{left:-20px;}.impl>.collapse-toggle{left:-10px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}.help-button{display:none;}.search-container>div{width:calc(100% - 32px);}}@media print{nav.sub,.content .out-of-band,.collapse-toggle{display:none;}}@media (max-width:416px){#titles,#titles>button{height:73px;}#main{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}}h3.notable{margin:0;margin-bottom:13px;font-size:19px;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}.type-decl>pre>.toggle-wrapper.toggle-attributes.top-attr{margin-left:0 !important;}.type-decl>pre>.docblock.attributes.top-attr{margin-left:1.8em !important;}.type-decl>pre>.toggle-attributes{margin-left:2.2em;}.type-decl>pre>.docblock.attributes{margin-left:4em;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/search-index.js b/api-docs/m_captcha/0.1.1/search-index.js new file mode 100644 index 0000000..21bad34 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/search-index.js @@ -0,0 +1,6 @@ +var searchIndex = JSON.parse('{\ +"cfg_if":{"doc":"A macro for defining #[cfg] if-else statements.","i":[[14,"cfg_if","cfg_if","The main macro provided by this crate. See crate …",null,null]],"p":[]},\ +"m_captcha":{"doc":"mCaptcha is a proof of work based Denaial-of-Service …","i":[[0,"defense","m_captcha","Defense datatypes",null,null],[3,"Level","m_captcha::defense","Level struct that describes threshold-difficulty factor …",null,null],[12,"visitor_threshold","","",0,null],[12,"difficulty_factor","","",0,null],[3,"LevelBuilder","","Bulder struct for [Level] to describe …",null,null],[11,"visitor_threshold","","set visitor count for level",1,[[]]],[11,"difficulty_factor","","set difficulty factor for level. difficulty_factor can\'t …",1,[[],["captcharesult",6]]],[11,"build","","build Level struct",1,[[],[["captcharesult",6],["level",3]]]],[3,"Defense","","struct describes all the different [Level]s at which an …",null,null],[3,"DefenseBuilder","","Builder struct for [Defense]",null,null],[11,"add_level","","add a level to [Defense]",2,[[["level",3]],["captcharesult",6]]],[11,"build","","Build [Defense]",2,[[],[["defense",3],["captcharesult",6]]]],[11,"get_difficulty","","! Difficulty is calculated as: ! …",3,[[]]],[11,"tighten_up","","tighten up defense. Increases defense level by a factor …",3,[[]]],[11,"loosen_up","","Loosen up defense. Decreases defense level by a factor of …",3,[[]]],[11,"max_defense","","Set defense to maximum level",3,[[]]],[11,"min_defense","","Set defense to minimum level",3,[[]]],[11,"visitor_threshold","","Get current level\'s visitor threshold",3,[[]]],[0,"errors","m_captcha","Errors and Result module",null,null],[4,"CaptchaError","m_captcha::errors","Error datatype",null,null],[13,"LevelEmpty","","When configuring m_captcha, [DefenseBuilder][…",4,null],[13,"DifficultyFactorZero","","Visitor count must be a whole number(zero and above). …",4,null],[13,"CaptchaDurationZero","","captcha cooldown duration must be greater than 0",4,null],[13,"SetDifficultyFactor","","Difficulty factor must be set",4,null],[13,"SetVisitorThreshold","","Visitor threshold must be set",4,null],[13,"DuplicateVisitorCount","","Visitor count must be Unique",4,null],[13,"DecreaseingDifficultyFactor","","Difficulty factor should increase with level",4,null],[13,"MailboxError","","Difficulty factor should increase with level",4,null],[13,"InsuffiencientDifficulty","","Happens when submitted work doesn\'t satisfy the required …",4,null],[13,"StringNotFound","","Happens when submitted work is computed over string that …",4,null],[13,"PleaseSetValue","","Used in builder structs when a value is not set",4,null],[6,"CaptchaResult","","[Result] datatype for m_captcha",null,null],[0,"master","m_captcha","[Master] actor module that manages [MCaptcha] actors",null,null],[3,"Master","m_captcha::master","This Actor manages the [MCaptcha] actors. A service can …",null,null],[11,"add_site","","add [MCaptcha] actor to [Master]",5,[[["addsite",3]]]],[11,"new","","create new master accepts a u64 to configure garbage …",5,[[]]],[11,"get_site","","get [MCaptcha] actor from [Master]",5,[[],[["option",4],["addr",3]]]],[11,"rm_site","","remvoes [MCaptcha] actor from [Master]",5,[[]]],[3,"GetSite","","Message to get an [MCaptcha] actor from master",null,null],[12,"0","","",6,null],[3,"CleanUp","","Message to clean up master of [MCaptcha] actors with zero …",null,null],[3,"RemoveSite","","Message to delete [MCaptcha] actor",null,null],[12,"0","","",7,null],[3,"AddSite","","Message to add an [MCaptcha] actor to [Master]",null,null],[12,"id","","",8,null],[12,"addr","","",8,null],[3,"AddSiteBuilder","","Builder for AddSite.",null,null],[11,"id","","",9,[[["string",3]]]],[11,"addr","","",9,[[["mcaptcha",3],["addr",3]]]],[11,"build","","Builds a new AddSite.",9,[[],[["addsite",3],["string",3],["result",4]]]],[0,"mcaptcha","m_captcha","MCaptcha actor module that manages defense levels",null,null],[3,"MCaptchaBuilder","m_captcha::mcaptcha","Builder for [MCaptcha]",null,null],[3,"MCaptcha","","This struct represents the mCaptcha state and is used to …",null,null],[11,"defense","","set defense",10,[[["defense",3]]]],[11,"duration","","set duration",10,[[]]],[11,"build","","Builds new [MCaptcha]",10,[[],[["captcharesult",6],["mcaptcha",3]]]],[11,"add_visitor","","increments the visitor count by one",11,[[]]],[11,"decrement_visitor","","decrements the visitor count by one",11,[[]]],[11,"get_difficulty","","get current difficulty factor",11,[[]]],[11,"get_duration","","get [MCaptcha]\'s lifetime",11,[[]]],[3,"AddVisitor","","Message to increment the visitor count returns difficulty …",null,null],[3,"AddVisitorResult","","Struct representing the return datatime of [AddVisitor] …",null,null],[12,"duration","","",12,null],[12,"difficulty_factor","","",12,null],[3,"GetCurrentVisitorCount","","Message to get the visitor count",null,null],[3,"Stop","","Message to stop [MCaptcha]",null,null],[0,"cache","m_captcha","message datatypes to interact with [MCaptcha] actor Cache …",null,null],[0,"hashcache","m_captcha::cache","In-memory cache implementation that uses [HashMap]",null,null],[3,"HashCache","m_captcha::cache::hashcache","cache datastructure implementing [Save]",null,null],[0,"messages","m_captcha::cache","Messages that can be sent to cache data structures …",null,null],[3,"Cache","m_captcha::cache::messages","Message to cache PoW difficulty factor and string",null,null],[12,"string","","",13,null],[12,"difficulty_factor","","",13,null],[12,"duration","","",13,null],[3,"CacheBuilder","","Builder for Cache.",null,null],[11,"string","","",14,[[["string",3]]]],[11,"difficulty_factor","","",14,[[]]],[11,"duration","","",14,[[]]],[11,"build","","Builds a new Cache.",14,[[],[["string",3],["result",4],["cache",3]]]],[11,"new","","",13,[[["powconfig",3],["addvisitorresult",3]]]],[3,"Retrive","","Message to retrive the the difficulty factor for the …",null,null],[12,"0","","",15,null],[3,"DeleteString","","Message to delete cached PoW difficulty factor and string …",null,null],[12,"0","","",16,null],[8,"Save","m_captcha::cache","Describes actor handler trait impls that are required by …",null,null],[0,"pow","m_captcha","PoW datatypes used in client-server interaction",null,null],[3,"ConfigBuilder","m_captcha::pow","Builder for Config.",null,null],[3,"PoWConfig","","PoW requirement datatype that is be sent to clients for …",null,null],[12,"string","","",17,null],[12,"difficulty_factor","","",17,null],[11,"new","","create new instance of [PoWConfig]",17,[[]]],[3,"Work","","PoW datatype that clients send to server",null,null],[12,"string","","",18,null],[12,"result","","",18,null],[12,"nonce","","",18,null],[0,"system","m_captcha","module describing mCaptcha system",null,null],[3,"System","m_captcha::system","struct describing various bits of data required for an …",null,null],[12,"master","","",19,null],[3,"SystemBuilder","","Builder for System.",null,null],[11,"master","","",20,[[["addr",3],["master",3]]]],[11,"cache","","",20,[[["addr",3]]]],[11,"pow","","",20,[[["config",3]]]],[11,"build","","Builds a new System.",20,[[],[["system",3],["string",3],["result",4]]]],[11,"get_pow","","utility function to get difficulty factor of site id and …",19,[[["string",3]]]],[11,"verify_pow","","utility function to verify [Work]",19,[[["work",3]]]],[11,"from","m_captcha::defense","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"vzip","","",0,[[]]],[11,"from","","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_owned","","",1,[[]]],[11,"clone_into","","",1,[[]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"vzip","","",1,[[]]],[11,"from","","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"vzip","","",3,[[]]],[11,"from","","",2,[[]]],[11,"into","","",2,[[]]],[11,"to_owned","","",2,[[]]],[11,"clone_into","","",2,[[]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"vzip","","",2,[[]]],[11,"from","m_captcha::errors","",4,[[]]],[11,"into","","",4,[[]]],[11,"to_owned","","",4,[[]]],[11,"clone_into","","",4,[[]]],[11,"to_string","","",4,[[],["string",3]]],[11,"borrow","","",4,[[]]],[11,"borrow_mut","","",4,[[]]],[11,"try_from","","",4,[[],["result",4]]],[11,"try_into","","",4,[[],["result",4]]],[11,"type_id","","",4,[[],["typeid",3]]],[11,"vzip","","",4,[[]]],[11,"from","m_captcha::master","",5,[[]]],[11,"into","","",5,[[]]],[11,"to_owned","","",5,[[]]],[11,"clone_into","","",5,[[]]],[11,"borrow","","",5,[[]]],[11,"borrow_mut","","",5,[[]]],[11,"try_from","","",5,[[],["result",4]]],[11,"try_into","","",5,[[],["result",4]]],[11,"type_id","","",5,[[],["typeid",3]]],[11,"vzip","","",5,[[]]],[11,"from","","",6,[[]]],[11,"into","","",6,[[]]],[11,"borrow","","",6,[[]]],[11,"borrow_mut","","",6,[[]]],[11,"try_from","","",6,[[],["result",4]]],[11,"try_into","","",6,[[],["result",4]]],[11,"type_id","","",6,[[],["typeid",3]]],[11,"vzip","","",6,[[]]],[11,"from","","",21,[[]]],[11,"into","","",21,[[]]],[11,"borrow","","",21,[[]]],[11,"borrow_mut","","",21,[[]]],[11,"try_from","","",21,[[],["result",4]]],[11,"try_into","","",21,[[],["result",4]]],[11,"type_id","","",21,[[],["typeid",3]]],[11,"vzip","","",21,[[]]],[11,"from","","",7,[[]]],[11,"into","","",7,[[]]],[11,"borrow","","",7,[[]]],[11,"borrow_mut","","",7,[[]]],[11,"try_from","","",7,[[],["result",4]]],[11,"try_into","","",7,[[],["result",4]]],[11,"type_id","","",7,[[],["typeid",3]]],[11,"vzip","","",7,[[]]],[11,"from","","",8,[[]]],[11,"into","","",8,[[]]],[11,"borrow","","",8,[[]]],[11,"borrow_mut","","",8,[[]]],[11,"try_from","","",8,[[],["result",4]]],[11,"try_into","","",8,[[],["result",4]]],[11,"type_id","","",8,[[],["typeid",3]]],[11,"vzip","","",8,[[]]],[11,"from","","",9,[[]]],[11,"into","","",9,[[]]],[11,"to_owned","","",9,[[]]],[11,"clone_into","","",9,[[]]],[11,"borrow","","",9,[[]]],[11,"borrow_mut","","",9,[[]]],[11,"try_from","","",9,[[],["result",4]]],[11,"try_into","","",9,[[],["result",4]]],[11,"type_id","","",9,[[],["typeid",3]]],[11,"vzip","","",9,[[]]],[11,"from","m_captcha::mcaptcha","",10,[[]]],[11,"into","","",10,[[]]],[11,"to_owned","","",10,[[]]],[11,"clone_into","","",10,[[]]],[11,"borrow","","",10,[[]]],[11,"borrow_mut","","",10,[[]]],[11,"try_from","","",10,[[],["result",4]]],[11,"try_into","","",10,[[],["result",4]]],[11,"type_id","","",10,[[],["typeid",3]]],[11,"vzip","","",10,[[]]],[11,"from","","",11,[[]]],[11,"into","","",11,[[]]],[11,"to_owned","","",11,[[]]],[11,"clone_into","","",11,[[]]],[11,"borrow","","",11,[[]]],[11,"borrow_mut","","",11,[[]]],[11,"try_from","","",11,[[],["result",4]]],[11,"try_into","","",11,[[],["result",4]]],[11,"type_id","","",11,[[],["typeid",3]]],[11,"vzip","","",11,[[]]],[11,"from","","",22,[[]]],[11,"into","","",22,[[]]],[11,"borrow","","",22,[[]]],[11,"borrow_mut","","",22,[[]]],[11,"try_from","","",22,[[],["result",4]]],[11,"try_into","","",22,[[],["result",4]]],[11,"type_id","","",22,[[],["typeid",3]]],[11,"vzip","","",22,[[]]],[11,"from","","",12,[[]]],[11,"into","","",12,[[]]],[11,"to_owned","","",12,[[]]],[11,"clone_into","","",12,[[]]],[11,"borrow","","",12,[[]]],[11,"borrow_mut","","",12,[[]]],[11,"try_from","","",12,[[],["result",4]]],[11,"try_into","","",12,[[],["result",4]]],[11,"type_id","","",12,[[],["typeid",3]]],[11,"vzip","","",12,[[]]],[11,"from","","",23,[[]]],[11,"into","","",23,[[]]],[11,"borrow","","",23,[[]]],[11,"borrow_mut","","",23,[[]]],[11,"try_from","","",23,[[],["result",4]]],[11,"try_into","","",23,[[],["result",4]]],[11,"type_id","","",23,[[],["typeid",3]]],[11,"vzip","","",23,[[]]],[11,"from","","",24,[[]]],[11,"into","","",24,[[]]],[11,"borrow","","",24,[[]]],[11,"borrow_mut","","",24,[[]]],[11,"try_from","","",24,[[],["result",4]]],[11,"try_into","","",24,[[],["result",4]]],[11,"type_id","","",24,[[],["typeid",3]]],[11,"vzip","","",24,[[]]],[11,"from","m_captcha::cache::hashcache","",25,[[]]],[11,"into","","",25,[[]]],[11,"to_owned","","",25,[[]]],[11,"clone_into","","",25,[[]]],[11,"borrow","","",25,[[]]],[11,"borrow_mut","","",25,[[]]],[11,"try_from","","",25,[[],["result",4]]],[11,"try_into","","",25,[[],["result",4]]],[11,"type_id","","",25,[[],["typeid",3]]],[11,"vzip","","",25,[[]]],[11,"from","m_captcha::cache::messages","",13,[[]]],[11,"into","","",13,[[]]],[11,"borrow","","",13,[[]]],[11,"borrow_mut","","",13,[[]]],[11,"try_from","","",13,[[],["result",4]]],[11,"try_into","","",13,[[],["result",4]]],[11,"type_id","","",13,[[],["typeid",3]]],[11,"vzip","","",13,[[]]],[11,"from","","",14,[[]]],[11,"into","","",14,[[]]],[11,"to_owned","","",14,[[]]],[11,"clone_into","","",14,[[]]],[11,"borrow","","",14,[[]]],[11,"borrow_mut","","",14,[[]]],[11,"try_from","","",14,[[],["result",4]]],[11,"try_into","","",14,[[],["result",4]]],[11,"type_id","","",14,[[],["typeid",3]]],[11,"vzip","","",14,[[]]],[11,"from","","",15,[[]]],[11,"into","","",15,[[]]],[11,"borrow","","",15,[[]]],[11,"borrow_mut","","",15,[[]]],[11,"try_from","","",15,[[],["result",4]]],[11,"try_into","","",15,[[],["result",4]]],[11,"type_id","","",15,[[],["typeid",3]]],[11,"vzip","","",15,[[]]],[11,"from","","",16,[[]]],[11,"into","","",16,[[]]],[11,"borrow","","",16,[[]]],[11,"borrow_mut","","",16,[[]]],[11,"try_from","","",16,[[],["result",4]]],[11,"try_into","","",16,[[],["result",4]]],[11,"type_id","","",16,[[],["typeid",3]]],[11,"vzip","","",16,[[]]],[11,"from","m_captcha::pow","",26,[[]]],[11,"into","","",26,[[]]],[11,"to_owned","","",26,[[]]],[11,"clone_into","","",26,[[]]],[11,"borrow","","",26,[[]]],[11,"borrow_mut","","",26,[[]]],[11,"try_from","","",26,[[],["result",4]]],[11,"try_into","","",26,[[],["result",4]]],[11,"type_id","","",26,[[],["typeid",3]]],[11,"vzip","","",26,[[]]],[11,"from","","",17,[[]]],[11,"into","","",17,[[]]],[11,"to_owned","","",17,[[]]],[11,"clone_into","","",17,[[]]],[11,"borrow","","",17,[[]]],[11,"borrow_mut","","",17,[[]]],[11,"try_from","","",17,[[],["result",4]]],[11,"try_into","","",17,[[],["result",4]]],[11,"type_id","","",17,[[],["typeid",3]]],[11,"vzip","","",17,[[]]],[11,"from","","",18,[[]]],[11,"into","","",18,[[]]],[11,"to_owned","","",18,[[]]],[11,"clone_into","","",18,[[]]],[11,"borrow","","",18,[[]]],[11,"borrow_mut","","",18,[[]]],[11,"try_from","","",18,[[],["result",4]]],[11,"try_into","","",18,[[],["result",4]]],[11,"type_id","","",18,[[],["typeid",3]]],[11,"vzip","","",18,[[]]],[11,"from","m_captcha::system","",19,[[]]],[11,"into","","",19,[[]]],[11,"to_owned","","",19,[[]]],[11,"clone_into","","",19,[[]]],[11,"borrow","","",19,[[]]],[11,"borrow_mut","","",19,[[]]],[11,"try_from","","",19,[[],["result",4]]],[11,"try_into","","",19,[[],["result",4]]],[11,"type_id","","",19,[[],["typeid",3]]],[11,"vzip","","",19,[[]]],[11,"from","","",20,[[]]],[11,"into","","",20,[[]]],[11,"to_owned","","",20,[[]]],[11,"clone_into","","",20,[[]]],[11,"borrow","","",20,[[]]],[11,"borrow_mut","","",20,[[]]],[11,"try_from","","",20,[[],["result",4]]],[11,"try_into","","",20,[[],["result",4]]],[11,"type_id","","",20,[[],["typeid",3]]],[11,"vzip","","",20,[[]]],[11,"default","m_captcha::pow","",26,[[],["configbuilder",3]]],[11,"clone","","",26,[[],["configbuilder",3]]],[11,"clone","m_captcha::defense","",0,[[],["level",3]]],[11,"clone","","",1,[[],["levelbuilder",3]]],[11,"clone","","",3,[[],["defense",3]]],[11,"clone","","",2,[[],["defensebuilder",3]]],[11,"clone","m_captcha::errors","",4,[[],["captchaerror",4]]],[11,"clone","m_captcha::master","",5,[[],["master",3]]],[11,"clone","","",9,[[],["addsitebuilder",3]]],[11,"clone","m_captcha::mcaptcha","",10,[[],["mcaptchabuilder",3]]],[11,"clone","","",11,[[],["mcaptcha",3]]],[11,"clone","","",12,[[],["addvisitorresult",3]]],[11,"clone","m_captcha::cache::hashcache","",25,[[],["hashcache",3]]],[11,"clone","m_captcha::cache::messages","",14,[[],["cachebuilder",3]]],[11,"clone","m_captcha::pow","",17,[[],["powconfig",3]]],[11,"clone","","",18,[[],["work",3]]],[11,"clone","m_captcha::system","",19,[[],["system",3]]],[11,"clone","","",20,[[],["systembuilder",3]]],[11,"default","m_captcha::defense","",1,[[]]],[11,"default","","",2,[[]]],[11,"default","m_captcha::master","",9,[[],["addsitebuilder",3]]],[11,"default","m_captcha::mcaptcha","",10,[[]]],[11,"default","m_captcha::cache::hashcache","",25,[[],["hashcache",3]]],[11,"default","m_captcha::cache::messages","",14,[[],["cachebuilder",3]]],[11,"default","m_captcha::system","",20,[[],["systembuilder",3]]],[11,"eq","m_captcha::defense","",0,[[["level",3]]]],[11,"ne","","",0,[[["level",3]]]],[11,"eq","","",1,[[["levelbuilder",3]]]],[11,"ne","","",1,[[["levelbuilder",3]]]],[11,"eq","","",3,[[["defense",3]]]],[11,"ne","","",3,[[["defense",3]]]],[11,"eq","","",2,[[["defensebuilder",3]]]],[11,"ne","","",2,[[["defensebuilder",3]]]],[11,"eq","m_captcha::errors","",4,[[["captchaerror",4]]]],[11,"ne","","",4,[[["captchaerror",4]]]],[11,"fmt","m_captcha::defense","",0,[[["formatter",3]],["result",6]]],[11,"fmt","","",1,[[["formatter",3]],["result",6]]],[11,"fmt","","",3,[[["formatter",3]],["result",6]]],[11,"fmt","","",2,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::errors","",4,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::mcaptcha","",10,[[["formatter",3]],["result",6]]],[11,"fmt","","",11,[[["formatter",3]],["result",6]]],[11,"fmt","","",12,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::pow","",17,[[["formatter",3]],["result",6]]],[11,"fmt","","",18,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::errors","",4,[[["formatter",3]],["result",6]]],[11,"serialize","m_captcha::defense","",0,[[],["result",4]]],[11,"serialize","","",3,[[],["result",4]]],[11,"serialize","m_captcha::mcaptcha","",10,[[],["result",4]]],[11,"serialize","","",11,[[],["result",4]]],[11,"serialize","","",12,[[],["result",4]]],[11,"serialize","m_captcha::cache::messages","",13,[[],["result",4]]],[11,"serialize","m_captcha::pow","",17,[[],["result",4]]],[11,"serialize","","",18,[[],["result",4]]],[11,"deserialize","m_captcha::defense","",0,[[],["result",4]]],[11,"deserialize","","",3,[[],["result",4]]],[11,"deserialize","m_captcha::mcaptcha","",10,[[],["result",4]]],[11,"deserialize","","",11,[[],["result",4]]],[11,"deserialize","","",12,[[],["result",4]]],[11,"deserialize","m_captcha::cache::messages","",13,[[],["result",4]]],[11,"deserialize","m_captcha::pow","",17,[[],["result",4]]],[11,"deserialize","","",18,[[],["result",4]]],[11,"started","m_captcha::master","",5,[[]]],[11,"handle","","",5,[[["getsite",3]]]],[11,"handle","","",5,[[["cleanup",3]]]],[11,"handle","","",5,[[["removesite",3]]]],[11,"handle","","",5,[[["addsite",3]]]],[11,"handle","m_captcha::mcaptcha","",11,[[["addvisitor",3]]]],[11,"handle","","",11,[[["getcurrentvisitorcount",3]]]],[11,"handle","","",11,[[["stop",3]]]],[11,"handle","m_captcha::cache::hashcache","",25,[[["cache",3]]]],[11,"handle","","",25,[[["deletestring",3]]]],[11,"handle","","",25,[[["retrive",3]]]],[11,"salt","m_captcha::pow","",26,[[["string",3]],["configbuilder",3]]],[11,"build","","Builds a new Config.",26,[[],[["string",3],["config",3],["result",4]]]]],"p":[[3,"Level"],[3,"LevelBuilder"],[3,"DefenseBuilder"],[3,"Defense"],[4,"CaptchaError"],[3,"Master"],[3,"GetSite"],[3,"RemoveSite"],[3,"AddSite"],[3,"AddSiteBuilder"],[3,"MCaptchaBuilder"],[3,"MCaptcha"],[3,"AddVisitorResult"],[3,"Cache"],[3,"CacheBuilder"],[3,"Retrive"],[3,"DeleteString"],[3,"PoWConfig"],[3,"Work"],[3,"System"],[3,"SystemBuilder"],[3,"CleanUp"],[3,"AddVisitor"],[3,"GetCurrentVisitorCount"],[3,"Stop"],[3,"HashCache"],[3,"ConfigBuilder"]]},\ +"unicode_xid":{"doc":"Determine if a char is a valid identifier for a parser …","i":[[17,"UNICODE_VERSION","unicode_xid","The version of Unicode that this version of unicode-xid …",null,null],[8,"UnicodeXID","","Methods for determining if a character is a valid …",null,null],[10,"is_xid_start","","Returns whether the specified character satisfies the …",0,[[]]],[10,"is_xid_continue","","Returns whether the specified char satisfies the …",0,[[]]]],"p":[[8,"UnicodeXID"]]}\ +}'); +addSearchOptions(searchIndex);initSearch(searchIndex); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/settings.css b/api-docs/m_captcha/0.1.1/settings.css new file mode 100644 index 0000000..6709865 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/settings.css @@ -0,0 +1 @@ +.setting-line{padding:5px;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.select-wrapper{float:right;position:relative;height:27px;min-width:25%;}.select-wrapper select{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:2px solid #ccc;padding-right:28px;width:100%;}.select-wrapper img{pointer-events:none;position:absolute;right:0;bottom:0;background:#ccc;height:100%;width:28px;padding:0px 4px;}.select-wrapper select option{color:initial;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/settings.html b/api-docs/m_captcha/0.1.1/settings.html new file mode 100644 index 0000000..1762d2c --- /dev/null +++ b/api-docs/m_captcha/0.1.1/settings.html @@ -0,0 +1,6 @@ +Rustdoc settings + +

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
+
Auto-hide item declarations
Auto-hide structs declaration
Auto-hide enums declaration
Auto-hide unions declaration
Auto-hide traits declaration
Auto-hide macros declaration
+
Auto-hide item attributes.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Auto-hide implementors of a trait
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/settings.js b/api-docs/m_captcha/0.1.1/settings.js new file mode 100644 index 0000000..b4d6fdc --- /dev/null +++ b/api-docs/m_captcha/0.1.1/settings.js @@ -0,0 +1 @@ +(function(){function changeSetting(settingName,value){updateLocalStorage("rustdoc-"+settingName,value);switch(settingName){case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function setEvents(){onEachLazy(document.getElementsByClassName("slider"),function(elem){var toggle=elem.previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(document.getElementsByClassName("select-wrapper"),function(elem){var select=elem.getElementsByTagName("select")[0];var settingId=select.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}})}window.addEventListener("DOMContentLoaded",setEvents)})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/source-files.js b/api-docs/m_captcha/0.1.1/source-files.js new file mode 100644 index 0000000..cebd474 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/source-files.js @@ -0,0 +1,5 @@ +var N = null;var sourcesIndex = {}; +sourcesIndex["cfg_if"] = {"name":"","files":["lib.rs"]}; +sourcesIndex["m_captcha"] = {"name":"","dirs":[{"name":"cache","files":["hashcache.rs","mod.rs"]}],"files":["defense.rs","errors.rs","lib.rs","master.rs","mcaptcha.rs","pow.rs","system.rs","utils.rs"]}; +sourcesIndex["unicode_xid"] = {"name":"","files":["lib.rs","tables.rs"]}; +createSourceSidebar(); diff --git a/api-docs/m_captcha/0.1.1/source-script.js b/api-docs/m_captcha/0.1.1/source-script.js new file mode 100644 index 0000000..de663ca --- /dev/null +++ b/api-docs/m_captcha/0.1.1/source-script.js @@ -0,0 +1 @@ +function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0;i"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(window.rootPath.endsWith("/")===false){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/src/cfg_if/lib.rs.html b/api-docs/m_captcha/0.1.1/src/cfg_if/lib.rs.html new file mode 100644 index 0000000..b28fa6b --- /dev/null +++ b/api-docs/m_captcha/0.1.1/src/cfg_if/lib.rs.html @@ -0,0 +1,358 @@ +lib.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+
+//! A macro for defining `#[cfg]` if-else statements.
+//!
+//! The macro provided by this crate, `cfg_if`, is similar to the `if/elif` C
+//! preprocessor macro by allowing definition of a cascade of `#[cfg]` cases,
+//! emitting the implementation which matches first.
+//!
+//! This allows you to conveniently provide a long list `#[cfg]`'d blocks of code
+//! without having to rewrite each clause multiple times.
+//!
+//! # Example
+//!
+//! ```
+//! cfg_if::cfg_if! {
+//!     if #[cfg(unix)] {
+//!         fn foo() { /* unix specific functionality */ }
+//!     } else if #[cfg(target_pointer_width = "32")] {
+//!         fn foo() { /* non-unix, 32-bit functionality */ }
+//!     } else {
+//!         fn foo() { /* fallback implementation */ }
+//!     }
+//! }
+//!
+//! # fn main() {}
+//! ```
+
+#![no_std]
+#![doc(html_root_url = "https://docs.rs/cfg-if")]
+#![deny(missing_docs)]
+#![cfg_attr(test, deny(warnings))]
+
+/// The main macro provided by this crate. See crate documentation for more
+/// information.
+#[macro_export]
+macro_rules! cfg_if {
+    // match if/else chains with a final `else`
+    ($(
+        if #[cfg($meta:meta)] { $($tokens:tt)* }
+    ) else * else {
+        $($tokens2:tt)*
+    }) => {
+        $crate::cfg_if! {
+            @__items
+            () ;
+            $( ( ($meta) ($($tokens)*) ), )*
+            ( () ($($tokens2)*) ),
+        }
+    };
+
+    // match if/else chains lacking a final `else`
+    (
+        if #[cfg($i_met:meta)] { $($i_tokens:tt)* }
+        $(
+            else if #[cfg($e_met:meta)] { $($e_tokens:tt)* }
+        )*
+    ) => {
+        $crate::cfg_if! {
+            @__items
+            () ;
+            ( ($i_met) ($($i_tokens)*) ),
+            $( ( ($e_met) ($($e_tokens)*) ), )*
+            ( () () ),
+        }
+    };
+
+    // Internal and recursive macro to emit all the items
+    //
+    // Collects all the negated cfgs in a list at the beginning and after the
+    // semicolon is all the remaining items
+    (@__items ($($not:meta,)*) ; ) => {};
+    (@__items ($($not:meta,)*) ; ( ($($m:meta),*) ($($tokens:tt)*) ), $($rest:tt)*) => {
+        // Emit all items within one block, applying an appropriate #[cfg]. The
+        // #[cfg] will require all `$m` matchers specified and must also negate
+        // all previous matchers.
+        #[cfg(all($($m,)* not(any($($not),*))))] $crate::cfg_if! { @__identity $($tokens)* }
+
+        // Recurse to emit all other items in `$rest`, and when we do so add all
+        // our `$m` matchers to the list of `$not` matchers as future emissions
+        // will have to negate everything we just matched as well.
+        $crate::cfg_if! { @__items ($($not,)* $($m,)*) ; $($rest)* }
+    };
+
+    // Internal macro to make __apply work out right for different match types,
+    // because of how macros matching/expand stuff.
+    (@__identity $($tokens:tt)*) => {
+        $($tokens)*
+    };
+}
+
+#[cfg(test)]
+mod tests {
+    cfg_if! {
+        if #[cfg(test)] {
+            use core::option::Option as Option2;
+            fn works1() -> Option2<u32> { Some(1) }
+        } else {
+            fn works1() -> Option<u32> { None }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(foo)] {
+            fn works2() -> bool { false }
+        } else if #[cfg(test)] {
+            fn works2() -> bool { true }
+        } else {
+            fn works2() -> bool { false }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(foo)] {
+            fn works3() -> bool { false }
+        } else {
+            fn works3() -> bool { true }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(test)] {
+            use core::option::Option as Option3;
+            fn works4() -> Option3<u32> { Some(1) }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(foo)] {
+            fn works5() -> bool { false }
+        } else if #[cfg(test)] {
+            fn works5() -> bool { true }
+        }
+    }
+
+    #[test]
+    fn it_works() {
+        assert!(works1().is_some());
+        assert!(works2());
+        assert!(works3());
+        assert!(works4().is_some());
+        assert!(works5());
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_constants)]
+    fn test_usage_within_a_function() {
+        cfg_if! {if #[cfg(debug_assertions)] {
+            // we want to put more than one thing here to make sure that they
+            // all get configured properly.
+            assert!(cfg!(debug_assertions));
+            assert_eq!(4, 2+2);
+        } else {
+            assert!(works1().is_some());
+            assert_eq!(10, 5+5);
+        }}
+    }
+
+    trait Trait {
+        fn blah(&self);
+    }
+
+    #[allow(dead_code)]
+    struct Struct;
+
+    impl Trait for Struct {
+        cfg_if! {
+            if #[cfg(feature = "blah")] {
+                fn blah(&self) {
+                    unimplemented!();
+                }
+            } else {
+                fn blah(&self) {
+                    unimplemented!();
+                }
+            }
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/src/m_captcha/cache/hashcache.rs.html b/api-docs/m_captcha/0.1.1/src/m_captcha/cache/hashcache.rs.html new file mode 100644 index 0000000..40fa022 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/src/m_captcha/cache/hashcache.rs.html @@ -0,0 +1,276 @@ +hashcache.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! In-memory cache implementation that uses [HashMap]
+use std::collections::HashMap;
+
+use actix::prelude::*;
+
+use super::messages::*;
+use super::Save;
+use crate::errors::*;
+
+#[derive(Clone, Default)]
+/// cache datastructure implementing [Save]
+pub struct HashCache(HashMap<String, u32>);
+
+impl HashCache {
+    // save [PoWConfig] to cache
+    fn save(&mut self, config: Cache) -> CaptchaResult<()> {
+        self.0.insert(config.string, config.difficulty_factor);
+        Ok(())
+    }
+
+    // retrive [PoWConfig] from cache. Deletes config post retrival
+    fn retrive(&mut self, string: String) -> CaptchaResult<Option<u32>> {
+        if let Some(difficulty_factor) = self.remove(&string) {
+            Ok(Some(difficulty_factor.to_owned()))
+        } else {
+            Ok(None)
+        }
+    }
+
+    // delete [PoWConfig] from cache
+    fn remove(&mut self, string: &str) -> Option<u32> {
+        self.0.remove(string)
+    }
+}
+
+impl Save for HashCache {}
+
+impl Actor for HashCache {
+    type Context = Context<Self>;
+}
+
+/// cache a PoWConfig
+impl Handler<Cache> for HashCache {
+    type Result = MessageResult<Cache>;
+    fn handle(&mut self, msg: Cache, ctx: &mut Self::Context) -> Self::Result {
+        use actix::clock::delay_for;
+        use std::time::Duration;
+
+        let addr = ctx.address();
+        let del_msg = DeleteString(msg.string.clone());
+
+        let duration: Duration = Duration::new(msg.duration.clone(), 0);
+        let wait_for = async move {
+            delay_for(duration).await;
+            addr.send(del_msg).await.unwrap().unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(wait_for);
+
+        MessageResult(self.save(msg))
+    }
+}
+
+/// Delte a PoWConfig
+impl Handler<DeleteString> for HashCache {
+    type Result = MessageResult<DeleteString>;
+    fn handle(&mut self, msg: DeleteString, _ctx: &mut Self::Context) -> Self::Result {
+        self.remove(&msg.0);
+        MessageResult(Ok(()))
+    }
+}
+
+/// Retrive PoW difficulty_factor for a PoW string
+impl Handler<Retrive> for HashCache {
+    type Result = MessageResult<Retrive>;
+    fn handle(&mut self, msg: Retrive, _ctx: &mut Self::Context) -> Self::Result {
+        MessageResult(self.retrive(msg.0))
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::mcaptcha::AddVisitorResult;
+    use crate::pow::PoWConfig;
+
+    async fn sleep(time: u64) {
+        use actix::clock::delay_for;
+        use std::time::Duration;
+
+        let duration: Duration = Duration::new(time, 0);
+        delay_for(duration).await;
+    }
+
+    #[actix_rt::test]
+    async fn hashcache_works() {
+        const DIFFICULTY_FACTOR: u32 = 54;
+        const DURATION: u64 = 5;
+        let addr = HashCache::default().start();
+        let pow: PoWConfig = PoWConfig::new(DIFFICULTY_FACTOR);
+        let visitor_result = AddVisitorResult {
+            difficulty_factor: DIFFICULTY_FACTOR,
+            duration: DURATION,
+        };
+        let string = pow.string.clone();
+        let msg = Cache::new(&pow, &visitor_result);
+
+        addr.send(msg).await.unwrap().unwrap();
+
+        let cache_difficulty_factor = addr.send(Retrive(string.clone())).await.unwrap().unwrap();
+        assert_eq!(DIFFICULTY_FACTOR, cache_difficulty_factor.unwrap());
+
+        sleep(DURATION + DURATION).await;
+
+        let expired_string = addr.send(Retrive(string)).await.unwrap().unwrap();
+        assert_eq!(None, expired_string);
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/src/m_captcha/cache/mod.rs.html b/api-docs/m_captcha/0.1.1/src/m_captcha/cache/mod.rs.html new file mode 100644 index 0000000..6ab7b24 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/src/m_captcha/cache/mod.rs.html @@ -0,0 +1,148 @@ +mod.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! Cache is used to save proofof work details and nonces to prevent replay attacks
+//! and rainbow/dictionary attacks
+pub use hashcache::HashCache;
+use messages::*;
+
+pub mod hashcache;
+
+/// Describes actor handler trait impls that are required by a cache implementation
+pub trait Save:
+    actix::Actor + actix::Handler<Retrive> + actix::Handler<Cache> + actix::Handler<DeleteString>
+{
+}
+pub mod messages {
+    //! Messages that can be sent to cache data structures implementing [Save][super::Save]
+    use actix::dev::*;
+    use derive_builder::Builder;
+    use serde::{Deserialize, Serialize};
+
+    use crate::errors::*;
+    use crate::mcaptcha::AddVisitorResult;
+    use crate::pow::PoWConfig;
+
+    /// Message to cache PoW difficulty factor and string
+    #[derive(Message, Serialize, Deserialize, Builder)]
+    #[rtype(result = "CaptchaResult<()>")]
+    pub struct Cache {
+        pub string: String,
+        pub difficulty_factor: u32,
+        pub duration: u64,
+    }
+
+    impl Cache {
+        pub fn new(p: &PoWConfig, v: &AddVisitorResult) -> Self {
+            CacheBuilder::default()
+                .string(p.string.clone())
+                .difficulty_factor(v.difficulty_factor)
+                .duration(v.duration)
+                .build()
+                .unwrap()
+        }
+    }
+
+    /// Message to retrive the the difficulty factor for the specified
+    /// string from the cache
+    #[derive(Message)]
+    #[rtype(result = "CaptchaResult<Option<u32>>")]
+    pub struct Retrive(pub String);
+
+    /// Message to delete cached PoW difficulty factor and string
+    /// when they expire
+    #[derive(Message)]
+    #[rtype(result = "CaptchaResult<()>")]
+    pub struct DeleteString(pub String);
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/src/m_captcha/defense.rs.html b/api-docs/m_captcha/0.1.1/src/m_captcha/defense.rs.html new file mode 100644 index 0000000..09541b0 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/src/m_captcha/defense.rs.html @@ -0,0 +1,840 @@ +defense.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+//! Defense datatypes
+//! ```rust
+//! use m_captcha::{LevelBuilder, DefenseBuilder};
+//! DefenseBuilder::default()
+//!        .add_level(
+//!            LevelBuilder::default()
+//!                .visitor_threshold(50)
+//!                .difficulty_factor(50)
+//!                .unwrap()
+//!                .build()
+//!                .unwrap(),
+//!        )
+//!        .unwrap()
+//!        .add_level(
+//!            LevelBuilder::default()
+//!                .visitor_threshold(500)
+//!                .difficulty_factor(500)
+//!                .unwrap()
+//!                .build()
+//!                .unwrap(),
+//!        )
+//!        .unwrap()
+//!        .build()
+//!        .unwrap();
+//! ```
+
+use crate::errors::*;
+use serde::{Deserialize, Serialize};
+
+/// Level struct that describes threshold-difficulty factor mapping
+#[derive(Debug, Deserialize, Serialize, Copy, Clone, PartialEq)]
+pub struct Level {
+    pub visitor_threshold: u32,
+    pub difficulty_factor: u32,
+}
+
+/// Bulder struct for [Level] to describe threshold-difficulty factor mapping
+#[derive(Debug, Copy, Clone, PartialEq)]
+pub struct LevelBuilder {
+    visitor_threshold: Option<u32>,
+    difficulty_factor: Option<u32>,
+}
+
+impl Default for LevelBuilder {
+    fn default() -> Self {
+        LevelBuilder {
+            visitor_threshold: None,
+            difficulty_factor: None,
+        }
+    }
+}
+
+impl LevelBuilder {
+    /// set visitor count for level
+    pub fn visitor_threshold(&mut self, visitor_threshold: u32) -> &mut Self {
+        self.visitor_threshold = Some(visitor_threshold);
+        self
+    }
+
+    /// set difficulty factor for level. difficulty_factor can't be zero because
+    /// Difficulty is calculated as:
+    /// ```no_run
+    /// let difficulty_factor = 500;
+    /// let difficulty = u128::max_value() - u128::max_value() / difficulty_factor;
+    /// ```
+    /// the higher the `difficulty_factor`, the higher the difficulty.
+    pub fn difficulty_factor(&mut self, difficulty_factor: u32) -> CaptchaResult<&mut Self> {
+        if difficulty_factor > 0 {
+            self.difficulty_factor = Some(difficulty_factor);
+            Ok(self)
+        } else {
+            Err(CaptchaError::DifficultyFactorZero)
+        }
+    }
+
+    /// build Level struct
+    pub fn build(&mut self) -> CaptchaResult<Level> {
+        if self.visitor_threshold.is_none() {
+            Err(CaptchaError::SetVisitorThreshold)
+        } else if self.difficulty_factor.is_none() {
+            Err(CaptchaError::SetDifficultyFactor)
+        } else {
+            Ok(Level {
+                difficulty_factor: self.difficulty_factor.unwrap(),
+                visitor_threshold: self.visitor_threshold.unwrap(),
+            })
+        }
+    }
+}
+
+/// struct describes all the different [Level]s at which an mCaptcha system operates
+#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
+pub struct Defense {
+    levels: Vec<Level>,
+    // index of current visitor threshold
+    current_visitor_threshold: usize,
+}
+
+/// Builder struct for [Defense]
+#[derive(Debug, Clone, PartialEq)]
+pub struct DefenseBuilder {
+    levels: Vec<Level>,
+}
+
+impl Default for DefenseBuilder {
+    fn default() -> Self {
+        DefenseBuilder { levels: vec![] }
+    }
+}
+
+impl DefenseBuilder {
+    /// add a level to [Defense]
+    pub fn add_level(&mut self, level: Level) -> CaptchaResult<&mut Self> {
+        for i in self.levels.iter() {
+            if i.visitor_threshold == level.visitor_threshold {
+                return Err(CaptchaError::DuplicateVisitorCount);
+            }
+        }
+        self.levels.push(level);
+        Ok(self)
+    }
+
+    /// Build [Defense]
+    pub fn build(&mut self) -> CaptchaResult<Defense> {
+        if !self.levels.is_empty() {
+            // sort levels to arrange in ascending order
+            self.levels.sort_by_key(|a| a.visitor_threshold);
+
+            for level in self.levels.iter() {
+                if level.difficulty_factor == 0 {
+                    return Err(CaptchaError::DifficultyFactorZero);
+                }
+            }
+
+            // as visitor count increases, difficulty_factor too should increse
+            // if it decreses, an error must be thrown
+            for i in 0..self.levels.len() - 1 {
+                if self.levels[i].difficulty_factor > self.levels[i + 1].difficulty_factor {
+                    return Err(CaptchaError::DecreaseingDifficultyFactor);
+                }
+            }
+
+            Ok(Defense {
+                levels: self.levels.to_owned(),
+                current_visitor_threshold: 0,
+            })
+        } else {
+            Err(CaptchaError::LevelEmpty)
+        }
+    }
+}
+
+impl Defense {
+    ///! Difficulty is calculated as:
+    ///! ```rust
+    ///! let difficulty = u128::max_value() - u128::max_value() / difficulty_factor;
+    ///! ```
+    ///! The higher the `difficulty_factor`, the higher the difficulty.
+
+    /// Get difficulty factor of current level of defense
+    pub fn get_difficulty(&self) -> u32 {
+        self.levels[self.current_visitor_threshold].difficulty_factor
+    }
+
+    /// tighten up defense. Increases defense level by a factor of one.
+    /// When defense is at max level, calling this method will have no effect
+    pub fn tighten_up(&mut self) {
+        if self.current_visitor_threshold != self.levels.len() - 1 {
+            self.current_visitor_threshold += 1;
+        }
+    }
+    /// Loosen up defense. Decreases defense level by a factor of one.
+    /// When defense is at the lowest level, calling this method will have no effect.
+    pub fn loosen_up(&mut self) {
+        if self.current_visitor_threshold != 0 {
+            self.current_visitor_threshold -= 1;
+        }
+    }
+
+    /// Set defense to maximum level
+    pub fn max_defense(&mut self) {
+        self.current_visitor_threshold = self.levels.len() - 1;
+    }
+
+    /// Set defense to minimum level
+    pub fn min_defense(&mut self) {
+        self.current_visitor_threshold = 0;
+    }
+
+    /// Get current level's  visitor threshold
+    pub fn visitor_threshold(&self) -> u32 {
+        self.levels[self.current_visitor_threshold].visitor_threshold
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn level_builder_works() {
+        let level = LevelBuilder::default()
+            .difficulty_factor(1)
+            .unwrap()
+            .visitor_threshold(0)
+            .build()
+            .unwrap();
+
+        assert_eq!(level.visitor_threshold, 0);
+        assert_eq!(level.difficulty_factor, 1);
+
+        assert_eq!(
+            LevelBuilder::default().difficulty_factor(0),
+            Err(CaptchaError::DifficultyFactorZero)
+        );
+
+        assert_eq!(
+            LevelBuilder::default()
+                .difficulty_factor(1)
+                .unwrap()
+                .build(),
+            Err(CaptchaError::SetVisitorThreshold)
+        );
+        assert_eq!(
+            LevelBuilder::default().visitor_threshold(10).build(),
+            Err(CaptchaError::SetDifficultyFactor)
+        );
+    }
+
+    #[test]
+    fn defense_builder_duplicate_visitor_threshold() {
+        let mut defense_builder = DefenseBuilder::default();
+        let err = defense_builder
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            );
+        assert_eq!(err, Err(CaptchaError::DuplicateVisitorCount));
+    }
+
+    #[test]
+    fn defense_builder_decreasing_difficulty_factor() {
+        let mut defense_builder = DefenseBuilder::default();
+        let err = defense_builder
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(500)
+                    .difficulty_factor(10)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .build();
+        assert_eq!(err, Err(CaptchaError::DecreaseingDifficultyFactor));
+    }
+
+    fn get_defense() -> Defense {
+        DefenseBuilder::default()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(500)
+                    .difficulty_factor(5000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(5000)
+                    .difficulty_factor(50000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50000)
+                    .difficulty_factor(500000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(500000)
+                    .difficulty_factor(5000000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .build()
+            .unwrap()
+    }
+    #[test]
+    fn defense_builder_works() {
+        let defense = get_defense();
+
+        assert_eq!(defense.levels[0].difficulty_factor, 50);
+        assert_eq!(defense.levels[1].difficulty_factor, 5000);
+        assert_eq!(defense.levels[2].difficulty_factor, 50_000);
+        assert_eq!(defense.levels[3].difficulty_factor, 500_000);
+        assert_eq!(defense.levels[4].difficulty_factor, 5_000_000);
+    }
+
+    #[test]
+    fn tighten_up_works() {
+        let mut defense = get_defense();
+
+        assert_eq!(defense.get_difficulty(), 50);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 5_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 50_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 500_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+    }
+
+    #[test]
+    fn max_defense_works() {
+        let mut defense = get_defense();
+        defense.max_defense();
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+    }
+
+    #[test]
+    fn minimum_defense_works() {
+        let mut defense = get_defense();
+        defense.min_defense();
+        assert_eq!(defense.get_difficulty(), 50);
+    }
+
+    #[test]
+    fn loosen_up_works() {
+        let mut defense = get_defense();
+        defense.max_defense();
+
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 500_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 50_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 5_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 50);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 50);
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/src/m_captcha/errors.rs.html b/api-docs/m_captcha/0.1.1/src/m_captcha/errors.rs.html new file mode 100644 index 0000000..3f924af --- /dev/null +++ b/api-docs/m_captcha/0.1.1/src/m_captcha/errors.rs.html @@ -0,0 +1,160 @@ +errors.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+//! Errors and Result module
+use derive_more::{Display, Error};
+
+/// Error datatype
+#[derive(Debug, PartialEq, Display, Clone, Error)]
+#[cfg(not(tarpaulin_include))]
+pub enum CaptchaError {
+    /// When configuring m_captcha, [DefenseBuilder][crate::defense::DefenseBuilder]
+    /// must be passed atleast one `LevelConfig` if not this error will arise
+    #[display(fmt = "LevelBuilder should have atleaset one level configured")]
+    LevelEmpty,
+
+    /// Visitor count must be a whole number(zero and above).
+    /// When configuring m_captcha, [LevelBuilder][crate::defense::LevelBuilder].
+    /// difficulty_factor must be set to greater than zero.
+    #[display(fmt = "difficulty factor must be greater than zero")]
+    DifficultyFactorZero,
+
+    /// captcha cooldown duration must be greater than 0
+    #[display(fmt = "difficulty factor must be greater than zero")]
+    CaptchaDurationZero,
+
+    /// Difficulty factor must be set
+    #[display(fmt = "Set difficulty factor")]
+    SetDifficultyFactor,
+
+    /// Visitor threshold must be set
+    #[display(fmt = "Set visitor threshold")]
+    SetVisitorThreshold,
+
+    /// Visitor count must be Unique
+    #[display(fmt = "Duplicate visitor count")]
+    DuplicateVisitorCount,
+
+    /// Difficulty factor should increase with level
+    #[display(fmt = "Difficulty factor should increase with level")]
+    DecreaseingDifficultyFactor,
+
+    /// Difficulty factor should increase with level
+    #[display(fmt = "Actor mailbox error")]
+    MailboxError,
+
+    /// Happens when submitted work doesn't satisfy the required
+    /// difficulty factor
+    #[display(fmt = "Insuffiencient Difficulty")]
+    InsuffiencientDifficulty,
+
+    /// Happens when submitted work is computed over string that
+    /// isn't in cache
+    #[display(fmt = "String now found")]
+    StringNotFound,
+
+    /// Used in builder structs when a value is not set
+    #[display(fmt = "Please set value: {}", _0)]
+    PleaseSetValue(#[error(not(source))] String),
+}
+
+/// [Result] datatype for m_captcha
+pub type CaptchaResult<V> = std::result::Result<V, CaptchaError>;
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/src/m_captcha/lib.rs.html b/api-docs/m_captcha/0.1.1/src/m_captcha/lib.rs.html new file mode 100644 index 0000000..1f6dff4 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/src/m_captcha/lib.rs.html @@ -0,0 +1,366 @@ +lib.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! mCaptcha is a proof of work based Denaial-of-Service attack protection system.
+//! This is is a server library that you can embed in your services to protect your
+//! servers.
+//!
+//! A commercial managed solution is in the works but I'd much rather prefer
+//! folks host their own instances as it will make the more decentralized and free.
+//!
+//! In mCaptcha, defense is adjusted in discrete levels that depend on the
+//! ammount of traffic that a service is experiencing. So users of this library are
+//! requested to benchmark their target machines before configuring their mCaptcha
+//! component.
+//!
+//! ## Terminology:
+//! - Difficulty(Factor): Minimum ammount of work that a client must do to make a valid
+//! request.
+//! - [Defense]: A datatype that various visitor-difficulty mappigns
+//! - Visitor: Smallest unit of traffic, usually a single request. The more you have, the busier
+//! your service is. Determines mCaptcha defense defense
+//! - Visitor threshold: The threshold at which [MCaptcha] will adjust defense defense
+//! - [Cache][crate::cache] : A datatype that implements [Save][crate::cache::Save]. Used to store
+//! PoW requirements to defend against replay attacks and dictionary attacks.
+//! - [Master][crate::master::Master]: A datatype that manages
+//! [MCaptcha][crate::mcaptcha::MCaptcha] actors. Works like a DNS for
+//! [AddVisitor][crate::mcaptcha::AddVisitor] messages.
+//! - [System][crate::system::System]: mCaptcha system that manages cache, master and provides
+//! useful abstractions. An mCaptcha system/instance can have only a single
+//! [System][crate::system::System]
+//!
+//! ## Example:
+//!
+//! ```rust
+//! use m_captcha::{
+//!     cache::HashCache,
+//!     master::{AddSiteBuilder, Master},
+//!     pow::{ConfigBuilder, Work},
+//!     system::SystemBuilder,
+//!     DefenseBuilder, LevelBuilder, MCaptchaBuilder,
+//! };
+//! // traits from actix needs to be in scope for starting actor
+//! use actix::prelude::*;
+//!
+//! #[actix_rt::main]
+//! async fn main() -> std::io::Result<()> {
+//!     // start cahce actor
+//!     // cache is used to store PoW requirements that are sent to clients
+//!     // This way, it can be verified that the client computed work over a config
+//!     // that _we_ sent. Offers protection against rainbow tables powered dictionary attacks
+//!     let cache = HashCache::default().start();
+//!
+//!     // create PoW config with unique salt. Salt has to be safely guarded.
+//!     // salts protect us from replay attacks
+//!     let pow = ConfigBuilder::default()
+//!         .salt("myrandomsaltisnotlongenoug".into())
+//!         .build()
+//!         .unwrap();
+//!
+//!     // start master actor. Master actor is responsible for managing MCaptcha actors
+//!     // each mCaptcha system should have only one master
+//!     let master = Master::new(5).start();
+//!
+//!     // Create system. System encapsulates master and cache and provides useful abstraction
+//!     // each mCaptcha system should have only one system
+//!     let system = SystemBuilder::default()
+//!         .master(master)
+//!         .cache(cache)
+//!         .pow(pow.clone())
+//!         .build()
+//!         .unwrap();
+//!
+//!     // configure defense. This is a per site configuration. A site can have several levels
+//!     // of defenses configured
+//!     let defense = DefenseBuilder::default()
+//!         // add as many defense as you see fit
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 // visitor_threshold is the threshold/limit at which
+//!                 // mCaptcha will adjust difficulty defense
+//!                 // it is advisable to set small values for the first
+//!                 // defense visitor_threshold and difficulty_factor
+//!                 // as this will be the work that clients will be
+//!                 // computing when there's no load
+//!                 .visitor_threshold(50)
+//!                 .difficulty_factor(500)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 .visitor_threshold(5000)
+//!                 .difficulty_factor(50000)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .build()
+//!         .unwrap();
+//!
+//!     // create and start MCaptcha actor that uses the above defense configuration
+//!     // This is what manages the difficulty factor of sites that an mCaptcha protects
+//!     let mcaptcha = MCaptchaBuilder::default()
+//!         .defense(defense)
+//!         // leaky bucket algorithm's emission interval
+//!         .duration(30)
+//!         //   .cache(cache)
+//!         .build()
+//!         .unwrap()
+//!         .start();
+//!
+//!     // unique value identifying an MCaptcha actor
+//!     let mcaptcha_name = "batsense.net";
+//!
+//!     // add MCaptcha to Master
+//!     let msg = AddSiteBuilder::default()
+//!         .id(mcaptcha_name.into())
+//!         .addr(mcaptcha.clone())
+//!         .build()
+//!         .unwrap();
+//!     system.master.send(msg).await.unwrap();
+//!
+//!     // Get PoW config. Should be called everytime there's a visitor for a
+//!     // managed site(here mcaptcha_name)
+//!     let work_req = system.get_pow(mcaptcha_name.into()).await.unwrap();
+//!
+//!     // the following computation should be done on the client but for the purpose
+//!     // of this illustration, we are going to do it on the server it self
+//!     let work = pow
+//!         .prove_work(&work_req.string, work_req.difficulty_factor)
+//!         .unwrap();
+//!
+//!     // the payload that the client sends to the server
+//!     let payload = Work {
+//!         string: work_req.string,
+//!         result: work.result,
+//!         nonce: work.nonce,
+//!     };
+//!
+//!     // Server evaluates client's work. Returns true if everything
+//!     // checksout and Err() if something fishy is happening
+//!     let res = system.verify_pow(payload.clone()).await.unwrap();
+//!     assert!(res);
+//!
+//!     Ok(())
+//! }
+//! ```
+#![forbid(unsafe_code)]
+pub mod defense;
+pub mod errors;
+pub mod master;
+pub mod mcaptcha;
+
+/// message datatypes to interact with [MCaptcha] actor
+pub mod cache;
+pub mod pow;
+pub mod system;
+mod utils;
+
+pub use crate::cache::hashcache::HashCache;
+
+pub use defense::{Defense, DefenseBuilder, LevelBuilder};
+pub use mcaptcha::{MCaptcha, MCaptchaBuilder};
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/src/m_captcha/master.rs.html b/api-docs/m_captcha/0.1.1/src/m_captcha/master.rs.html new file mode 100644 index 0000000..88210ed --- /dev/null +++ b/api-docs/m_captcha/0.1.1/src/m_captcha/master.rs.html @@ -0,0 +1,398 @@ +master.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! [Master] actor module that manages [MCaptcha] actors
+use std::collections::BTreeMap;
+use std::time::Duration;
+
+use actix::clock::delay_for;
+use actix::dev::*;
+use derive_builder::Builder;
+
+use crate::mcaptcha::MCaptcha;
+
+/// This Actor manages the [MCaptcha] actors.
+/// A service can have several [MCaptcha] actors with
+/// varying [Defense][crate::defense::Defense] configurations
+/// so a "master" actor is needed to manage them all
+#[derive(Clone)]
+pub struct Master {
+    sites: BTreeMap<String, (Option<()>, Addr<MCaptcha>)>,
+    gc: u64,
+}
+
+impl Master {
+    /// add [MCaptcha] actor to [Master]
+    pub fn add_site(&mut self, details: AddSite) {
+        self.sites
+            .insert(details.id, (None, details.addr.to_owned()));
+    }
+
+    /// create new master
+    /// accepts a `u64` to configure garbage collection period
+    pub fn new(gc: u64) -> Self {
+        Master {
+            sites: BTreeMap::new(),
+            gc,
+        }
+    }
+
+    /// get [MCaptcha] actor from [Master]
+    pub fn get_site<'a, 'b>(&'a mut self, id: &'b str) -> Option<Addr<MCaptcha>> {
+        let mut r = None;
+        if let Some((read_val, addr)) = self.sites.get_mut(id) {
+            r = Some(addr.clone());
+            *read_val = Some(());
+        };
+        r
+    }
+
+    /// remvoes [MCaptcha] actor from [Master]
+    pub fn rm_site(&mut self, id: &str) {
+        self.sites.remove(id);
+    }
+}
+
+impl Actor for Master {
+    type Context = Context<Self>;
+
+    fn started(&mut self, ctx: &mut Self::Context) {
+        let addr = ctx.address();
+        let task = async move {
+            addr.send(CleanUp).await.unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(task);
+    }
+}
+
+/// Message to get an [MCaptcha] actor from master
+#[derive(Message)]
+#[rtype(result = "Option<Addr<MCaptcha>>")]
+pub struct GetSite(pub String);
+
+impl Handler<GetSite> for Master {
+    type Result = MessageResult<GetSite>;
+
+    fn handle(&mut self, m: GetSite, _ctx: &mut Self::Context) -> Self::Result {
+        let addr = self.get_site(&m.0);
+        if addr.is_none() {
+            return MessageResult(None);
+        } else {
+            return MessageResult(Some(addr.unwrap().clone()));
+        }
+    }
+}
+
+/// Message to clean up master of [MCaptcha] actors with zero visitor count
+#[derive(Message)]
+#[rtype(result = "()")]
+pub struct CleanUp;
+
+impl Handler<CleanUp> for Master {
+    type Result = ();
+
+    fn handle(&mut self, _: CleanUp, ctx: &mut Self::Context) -> Self::Result {
+        let sites = self.sites.clone();
+        let gc = self.gc;
+        let master = ctx.address();
+        println!("init cleanup up");
+        let task = async move {
+            for (id, (new, addr)) in sites.iter() {
+                use crate::mcaptcha::{GetCurrentVisitorCount, Stop};
+                let visitor_count = addr.send(GetCurrentVisitorCount).await.unwrap();
+                println!("{}", visitor_count);
+                if visitor_count == 0 && new.is_some() {
+                    addr.send(Stop).await.unwrap();
+                    master.send(RemoveSite(id.to_owned())).await.unwrap();
+                    println!("cleaned up");
+                }
+            }
+
+            let duration = Duration::new(gc, 0);
+            delay_for(duration).await;
+            master.send(CleanUp).await.unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(task);
+    }
+}
+
+/// Message to delete [MCaptcha] actor
+#[derive(Message)]
+#[rtype(result = "()")]
+pub struct RemoveSite(pub String);
+
+impl Handler<RemoveSite> for Master {
+    type Result = ();
+
+    fn handle(&mut self, m: RemoveSite, _ctx: &mut Self::Context) -> Self::Result {
+        self.rm_site(&m.0);
+    }
+}
+
+/// Message to add an [MCaptcha] actor to [Master]
+#[derive(Message, Builder)]
+#[rtype(result = "()")]
+pub struct AddSite {
+    pub id: String,
+    pub addr: Addr<MCaptcha>,
+}
+
+impl Handler<AddSite> for Master {
+    type Result = ();
+
+    fn handle(&mut self, m: AddSite, _ctx: &mut Self::Context) -> Self::Result {
+        self.add_site(m);
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::mcaptcha::tests::*;
+
+    #[actix_rt::test]
+    async fn master_actor_works() {
+        let addr = Master::new(1).start();
+
+        let id = "yo";
+        let mcaptcha = get_counter().start();
+        let msg = AddSiteBuilder::default()
+            .id(id.into())
+            .addr(mcaptcha.clone())
+            .build()
+            .unwrap();
+
+        addr.send(msg).await.unwrap();
+
+        let mcaptcha_addr = addr.send(GetSite(id.into())).await.unwrap();
+        assert_eq!(mcaptcha_addr, Some(mcaptcha));
+
+        let addr_doesnt_exist = addr.send(GetSite("a".into())).await.unwrap();
+        assert!(addr_doesnt_exist.is_none());
+
+        let timer_expire = Duration::new(DURATION, 0);
+        delay_for(timer_expire).await;
+        delay_for(timer_expire).await;
+
+        let mcaptcha_addr = addr.send(GetSite(id.into())).await.unwrap();
+        assert_eq!(mcaptcha_addr, None);
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/src/m_captcha/mcaptcha.rs.html b/api-docs/m_captcha/0.1.1/src/m_captcha/mcaptcha.rs.html new file mode 100644 index 0000000..b79cad9 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/src/m_captcha/mcaptcha.rs.html @@ -0,0 +1,768 @@ +mcaptcha.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! MCaptcha actor module that manages defense levels
+//!
+//! ## Usage:
+//! ```rust
+//! use m_captcha::{mcaptcha::AddVisitor, MCaptchaBuilder, cache::HashCache, LevelBuilder, DefenseBuilder};
+//! // traits from actix needs to be in scope for starting actor
+//! use actix::prelude::*;
+//!
+//! #[actix_rt::main]
+//! async fn main() -> std::io::Result<()> {
+//!     // configure defense
+//!     let defense = DefenseBuilder::default()
+//!         // add as many levels as you see fit
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 // visitor_threshold is the threshold/limit at which
+//!                 // mCaptcha will adjust difficulty levels
+//!                 // it is advisable to set small values for the first
+//!                 // levels visitor_threshold and difficulty_factor
+//!                 // as this will be the work that clients will be
+//!                 // computing when there's no load
+//!                 .visitor_threshold(50)
+//!                 .difficulty_factor(500)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 .visitor_threshold(5000)
+//!                 .difficulty_factor(50000)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .build()
+//!         .unwrap();
+//!
+//!     // create and start MCaptcha actor
+//!     //let cache = HashCache::default().start();
+//!     let mcaptcha = MCaptchaBuilder::default()
+//!         .defense(defense)
+//!         // leaky bucket algorithm's emission interval
+//!         .duration(30)
+//!         .build()
+//!         .unwrap()
+//!         .start();
+//!
+//!     // increment count when user visits protected routes
+//!     mcaptcha.send(AddVisitor).await.unwrap();
+//!
+//!     Ok(())
+//! }
+//! ```
+
+use std::time::Duration;
+
+use actix::clock::delay_for;
+use actix::dev::*;
+use serde::{Deserialize, Serialize};
+
+use crate::{
+    defense::Defense,
+    errors::{CaptchaError, CaptchaResult},
+};
+
+/// Builder for [MCaptcha]
+#[derive(Clone, Serialize, Deserialize, Debug)]
+pub struct MCaptchaBuilder {
+    visitor_threshold: u32,
+    defense: Option<Defense>,
+    duration: Option<u64>,
+}
+
+impl Default for MCaptchaBuilder {
+    fn default() -> Self {
+        MCaptchaBuilder {
+            visitor_threshold: 0,
+            defense: None,
+            duration: None,
+        }
+    }
+}
+
+/// This struct represents the mCaptcha state and is used
+/// to configure leaky-bucket lifetime and manage defense
+#[derive(Clone, Serialize, Deserialize, Debug)]
+pub struct MCaptcha {
+    visitor_threshold: u32,
+    defense: Defense,
+    duration: u64,
+}
+
+impl MCaptchaBuilder {
+    /// set defense
+    pub fn defense(&mut self, d: Defense) -> &mut Self {
+        self.defense = Some(d);
+        self
+    }
+
+    /// set duration
+    pub fn duration(&mut self, d: u64) -> &mut Self {
+        self.duration = Some(d);
+        self
+    }
+
+    /// Builds new [MCaptcha]
+    pub fn build(&mut self) -> CaptchaResult<MCaptcha> {
+        if self.duration.is_none() {
+            Err(CaptchaError::PleaseSetValue("duration".into()))
+        } else if self.defense.is_none() {
+            Err(CaptchaError::PleaseSetValue("defense".into()))
+        } else if self.duration <= Some(0) {
+            Err(CaptchaError::CaptchaDurationZero)
+        } else {
+            let m = MCaptcha {
+                duration: self.duration.unwrap(),
+                defense: self.defense.clone().unwrap(),
+                visitor_threshold: self.visitor_threshold,
+            };
+            Ok(m)
+        }
+    }
+}
+
+impl MCaptcha {
+    /// increments the visitor count by one
+    pub fn add_visitor(&mut self) {
+        self.visitor_threshold += 1;
+        if self.visitor_threshold > self.defense.visitor_threshold() {
+            self.defense.tighten_up();
+        } else {
+            self.defense.loosen_up();
+        }
+    }
+
+    /// decrements the visitor count by one
+    pub fn decrement_visitor(&mut self) {
+        if self.visitor_threshold > 0 {
+            self.visitor_threshold -= 1;
+        }
+    }
+
+    /// get current difficulty factor
+    pub fn get_difficulty(&self) -> u32 {
+        self.defense.get_difficulty()
+    }
+
+    /// get [MCaptcha]'s lifetime
+    pub fn get_duration(&self) -> u64 {
+        self.duration
+    }
+}
+impl Actor for MCaptcha {
+    type Context = Context<Self>;
+}
+
+/// Message to decrement the visitor count
+#[derive(Message)]
+#[rtype(result = "()")]
+struct DeleteVisitor;
+
+impl Handler<DeleteVisitor> for MCaptcha {
+    type Result = ();
+    fn handle(&mut self, _msg: DeleteVisitor, _ctx: &mut Self::Context) -> Self::Result {
+        self.decrement_visitor();
+    }
+}
+
+/// Message to increment the visitor count
+/// returns difficulty factor and lifetime
+#[derive(Message)]
+#[rtype(result = "AddVisitorResult")]
+pub struct AddVisitor;
+
+/// Struct representing the return datatime of
+/// [AddVisitor] message. Contains MCaptcha lifetime
+/// and difficulty factor
+#[derive(Debug, Clone, Deserialize, Serialize)]
+pub struct AddVisitorResult {
+    pub duration: u64,
+    pub difficulty_factor: u32,
+}
+
+impl AddVisitorResult {
+    fn new(m: &MCaptcha) -> Self {
+        AddVisitorResult {
+            duration: m.get_duration(),
+            difficulty_factor: m.get_difficulty(),
+        }
+    }
+}
+
+impl Handler<AddVisitor> for MCaptcha {
+    type Result = MessageResult<AddVisitor>;
+
+    fn handle(&mut self, _: AddVisitor, ctx: &mut Self::Context) -> Self::Result {
+        let addr = ctx.address();
+
+        let duration: Duration = Duration::new(self.duration.clone(), 0);
+        let wait_for = async move {
+            delay_for(duration).await;
+            addr.send(DeleteVisitor).await.unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(wait_for);
+
+        self.add_visitor();
+        MessageResult(AddVisitorResult::new(&self))
+    }
+}
+
+/// Message to get the visitor count
+#[derive(Message)]
+#[rtype(result = "u32")]
+pub struct GetCurrentVisitorCount;
+
+impl Handler<GetCurrentVisitorCount> for MCaptcha {
+    type Result = MessageResult<GetCurrentVisitorCount>;
+
+    fn handle(&mut self, _: GetCurrentVisitorCount, _ctx: &mut Self::Context) -> Self::Result {
+        MessageResult(self.visitor_threshold)
+    }
+}
+
+/// Message to stop [MCaptcha]
+#[derive(Message)]
+#[rtype(result = "()")]
+pub struct Stop;
+
+impl Handler<Stop> for MCaptcha {
+    type Result = ();
+
+    fn handle(&mut self, _: Stop, ctx: &mut Self::Context) -> Self::Result {
+        ctx.stop()
+    }
+}
+
+#[cfg(test)]
+pub mod tests {
+    use super::*;
+    use crate::defense::*;
+
+    // constants for testing
+    // (visitor count, level)
+    pub const LEVEL_1: (u32, u32) = (50, 50);
+    pub const LEVEL_2: (u32, u32) = (500, 500);
+    pub const DURATION: u64 = 5;
+
+    type MyActor = Addr<MCaptcha>;
+
+    pub fn get_defense() -> Defense {
+        DefenseBuilder::default()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(LEVEL_1.0)
+                    .difficulty_factor(LEVEL_1.1)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(LEVEL_2.0)
+                    .difficulty_factor(LEVEL_2.1)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .build()
+            .unwrap()
+    }
+
+    async fn race(addr: Addr<MCaptcha>, count: (u32, u32)) {
+        for _ in 0..count.0 as usize - 1 {
+            let _ = addr.send(AddVisitor).await.unwrap();
+        }
+    }
+
+    pub fn get_counter() -> MCaptcha {
+        MCaptchaBuilder::default()
+            .defense(get_defense())
+            .duration(DURATION)
+            .build()
+            .unwrap()
+    }
+
+    #[actix_rt::test]
+    async fn counter_defense_tightenup_works() {
+        let addr: MyActor = get_counter().start();
+
+        let mut mcaptcha = addr.send(AddVisitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_1.0);
+
+        race(addr.clone(), LEVEL_2).await;
+        mcaptcha = addr.send(AddVisitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_2.1);
+    }
+
+    #[actix_rt::test]
+    async fn counter_defense_loosenup_works() {
+        use actix::clock::delay_for;
+        let addr: MyActor = get_counter().start();
+
+        race(addr.clone(), LEVEL_2).await;
+        race(addr.clone(), LEVEL_2).await;
+        let mut mcaptcha = addr.send(AddVisitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_2.1);
+
+        let duration = Duration::new(DURATION, 0);
+        delay_for(duration).await;
+
+        mcaptcha = addr.send(AddVisitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_1.1);
+    }
+
+    #[test]
+    fn test_mcatcptha_builder() {
+        let defense = get_defense();
+        let m = MCaptchaBuilder::default()
+            .duration(0)
+            .defense(defense.clone())
+            .build();
+
+        assert_eq!(m.err(), Some(CaptchaError::CaptchaDurationZero));
+
+        let m = MCaptchaBuilder::default().duration(30).build();
+        assert_eq!(
+            m.err(),
+            Some(CaptchaError::PleaseSetValue("defense".into()))
+        );
+
+        let m = MCaptchaBuilder::default().defense(defense.clone()).build();
+        assert_eq!(
+            m.err(),
+            Some(CaptchaError::PleaseSetValue("duration".into()))
+        );
+    }
+
+    #[actix_rt::test]
+    async fn get_current_visitor_count_works() {
+        let addr: MyActor = get_counter().start();
+
+        addr.send(AddVisitor).await.unwrap();
+        addr.send(AddVisitor).await.unwrap();
+        addr.send(AddVisitor).await.unwrap();
+        addr.send(AddVisitor).await.unwrap();
+        let count = addr.send(GetCurrentVisitorCount).await.unwrap();
+
+        assert_eq!(count, 4);
+    }
+
+    #[actix_rt::test]
+    #[should_panic]
+    async fn stop_works() {
+        let addr: MyActor = get_counter().start();
+        addr.send(Stop).await.unwrap();
+        addr.send(AddVisitor).await.unwrap();
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/src/m_captcha/pow.rs.html b/api-docs/m_captcha/0.1.1/src/m_captcha/pow.rs.html new file mode 100644 index 0000000..c48edb1 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/src/m_captcha/pow.rs.html @@ -0,0 +1,126 @@ +pow.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+//! PoW datatypes used in client-server interaction
+use pow_sha256::PoW;
+use serde::{Deserialize, Serialize};
+
+pub use pow_sha256::ConfigBuilder;
+
+/// PoW requirement datatype that is be sent to clients for generating PoW
+#[derive(Clone, Serialize, Deserialize, Debug)]
+pub struct PoWConfig {
+    pub string: String,
+    pub difficulty_factor: u32,
+}
+impl PoWConfig {
+    /// create new instance of [PoWConfig]
+    pub fn new(m: u32) -> Self {
+        use crate::utils::get_random;
+
+        PoWConfig {
+            string: get_random(32),
+            difficulty_factor: m,
+        }
+    }
+}
+
+/// PoW datatype that clients send to server
+#[derive(Clone, Serialize, Deserialize, Debug)]
+pub struct Work {
+    pub string: String,
+    pub result: String,
+    pub nonce: u64,
+}
+
+impl From<Work> for PoW<String> {
+    fn from(w: Work) -> Self {
+        use pow_sha256::PoWBuilder;
+        PoWBuilder::default()
+            .result(w.result)
+            .nonce(w.nonce)
+            .build()
+            .unwrap()
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/src/m_captcha/system.rs.html b/api-docs/m_captcha/0.1.1/src/m_captcha/system.rs.html new file mode 100644 index 0000000..f6f24fc --- /dev/null +++ b/api-docs/m_captcha/0.1.1/src/m_captcha/system.rs.html @@ -0,0 +1,332 @@ +system.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! module describing mCaptcha system
+use actix::dev::*;
+use derive_builder::Builder;
+use pow_sha256::{Config, PoW};
+
+use crate::cache::messages;
+use crate::cache::Save;
+use crate::errors::*;
+use crate::master::Master;
+use crate::pow::*;
+
+/// struct describing various bits of data required for an mCaptcha system
+#[derive(Clone, Builder)]
+pub struct System<T: Save> {
+    pub master: Addr<Master>,
+    cache: Addr<T>,
+    pow: Config,
+}
+
+impl<T> System<T>
+where
+    T: Save,
+    <T as actix::Actor>::Context: ToEnvelope<T, messages::Cache> + ToEnvelope<T, messages::Retrive>,
+{
+    /// utility function to get difficulty factor of site `id` and cache it
+    pub async fn get_pow(&self, id: String) -> Option<PoWConfig> {
+        use crate::cache::messages::Cache;
+        use crate::master::GetSite;
+        use crate::mcaptcha::AddVisitor;
+
+        let site_addr = self.master.send(GetSite(id)).await.unwrap();
+        if site_addr.is_none() {
+            return None;
+        }
+        let mcaptcha = site_addr.unwrap().send(AddVisitor).await.unwrap();
+        let pow_config = PoWConfig::new(mcaptcha.difficulty_factor);
+
+        let cache_msg = Cache::new(&pow_config, &mcaptcha);
+        self.cache.send(cache_msg).await.unwrap().unwrap();
+        Some(pow_config)
+    }
+
+    /// utility function to verify [Work]
+    pub async fn verify_pow(&self, work: Work) -> CaptchaResult<bool> {
+        use crate::cache::messages::Retrive;
+
+        let string = work.string.clone();
+        let msg = Retrive(string.clone());
+        let pow: PoW<String> = work.into();
+
+        let difficulty = self.cache.send(msg).await.unwrap()?;
+        match difficulty {
+            Some(difficulty) => {
+                if self.pow.is_sufficient_difficulty(&pow, difficulty) {
+                    Ok(self.pow.is_valid_proof(&pow, &string))
+                } else {
+                    Err(CaptchaError::InsuffiencientDifficulty)
+                }
+            }
+            None => Err(CaptchaError::StringNotFound),
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+
+    use pow_sha256::ConfigBuilder;
+
+    use super::System;
+    use super::*;
+    use crate::cache::HashCache;
+    use crate::master::*;
+    use crate::mcaptcha::tests::*;
+
+    const MCAPTCHA_NAME: &str = "batsense.net";
+
+    async fn boostrap_system(gc: u64) -> System<HashCache> {
+        let master = Master::new(gc).start();
+        let mcaptcha = get_counter().start();
+        let pow = get_config();
+
+        let cache = HashCache::default().start();
+        let msg = AddSiteBuilder::default()
+            .id(MCAPTCHA_NAME.into())
+            .addr(mcaptcha.clone())
+            .build()
+            .unwrap();
+
+        master.send(msg).await.unwrap();
+
+        SystemBuilder::default()
+            .master(master)
+            .cache(cache)
+            .pow(pow)
+            .build()
+            .unwrap()
+    }
+
+    fn get_config() -> Config {
+        ConfigBuilder::default()
+            .salt("myrandomsaltisnotlongenoug".into())
+            .build()
+            .unwrap()
+    }
+
+    #[actix_rt::test]
+    async fn get_pow_works() {
+        let actors = boostrap_system(10).await;
+        let pow = actors.get_pow(MCAPTCHA_NAME.into()).await.unwrap();
+        assert_eq!(pow.difficulty_factor, LEVEL_1.0);
+    }
+
+    #[actix_rt::test]
+    async fn verify_pow_works() {
+        let actors = boostrap_system(10).await;
+        let work_req = actors.get_pow(MCAPTCHA_NAME.into()).await.unwrap();
+        let config = get_config();
+
+        let work = config
+            .prove_work(&work_req.string, work_req.difficulty_factor)
+            .unwrap();
+        let mut payload = Work {
+            string: work_req.string,
+            result: work.result,
+            nonce: work.nonce,
+        };
+
+        let res = actors.verify_pow(payload.clone()).await.unwrap();
+        assert!(res);
+
+        payload.string = "wrongstring".into();
+        let res = actors.verify_pow(payload.clone()).await;
+        assert_eq!(res, Err(CaptchaError::StringNotFound));
+
+        let insufficient_work_req = actors.get_pow(MCAPTCHA_NAME.into()).await.unwrap();
+        let insufficient_work = config.prove_work(&insufficient_work_req.string, 1).unwrap();
+        let insufficient_work_payload = Work {
+            string: insufficient_work_req.string,
+            result: insufficient_work.result,
+            nonce: insufficient_work.nonce,
+        };
+        let res = actors.verify_pow(insufficient_work_payload.clone()).await;
+        assert_eq!(res, Err(CaptchaError::InsuffiencientDifficulty));
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/src/m_captcha/utils.rs.html b/api-docs/m_captcha/0.1.1/src/m_captcha/utils.rs.html new file mode 100644 index 0000000..5532440 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/src/m_captcha/utils.rs.html @@ -0,0 +1,72 @@ +utils.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+// utility function to get a randomly generated string
+// of size len
+pub fn get_random(len: usize) -> String {
+    use std::iter;
+
+    use rand::{distributions::Alphanumeric, rngs::ThreadRng, thread_rng, Rng};
+
+    let mut rng: ThreadRng = thread_rng();
+
+    iter::repeat(())
+        .map(|()| rng.sample(Alphanumeric))
+        .map(char::from)
+        .take(len)
+        .collect::<String>()
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/src/unicode_xid/lib.rs.html b/api-docs/m_captcha/0.1.1/src/unicode_xid/lib.rs.html new file mode 100644 index 0000000..4f28090 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/src/unicode_xid/lib.rs.html @@ -0,0 +1,172 @@ +lib.rs - source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! Determine if a `char` is a valid identifier for a parser and/or lexer according to
+//! [Unicode Standard Annex #31](http://www.unicode.org/reports/tr31/) rules.
+//!
+//! ```rust
+//! extern crate unicode_xid;
+//!
+//! use unicode_xid::UnicodeXID;
+//!
+//! fn main() {
+//!     let ch = 'a';
+//!     println!("Is {} a valid start of an identifier? {}", ch, UnicodeXID::is_xid_start(ch));
+//! }
+//! ```
+//!
+//! # features
+//!
+//! unicode-xid supports a `no_std` feature. This eliminates dependence
+//! on std, and instead uses equivalent functions from core.
+//!
+
+#![forbid(unsafe_code)]
+#![deny(missing_docs)]
+#![doc(
+    html_logo_url = "https://unicode-rs.github.io/unicode-rs_sm.png",
+    html_favicon_url = "https://unicode-rs.github.io/unicode-rs_sm.png"
+)]
+#![no_std]
+#![cfg_attr(feature = "bench", feature(test, unicode_internals))]
+
+#[cfg(test)]
+#[macro_use]
+extern crate std;
+
+#[cfg(feature = "bench")]
+extern crate test;
+
+use tables::derived_property;
+pub use tables::UNICODE_VERSION;
+
+mod tables;
+
+#[cfg(test)]
+mod tests;
+
+/// Methods for determining if a character is a valid identifier character.
+pub trait UnicodeXID {
+    /// Returns whether the specified character satisfies the 'XID_Start'
+    /// Unicode property.
+    ///
+    /// 'XID_Start' is a Unicode Derived Property specified in
+    /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications),
+    /// mostly similar to ID_Start but modified for closure under NFKx.
+    fn is_xid_start(self) -> bool;
+
+    /// Returns whether the specified `char` satisfies the 'XID_Continue'
+    /// Unicode property.
+    ///
+    /// 'XID_Continue' is a Unicode Derived Property specified in
+    /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications),
+    /// mostly similar to 'ID_Continue' but modified for closure under NFKx.
+    fn is_xid_continue(self) -> bool;
+}
+
+impl UnicodeXID for char {
+    #[inline]
+    fn is_xid_start(self) -> bool {
+        derived_property::XID_Start(self)
+    }
+
+    #[inline]
+    fn is_xid_continue(self) -> bool {
+        derived_property::XID_Continue(self)
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/src/unicode_xid/tables.rs.html b/api-docs/m_captcha/0.1.1/src/unicode_xid/tables.rs.html new file mode 100644 index 0000000..44ff13d --- /dev/null +++ b/api-docs/m_captcha/0.1.1/src/unicode_xid/tables.rs.html @@ -0,0 +1,2842 @@ +tables.rs - source
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// NOTE: The following code was generated by "scripts/unicode.py", do not edit directly
+
+#![allow(missing_docs, non_upper_case_globals, non_snake_case)]
+
+/// The version of [Unicode](http://www.unicode.org/)
+/// that this version of unicode-xid is based on.
+pub const UNICODE_VERSION: (u64, u64, u64) = (13, 0, 0);
+
+fn bsearch_range_table(c: char, r: &[(char, char)]) -> bool {
+    use core::cmp::Ordering::{Equal, Greater, Less};
+
+    r.binary_search_by(|&(lo, hi)| {
+        // Because ASCII ranges are at the start of the tables, a search for an
+        // ASCII char will involve more `Greater` results (i.e. the `(lo,hi)`
+        // table entry is greater than `c`) than `Less` results. And given that
+        // ASCII chars are so common, it makes sense to favor them. Therefore,
+        // the `Greater` case is tested for before the `Less` case.
+        if lo > c {
+            Greater
+        } else if hi < c {
+            Less
+        } else {
+            Equal
+        }
+    })
+    .is_ok()
+}
+
+pub mod derived_property {
+    pub const XID_Continue_table: &[(char, char)] = &[
+        ('\u{30}', '\u{39}'),
+        ('\u{41}', '\u{5a}'),
+        ('\u{5f}', '\u{5f}'),
+        ('\u{61}', '\u{7a}'),
+        ('\u{aa}', '\u{aa}'),
+        ('\u{b5}', '\u{b5}'),
+        ('\u{b7}', '\u{b7}'),
+        ('\u{ba}', '\u{ba}'),
+        ('\u{c0}', '\u{d6}'),
+        ('\u{d8}', '\u{f6}'),
+        ('\u{f8}', '\u{2c1}'),
+        ('\u{2c6}', '\u{2d1}'),
+        ('\u{2e0}', '\u{2e4}'),
+        ('\u{2ec}', '\u{2ec}'),
+        ('\u{2ee}', '\u{2ee}'),
+        ('\u{300}', '\u{374}'),
+        ('\u{376}', '\u{377}'),
+        ('\u{37b}', '\u{37d}'),
+        ('\u{37f}', '\u{37f}'),
+        ('\u{386}', '\u{38a}'),
+        ('\u{38c}', '\u{38c}'),
+        ('\u{38e}', '\u{3a1}'),
+        ('\u{3a3}', '\u{3f5}'),
+        ('\u{3f7}', '\u{481}'),
+        ('\u{483}', '\u{487}'),
+        ('\u{48a}', '\u{52f}'),
+        ('\u{531}', '\u{556}'),
+        ('\u{559}', '\u{559}'),
+        ('\u{560}', '\u{588}'),
+        ('\u{591}', '\u{5bd}'),
+        ('\u{5bf}', '\u{5bf}'),
+        ('\u{5c1}', '\u{5c2}'),
+        ('\u{5c4}', '\u{5c5}'),
+        ('\u{5c7}', '\u{5c7}'),
+        ('\u{5d0}', '\u{5ea}'),
+        ('\u{5ef}', '\u{5f2}'),
+        ('\u{610}', '\u{61a}'),
+        ('\u{620}', '\u{669}'),
+        ('\u{66e}', '\u{6d3}'),
+        ('\u{6d5}', '\u{6dc}'),
+        ('\u{6df}', '\u{6e8}'),
+        ('\u{6ea}', '\u{6fc}'),
+        ('\u{6ff}', '\u{6ff}'),
+        ('\u{710}', '\u{74a}'),
+        ('\u{74d}', '\u{7b1}'),
+        ('\u{7c0}', '\u{7f5}'),
+        ('\u{7fa}', '\u{7fa}'),
+        ('\u{7fd}', '\u{7fd}'),
+        ('\u{800}', '\u{82d}'),
+        ('\u{840}', '\u{85b}'),
+        ('\u{860}', '\u{86a}'),
+        ('\u{8a0}', '\u{8b4}'),
+        ('\u{8b6}', '\u{8c7}'),
+        ('\u{8d3}', '\u{8e1}'),
+        ('\u{8e3}', '\u{963}'),
+        ('\u{966}', '\u{96f}'),
+        ('\u{971}', '\u{983}'),
+        ('\u{985}', '\u{98c}'),
+        ('\u{98f}', '\u{990}'),
+        ('\u{993}', '\u{9a8}'),
+        ('\u{9aa}', '\u{9b0}'),
+        ('\u{9b2}', '\u{9b2}'),
+        ('\u{9b6}', '\u{9b9}'),
+        ('\u{9bc}', '\u{9c4}'),
+        ('\u{9c7}', '\u{9c8}'),
+        ('\u{9cb}', '\u{9ce}'),
+        ('\u{9d7}', '\u{9d7}'),
+        ('\u{9dc}', '\u{9dd}'),
+        ('\u{9df}', '\u{9e3}'),
+        ('\u{9e6}', '\u{9f1}'),
+        ('\u{9fc}', '\u{9fc}'),
+        ('\u{9fe}', '\u{9fe}'),
+        ('\u{a01}', '\u{a03}'),
+        ('\u{a05}', '\u{a0a}'),
+        ('\u{a0f}', '\u{a10}'),
+        ('\u{a13}', '\u{a28}'),
+        ('\u{a2a}', '\u{a30}'),
+        ('\u{a32}', '\u{a33}'),
+        ('\u{a35}', '\u{a36}'),
+        ('\u{a38}', '\u{a39}'),
+        ('\u{a3c}', '\u{a3c}'),
+        ('\u{a3e}', '\u{a42}'),
+        ('\u{a47}', '\u{a48}'),
+        ('\u{a4b}', '\u{a4d}'),
+        ('\u{a51}', '\u{a51}'),
+        ('\u{a59}', '\u{a5c}'),
+        ('\u{a5e}', '\u{a5e}'),
+        ('\u{a66}', '\u{a75}'),
+        ('\u{a81}', '\u{a83}'),
+        ('\u{a85}', '\u{a8d}'),
+        ('\u{a8f}', '\u{a91}'),
+        ('\u{a93}', '\u{aa8}'),
+        ('\u{aaa}', '\u{ab0}'),
+        ('\u{ab2}', '\u{ab3}'),
+        ('\u{ab5}', '\u{ab9}'),
+        ('\u{abc}', '\u{ac5}'),
+        ('\u{ac7}', '\u{ac9}'),
+        ('\u{acb}', '\u{acd}'),
+        ('\u{ad0}', '\u{ad0}'),
+        ('\u{ae0}', '\u{ae3}'),
+        ('\u{ae6}', '\u{aef}'),
+        ('\u{af9}', '\u{aff}'),
+        ('\u{b01}', '\u{b03}'),
+        ('\u{b05}', '\u{b0c}'),
+        ('\u{b0f}', '\u{b10}'),
+        ('\u{b13}', '\u{b28}'),
+        ('\u{b2a}', '\u{b30}'),
+        ('\u{b32}', '\u{b33}'),
+        ('\u{b35}', '\u{b39}'),
+        ('\u{b3c}', '\u{b44}'),
+        ('\u{b47}', '\u{b48}'),
+        ('\u{b4b}', '\u{b4d}'),
+        ('\u{b55}', '\u{b57}'),
+        ('\u{b5c}', '\u{b5d}'),
+        ('\u{b5f}', '\u{b63}'),
+        ('\u{b66}', '\u{b6f}'),
+        ('\u{b71}', '\u{b71}'),
+        ('\u{b82}', '\u{b83}'),
+        ('\u{b85}', '\u{b8a}'),
+        ('\u{b8e}', '\u{b90}'),
+        ('\u{b92}', '\u{b95}'),
+        ('\u{b99}', '\u{b9a}'),
+        ('\u{b9c}', '\u{b9c}'),
+        ('\u{b9e}', '\u{b9f}'),
+        ('\u{ba3}', '\u{ba4}'),
+        ('\u{ba8}', '\u{baa}'),
+        ('\u{bae}', '\u{bb9}'),
+        ('\u{bbe}', '\u{bc2}'),
+        ('\u{bc6}', '\u{bc8}'),
+        ('\u{bca}', '\u{bcd}'),
+        ('\u{bd0}', '\u{bd0}'),
+        ('\u{bd7}', '\u{bd7}'),
+        ('\u{be6}', '\u{bef}'),
+        ('\u{c00}', '\u{c0c}'),
+        ('\u{c0e}', '\u{c10}'),
+        ('\u{c12}', '\u{c28}'),
+        ('\u{c2a}', '\u{c39}'),
+        ('\u{c3d}', '\u{c44}'),
+        ('\u{c46}', '\u{c48}'),
+        ('\u{c4a}', '\u{c4d}'),
+        ('\u{c55}', '\u{c56}'),
+        ('\u{c58}', '\u{c5a}'),
+        ('\u{c60}', '\u{c63}'),
+        ('\u{c66}', '\u{c6f}'),
+        ('\u{c80}', '\u{c83}'),
+        ('\u{c85}', '\u{c8c}'),
+        ('\u{c8e}', '\u{c90}'),
+        ('\u{c92}', '\u{ca8}'),
+        ('\u{caa}', '\u{cb3}'),
+        ('\u{cb5}', '\u{cb9}'),
+        ('\u{cbc}', '\u{cc4}'),
+        ('\u{cc6}', '\u{cc8}'),
+        ('\u{cca}', '\u{ccd}'),
+        ('\u{cd5}', '\u{cd6}'),
+        ('\u{cde}', '\u{cde}'),
+        ('\u{ce0}', '\u{ce3}'),
+        ('\u{ce6}', '\u{cef}'),
+        ('\u{cf1}', '\u{cf2}'),
+        ('\u{d00}', '\u{d0c}'),
+        ('\u{d0e}', '\u{d10}'),
+        ('\u{d12}', '\u{d44}'),
+        ('\u{d46}', '\u{d48}'),
+        ('\u{d4a}', '\u{d4e}'),
+        ('\u{d54}', '\u{d57}'),
+        ('\u{d5f}', '\u{d63}'),
+        ('\u{d66}', '\u{d6f}'),
+        ('\u{d7a}', '\u{d7f}'),
+        ('\u{d81}', '\u{d83}'),
+        ('\u{d85}', '\u{d96}'),
+        ('\u{d9a}', '\u{db1}'),
+        ('\u{db3}', '\u{dbb}'),
+        ('\u{dbd}', '\u{dbd}'),
+        ('\u{dc0}', '\u{dc6}'),
+        ('\u{dca}', '\u{dca}'),
+        ('\u{dcf}', '\u{dd4}'),
+        ('\u{dd6}', '\u{dd6}'),
+        ('\u{dd8}', '\u{ddf}'),
+        ('\u{de6}', '\u{def}'),
+        ('\u{df2}', '\u{df3}'),
+        ('\u{e01}', '\u{e3a}'),
+        ('\u{e40}', '\u{e4e}'),
+        ('\u{e50}', '\u{e59}'),
+        ('\u{e81}', '\u{e82}'),
+        ('\u{e84}', '\u{e84}'),
+        ('\u{e86}', '\u{e8a}'),
+        ('\u{e8c}', '\u{ea3}'),
+        ('\u{ea5}', '\u{ea5}'),
+        ('\u{ea7}', '\u{ebd}'),
+        ('\u{ec0}', '\u{ec4}'),
+        ('\u{ec6}', '\u{ec6}'),
+        ('\u{ec8}', '\u{ecd}'),
+        ('\u{ed0}', '\u{ed9}'),
+        ('\u{edc}', '\u{edf}'),
+        ('\u{f00}', '\u{f00}'),
+        ('\u{f18}', '\u{f19}'),
+        ('\u{f20}', '\u{f29}'),
+        ('\u{f35}', '\u{f35}'),
+        ('\u{f37}', '\u{f37}'),
+        ('\u{f39}', '\u{f39}'),
+        ('\u{f3e}', '\u{f47}'),
+        ('\u{f49}', '\u{f6c}'),
+        ('\u{f71}', '\u{f84}'),
+        ('\u{f86}', '\u{f97}'),
+        ('\u{f99}', '\u{fbc}'),
+        ('\u{fc6}', '\u{fc6}'),
+        ('\u{1000}', '\u{1049}'),
+        ('\u{1050}', '\u{109d}'),
+        ('\u{10a0}', '\u{10c5}'),
+        ('\u{10c7}', '\u{10c7}'),
+        ('\u{10cd}', '\u{10cd}'),
+        ('\u{10d0}', '\u{10fa}'),
+        ('\u{10fc}', '\u{1248}'),
+        ('\u{124a}', '\u{124d}'),
+        ('\u{1250}', '\u{1256}'),
+        ('\u{1258}', '\u{1258}'),
+        ('\u{125a}', '\u{125d}'),
+        ('\u{1260}', '\u{1288}'),
+        ('\u{128a}', '\u{128d}'),
+        ('\u{1290}', '\u{12b0}'),
+        ('\u{12b2}', '\u{12b5}'),
+        ('\u{12b8}', '\u{12be}'),
+        ('\u{12c0}', '\u{12c0}'),
+        ('\u{12c2}', '\u{12c5}'),
+        ('\u{12c8}', '\u{12d6}'),
+        ('\u{12d8}', '\u{1310}'),
+        ('\u{1312}', '\u{1315}'),
+        ('\u{1318}', '\u{135a}'),
+        ('\u{135d}', '\u{135f}'),
+        ('\u{1369}', '\u{1371}'),
+        ('\u{1380}', '\u{138f}'),
+        ('\u{13a0}', '\u{13f5}'),
+        ('\u{13f8}', '\u{13fd}'),
+        ('\u{1401}', '\u{166c}'),
+        ('\u{166f}', '\u{167f}'),
+        ('\u{1681}', '\u{169a}'),
+        ('\u{16a0}', '\u{16ea}'),
+        ('\u{16ee}', '\u{16f8}'),
+        ('\u{1700}', '\u{170c}'),
+        ('\u{170e}', '\u{1714}'),
+        ('\u{1720}', '\u{1734}'),
+        ('\u{1740}', '\u{1753}'),
+        ('\u{1760}', '\u{176c}'),
+        ('\u{176e}', '\u{1770}'),
+        ('\u{1772}', '\u{1773}'),
+        ('\u{1780}', '\u{17d3}'),
+        ('\u{17d7}', '\u{17d7}'),
+        ('\u{17dc}', '\u{17dd}'),
+        ('\u{17e0}', '\u{17e9}'),
+        ('\u{180b}', '\u{180d}'),
+        ('\u{1810}', '\u{1819}'),
+        ('\u{1820}', '\u{1878}'),
+        ('\u{1880}', '\u{18aa}'),
+        ('\u{18b0}', '\u{18f5}'),
+        ('\u{1900}', '\u{191e}'),
+        ('\u{1920}', '\u{192b}'),
+        ('\u{1930}', '\u{193b}'),
+        ('\u{1946}', '\u{196d}'),
+        ('\u{1970}', '\u{1974}'),
+        ('\u{1980}', '\u{19ab}'),
+        ('\u{19b0}', '\u{19c9}'),
+        ('\u{19d0}', '\u{19da}'),
+        ('\u{1a00}', '\u{1a1b}'),
+        ('\u{1a20}', '\u{1a5e}'),
+        ('\u{1a60}', '\u{1a7c}'),
+        ('\u{1a7f}', '\u{1a89}'),
+        ('\u{1a90}', '\u{1a99}'),
+        ('\u{1aa7}', '\u{1aa7}'),
+        ('\u{1ab0}', '\u{1abd}'),
+        ('\u{1abf}', '\u{1ac0}'),
+        ('\u{1b00}', '\u{1b4b}'),
+        ('\u{1b50}', '\u{1b59}'),
+        ('\u{1b6b}', '\u{1b73}'),
+        ('\u{1b80}', '\u{1bf3}'),
+        ('\u{1c00}', '\u{1c37}'),
+        ('\u{1c40}', '\u{1c49}'),
+        ('\u{1c4d}', '\u{1c7d}'),
+        ('\u{1c80}', '\u{1c88}'),
+        ('\u{1c90}', '\u{1cba}'),
+        ('\u{1cbd}', '\u{1cbf}'),
+        ('\u{1cd0}', '\u{1cd2}'),
+        ('\u{1cd4}', '\u{1cfa}'),
+        ('\u{1d00}', '\u{1df9}'),
+        ('\u{1dfb}', '\u{1f15}'),
+        ('\u{1f18}', '\u{1f1d}'),
+        ('\u{1f20}', '\u{1f45}'),
+        ('\u{1f48}', '\u{1f4d}'),
+        ('\u{1f50}', '\u{1f57}'),
+        ('\u{1f59}', '\u{1f59}'),
+        ('\u{1f5b}', '\u{1f5b}'),
+        ('\u{1f5d}', '\u{1f5d}'),
+        ('\u{1f5f}', '\u{1f7d}'),
+        ('\u{1f80}', '\u{1fb4}'),
+        ('\u{1fb6}', '\u{1fbc}'),
+        ('\u{1fbe}', '\u{1fbe}'),
+        ('\u{1fc2}', '\u{1fc4}'),
+        ('\u{1fc6}', '\u{1fcc}'),
+        ('\u{1fd0}', '\u{1fd3}'),
+        ('\u{1fd6}', '\u{1fdb}'),
+        ('\u{1fe0}', '\u{1fec}'),
+        ('\u{1ff2}', '\u{1ff4}'),
+        ('\u{1ff6}', '\u{1ffc}'),
+        ('\u{203f}', '\u{2040}'),
+        ('\u{2054}', '\u{2054}'),
+        ('\u{2071}', '\u{2071}'),
+        ('\u{207f}', '\u{207f}'),
+        ('\u{2090}', '\u{209c}'),
+        ('\u{20d0}', '\u{20dc}'),
+        ('\u{20e1}', '\u{20e1}'),
+        ('\u{20e5}', '\u{20f0}'),
+        ('\u{2102}', '\u{2102}'),
+        ('\u{2107}', '\u{2107}'),
+        ('\u{210a}', '\u{2113}'),
+        ('\u{2115}', '\u{2115}'),
+        ('\u{2118}', '\u{211d}'),
+        ('\u{2124}', '\u{2124}'),
+        ('\u{2126}', '\u{2126}'),
+        ('\u{2128}', '\u{2128}'),
+        ('\u{212a}', '\u{2139}'),
+        ('\u{213c}', '\u{213f}'),
+        ('\u{2145}', '\u{2149}'),
+        ('\u{214e}', '\u{214e}'),
+        ('\u{2160}', '\u{2188}'),
+        ('\u{2c00}', '\u{2c2e}'),
+        ('\u{2c30}', '\u{2c5e}'),
+        ('\u{2c60}', '\u{2ce4}'),
+        ('\u{2ceb}', '\u{2cf3}'),
+        ('\u{2d00}', '\u{2d25}'),
+        ('\u{2d27}', '\u{2d27}'),
+        ('\u{2d2d}', '\u{2d2d}'),
+        ('\u{2d30}', '\u{2d67}'),
+        ('\u{2d6f}', '\u{2d6f}'),
+        ('\u{2d7f}', '\u{2d96}'),
+        ('\u{2da0}', '\u{2da6}'),
+        ('\u{2da8}', '\u{2dae}'),
+        ('\u{2db0}', '\u{2db6}'),
+        ('\u{2db8}', '\u{2dbe}'),
+        ('\u{2dc0}', '\u{2dc6}'),
+        ('\u{2dc8}', '\u{2dce}'),
+        ('\u{2dd0}', '\u{2dd6}'),
+        ('\u{2dd8}', '\u{2dde}'),
+        ('\u{2de0}', '\u{2dff}'),
+        ('\u{3005}', '\u{3007}'),
+        ('\u{3021}', '\u{302f}'),
+        ('\u{3031}', '\u{3035}'),
+        ('\u{3038}', '\u{303c}'),
+        ('\u{3041}', '\u{3096}'),
+        ('\u{3099}', '\u{309a}'),
+        ('\u{309d}', '\u{309f}'),
+        ('\u{30a1}', '\u{30fa}'),
+        ('\u{30fc}', '\u{30ff}'),
+        ('\u{3105}', '\u{312f}'),
+        ('\u{3131}', '\u{318e}'),
+        ('\u{31a0}', '\u{31bf}'),
+        ('\u{31f0}', '\u{31ff}'),
+        ('\u{3400}', '\u{4dbf}'),
+        ('\u{4e00}', '\u{9ffc}'),
+        ('\u{a000}', '\u{a48c}'),
+        ('\u{a4d0}', '\u{a4fd}'),
+        ('\u{a500}', '\u{a60c}'),
+        ('\u{a610}', '\u{a62b}'),
+        ('\u{a640}', '\u{a66f}'),
+        ('\u{a674}', '\u{a67d}'),
+        ('\u{a67f}', '\u{a6f1}'),
+        ('\u{a717}', '\u{a71f}'),
+        ('\u{a722}', '\u{a788}'),
+        ('\u{a78b}', '\u{a7bf}'),
+        ('\u{a7c2}', '\u{a7ca}'),
+        ('\u{a7f5}', '\u{a827}'),
+        ('\u{a82c}', '\u{a82c}'),
+        ('\u{a840}', '\u{a873}'),
+        ('\u{a880}', '\u{a8c5}'),
+        ('\u{a8d0}', '\u{a8d9}'),
+        ('\u{a8e0}', '\u{a8f7}'),
+        ('\u{a8fb}', '\u{a8fb}'),
+        ('\u{a8fd}', '\u{a92d}'),
+        ('\u{a930}', '\u{a953}'),
+        ('\u{a960}', '\u{a97c}'),
+        ('\u{a980}', '\u{a9c0}'),
+        ('\u{a9cf}', '\u{a9d9}'),
+        ('\u{a9e0}', '\u{a9fe}'),
+        ('\u{aa00}', '\u{aa36}'),
+        ('\u{aa40}', '\u{aa4d}'),
+        ('\u{aa50}', '\u{aa59}'),
+        ('\u{aa60}', '\u{aa76}'),
+        ('\u{aa7a}', '\u{aac2}'),
+        ('\u{aadb}', '\u{aadd}'),
+        ('\u{aae0}', '\u{aaef}'),
+        ('\u{aaf2}', '\u{aaf6}'),
+        ('\u{ab01}', '\u{ab06}'),
+        ('\u{ab09}', '\u{ab0e}'),
+        ('\u{ab11}', '\u{ab16}'),
+        ('\u{ab20}', '\u{ab26}'),
+        ('\u{ab28}', '\u{ab2e}'),
+        ('\u{ab30}', '\u{ab5a}'),
+        ('\u{ab5c}', '\u{ab69}'),
+        ('\u{ab70}', '\u{abea}'),
+        ('\u{abec}', '\u{abed}'),
+        ('\u{abf0}', '\u{abf9}'),
+        ('\u{ac00}', '\u{d7a3}'),
+        ('\u{d7b0}', '\u{d7c6}'),
+        ('\u{d7cb}', '\u{d7fb}'),
+        ('\u{f900}', '\u{fa6d}'),
+        ('\u{fa70}', '\u{fad9}'),
+        ('\u{fb00}', '\u{fb06}'),
+        ('\u{fb13}', '\u{fb17}'),
+        ('\u{fb1d}', '\u{fb28}'),
+        ('\u{fb2a}', '\u{fb36}'),
+        ('\u{fb38}', '\u{fb3c}'),
+        ('\u{fb3e}', '\u{fb3e}'),
+        ('\u{fb40}', '\u{fb41}'),
+        ('\u{fb43}', '\u{fb44}'),
+        ('\u{fb46}', '\u{fbb1}'),
+        ('\u{fbd3}', '\u{fc5d}'),
+        ('\u{fc64}', '\u{fd3d}'),
+        ('\u{fd50}', '\u{fd8f}'),
+        ('\u{fd92}', '\u{fdc7}'),
+        ('\u{fdf0}', '\u{fdf9}'),
+        ('\u{fe00}', '\u{fe0f}'),
+        ('\u{fe20}', '\u{fe2f}'),
+        ('\u{fe33}', '\u{fe34}'),
+        ('\u{fe4d}', '\u{fe4f}'),
+        ('\u{fe71}', '\u{fe71}'),
+        ('\u{fe73}', '\u{fe73}'),
+        ('\u{fe77}', '\u{fe77}'),
+        ('\u{fe79}', '\u{fe79}'),
+        ('\u{fe7b}', '\u{fe7b}'),
+        ('\u{fe7d}', '\u{fe7d}'),
+        ('\u{fe7f}', '\u{fefc}'),
+        ('\u{ff10}', '\u{ff19}'),
+        ('\u{ff21}', '\u{ff3a}'),
+        ('\u{ff3f}', '\u{ff3f}'),
+        ('\u{ff41}', '\u{ff5a}'),
+        ('\u{ff66}', '\u{ffbe}'),
+        ('\u{ffc2}', '\u{ffc7}'),
+        ('\u{ffca}', '\u{ffcf}'),
+        ('\u{ffd2}', '\u{ffd7}'),
+        ('\u{ffda}', '\u{ffdc}'),
+        ('\u{10000}', '\u{1000b}'),
+        ('\u{1000d}', '\u{10026}'),
+        ('\u{10028}', '\u{1003a}'),
+        ('\u{1003c}', '\u{1003d}'),
+        ('\u{1003f}', '\u{1004d}'),
+        ('\u{10050}', '\u{1005d}'),
+        ('\u{10080}', '\u{100fa}'),
+        ('\u{10140}', '\u{10174}'),
+        ('\u{101fd}', '\u{101fd}'),
+        ('\u{10280}', '\u{1029c}'),
+        ('\u{102a0}', '\u{102d0}'),
+        ('\u{102e0}', '\u{102e0}'),
+        ('\u{10300}', '\u{1031f}'),
+        ('\u{1032d}', '\u{1034a}'),
+        ('\u{10350}', '\u{1037a}'),
+        ('\u{10380}', '\u{1039d}'),
+        ('\u{103a0}', '\u{103c3}'),
+        ('\u{103c8}', '\u{103cf}'),
+        ('\u{103d1}', '\u{103d5}'),
+        ('\u{10400}', '\u{1049d}'),
+        ('\u{104a0}', '\u{104a9}'),
+        ('\u{104b0}', '\u{104d3}'),
+        ('\u{104d8}', '\u{104fb}'),
+        ('\u{10500}', '\u{10527}'),
+        ('\u{10530}', '\u{10563}'),
+        ('\u{10600}', '\u{10736}'),
+        ('\u{10740}', '\u{10755}'),
+        ('\u{10760}', '\u{10767}'),
+        ('\u{10800}', '\u{10805}'),
+        ('\u{10808}', '\u{10808}'),
+        ('\u{1080a}', '\u{10835}'),
+        ('\u{10837}', '\u{10838}'),
+        ('\u{1083c}', '\u{1083c}'),
+        ('\u{1083f}', '\u{10855}'),
+        ('\u{10860}', '\u{10876}'),
+        ('\u{10880}', '\u{1089e}'),
+        ('\u{108e0}', '\u{108f2}'),
+        ('\u{108f4}', '\u{108f5}'),
+        ('\u{10900}', '\u{10915}'),
+        ('\u{10920}', '\u{10939}'),
+        ('\u{10980}', '\u{109b7}'),
+        ('\u{109be}', '\u{109bf}'),
+        ('\u{10a00}', '\u{10a03}'),
+        ('\u{10a05}', '\u{10a06}'),
+        ('\u{10a0c}', '\u{10a13}'),
+        ('\u{10a15}', '\u{10a17}'),
+        ('\u{10a19}', '\u{10a35}'),
+        ('\u{10a38}', '\u{10a3a}'),
+        ('\u{10a3f}', '\u{10a3f}'),
+        ('\u{10a60}', '\u{10a7c}'),
+        ('\u{10a80}', '\u{10a9c}'),
+        ('\u{10ac0}', '\u{10ac7}'),
+        ('\u{10ac9}', '\u{10ae6}'),
+        ('\u{10b00}', '\u{10b35}'),
+        ('\u{10b40}', '\u{10b55}'),
+        ('\u{10b60}', '\u{10b72}'),
+        ('\u{10b80}', '\u{10b91}'),
+        ('\u{10c00}', '\u{10c48}'),
+        ('\u{10c80}', '\u{10cb2}'),
+        ('\u{10cc0}', '\u{10cf2}'),
+        ('\u{10d00}', '\u{10d27}'),
+        ('\u{10d30}', '\u{10d39}'),
+        ('\u{10e80}', '\u{10ea9}'),
+        ('\u{10eab}', '\u{10eac}'),
+        ('\u{10eb0}', '\u{10eb1}'),
+        ('\u{10f00}', '\u{10f1c}'),
+        ('\u{10f27}', '\u{10f27}'),
+        ('\u{10f30}', '\u{10f50}'),
+        ('\u{10fb0}', '\u{10fc4}'),
+        ('\u{10fe0}', '\u{10ff6}'),
+        ('\u{11000}', '\u{11046}'),
+        ('\u{11066}', '\u{1106f}'),
+        ('\u{1107f}', '\u{110ba}'),
+        ('\u{110d0}', '\u{110e8}'),
+        ('\u{110f0}', '\u{110f9}'),
+        ('\u{11100}', '\u{11134}'),
+        ('\u{11136}', '\u{1113f}'),
+        ('\u{11144}', '\u{11147}'),
+        ('\u{11150}', '\u{11173}'),
+        ('\u{11176}', '\u{11176}'),
+        ('\u{11180}', '\u{111c4}'),
+        ('\u{111c9}', '\u{111cc}'),
+        ('\u{111ce}', '\u{111da}'),
+        ('\u{111dc}', '\u{111dc}'),
+        ('\u{11200}', '\u{11211}'),
+        ('\u{11213}', '\u{11237}'),
+        ('\u{1123e}', '\u{1123e}'),
+        ('\u{11280}', '\u{11286}'),
+        ('\u{11288}', '\u{11288}'),
+        ('\u{1128a}', '\u{1128d}'),
+        ('\u{1128f}', '\u{1129d}'),
+        ('\u{1129f}', '\u{112a8}'),
+        ('\u{112b0}', '\u{112ea}'),
+        ('\u{112f0}', '\u{112f9}'),
+        ('\u{11300}', '\u{11303}'),
+        ('\u{11305}', '\u{1130c}'),
+        ('\u{1130f}', '\u{11310}'),
+        ('\u{11313}', '\u{11328}'),
+        ('\u{1132a}', '\u{11330}'),
+        ('\u{11332}', '\u{11333}'),
+        ('\u{11335}', '\u{11339}'),
+        ('\u{1133b}', '\u{11344}'),
+        ('\u{11347}', '\u{11348}'),
+        ('\u{1134b}', '\u{1134d}'),
+        ('\u{11350}', '\u{11350}'),
+        ('\u{11357}', '\u{11357}'),
+        ('\u{1135d}', '\u{11363}'),
+        ('\u{11366}', '\u{1136c}'),
+        ('\u{11370}', '\u{11374}'),
+        ('\u{11400}', '\u{1144a}'),
+        ('\u{11450}', '\u{11459}'),
+        ('\u{1145e}', '\u{11461}'),
+        ('\u{11480}', '\u{114c5}'),
+        ('\u{114c7}', '\u{114c7}'),
+        ('\u{114d0}', '\u{114d9}'),
+        ('\u{11580}', '\u{115b5}'),
+        ('\u{115b8}', '\u{115c0}'),
+        ('\u{115d8}', '\u{115dd}'),
+        ('\u{11600}', '\u{11640}'),
+        ('\u{11644}', '\u{11644}'),
+        ('\u{11650}', '\u{11659}'),
+        ('\u{11680}', '\u{116b8}'),
+        ('\u{116c0}', '\u{116c9}'),
+        ('\u{11700}', '\u{1171a}'),
+        ('\u{1171d}', '\u{1172b}'),
+        ('\u{11730}', '\u{11739}'),
+        ('\u{11800}', '\u{1183a}'),
+        ('\u{118a0}', '\u{118e9}'),
+        ('\u{118ff}', '\u{11906}'),
+        ('\u{11909}', '\u{11909}'),
+        ('\u{1190c}', '\u{11913}'),
+        ('\u{11915}', '\u{11916}'),
+        ('\u{11918}', '\u{11935}'),
+        ('\u{11937}', '\u{11938}'),
+        ('\u{1193b}', '\u{11943}'),
+        ('\u{11950}', '\u{11959}'),
+        ('\u{119a0}', '\u{119a7}'),
+        ('\u{119aa}', '\u{119d7}'),
+        ('\u{119da}', '\u{119e1}'),
+        ('\u{119e3}', '\u{119e4}'),
+        ('\u{11a00}', '\u{11a3e}'),
+        ('\u{11a47}', '\u{11a47}'),
+        ('\u{11a50}', '\u{11a99}'),
+        ('\u{11a9d}', '\u{11a9d}'),
+        ('\u{11ac0}', '\u{11af8}'),
+        ('\u{11c00}', '\u{11c08}'),
+        ('\u{11c0a}', '\u{11c36}'),
+        ('\u{11c38}', '\u{11c40}'),
+        ('\u{11c50}', '\u{11c59}'),
+        ('\u{11c72}', '\u{11c8f}'),
+        ('\u{11c92}', '\u{11ca7}'),
+        ('\u{11ca9}', '\u{11cb6}'),
+        ('\u{11d00}', '\u{11d06}'),
+        ('\u{11d08}', '\u{11d09}'),
+        ('\u{11d0b}', '\u{11d36}'),
+        ('\u{11d3a}', '\u{11d3a}'),
+        ('\u{11d3c}', '\u{11d3d}'),
+        ('\u{11d3f}', '\u{11d47}'),
+        ('\u{11d50}', '\u{11d59}'),
+        ('\u{11d60}', '\u{11d65}'),
+        ('\u{11d67}', '\u{11d68}'),
+        ('\u{11d6a}', '\u{11d8e}'),
+        ('\u{11d90}', '\u{11d91}'),
+        ('\u{11d93}', '\u{11d98}'),
+        ('\u{11da0}', '\u{11da9}'),
+        ('\u{11ee0}', '\u{11ef6}'),
+        ('\u{11fb0}', '\u{11fb0}'),
+        ('\u{12000}', '\u{12399}'),
+        ('\u{12400}', '\u{1246e}'),
+        ('\u{12480}', '\u{12543}'),
+        ('\u{13000}', '\u{1342e}'),
+        ('\u{14400}', '\u{14646}'),
+        ('\u{16800}', '\u{16a38}'),
+        ('\u{16a40}', '\u{16a5e}'),
+        ('\u{16a60}', '\u{16a69}'),
+        ('\u{16ad0}', '\u{16aed}'),
+        ('\u{16af0}', '\u{16af4}'),
+        ('\u{16b00}', '\u{16b36}'),
+        ('\u{16b40}', '\u{16b43}'),
+        ('\u{16b50}', '\u{16b59}'),
+        ('\u{16b63}', '\u{16b77}'),
+        ('\u{16b7d}', '\u{16b8f}'),
+        ('\u{16e40}', '\u{16e7f}'),
+        ('\u{16f00}', '\u{16f4a}'),
+        ('\u{16f4f}', '\u{16f87}'),
+        ('\u{16f8f}', '\u{16f9f}'),
+        ('\u{16fe0}', '\u{16fe1}'),
+        ('\u{16fe3}', '\u{16fe4}'),
+        ('\u{16ff0}', '\u{16ff1}'),
+        ('\u{17000}', '\u{187f7}'),
+        ('\u{18800}', '\u{18cd5}'),
+        ('\u{18d00}', '\u{18d08}'),
+        ('\u{1b000}', '\u{1b11e}'),
+        ('\u{1b150}', '\u{1b152}'),
+        ('\u{1b164}', '\u{1b167}'),
+        ('\u{1b170}', '\u{1b2fb}'),
+        ('\u{1bc00}', '\u{1bc6a}'),
+        ('\u{1bc70}', '\u{1bc7c}'),
+        ('\u{1bc80}', '\u{1bc88}'),
+        ('\u{1bc90}', '\u{1bc99}'),
+        ('\u{1bc9d}', '\u{1bc9e}'),
+        ('\u{1d165}', '\u{1d169}'),
+        ('\u{1d16d}', '\u{1d172}'),
+        ('\u{1d17b}', '\u{1d182}'),
+        ('\u{1d185}', '\u{1d18b}'),
+        ('\u{1d1aa}', '\u{1d1ad}'),
+        ('\u{1d242}', '\u{1d244}'),
+        ('\u{1d400}', '\u{1d454}'),
+        ('\u{1d456}', '\u{1d49c}'),
+        ('\u{1d49e}', '\u{1d49f}'),
+        ('\u{1d4a2}', '\u{1d4a2}'),
+        ('\u{1d4a5}', '\u{1d4a6}'),
+        ('\u{1d4a9}', '\u{1d4ac}'),
+        ('\u{1d4ae}', '\u{1d4b9}'),
+        ('\u{1d4bb}', '\u{1d4bb}'),
+        ('\u{1d4bd}', '\u{1d4c3}'),
+        ('\u{1d4c5}', '\u{1d505}'),
+        ('\u{1d507}', '\u{1d50a}'),
+        ('\u{1d50d}', '\u{1d514}'),
+        ('\u{1d516}', '\u{1d51c}'),
+        ('\u{1d51e}', '\u{1d539}'),
+        ('\u{1d53b}', '\u{1d53e}'),
+        ('\u{1d540}', '\u{1d544}'),
+        ('\u{1d546}', '\u{1d546}'),
+        ('\u{1d54a}', '\u{1d550}'),
+        ('\u{1d552}', '\u{1d6a5}'),
+        ('\u{1d6a8}', '\u{1d6c0}'),
+        ('\u{1d6c2}', '\u{1d6da}'),
+        ('\u{1d6dc}', '\u{1d6fa}'),
+        ('\u{1d6fc}', '\u{1d714}'),
+        ('\u{1d716}', '\u{1d734}'),
+        ('\u{1d736}', '\u{1d74e}'),
+        ('\u{1d750}', '\u{1d76e}'),
+        ('\u{1d770}', '\u{1d788}'),
+        ('\u{1d78a}', '\u{1d7a8}'),
+        ('\u{1d7aa}', '\u{1d7c2}'),
+        ('\u{1d7c4}', '\u{1d7cb}'),
+        ('\u{1d7ce}', '\u{1d7ff}'),
+        ('\u{1da00}', '\u{1da36}'),
+        ('\u{1da3b}', '\u{1da6c}'),
+        ('\u{1da75}', '\u{1da75}'),
+        ('\u{1da84}', '\u{1da84}'),
+        ('\u{1da9b}', '\u{1da9f}'),
+        ('\u{1daa1}', '\u{1daaf}'),
+        ('\u{1e000}', '\u{1e006}'),
+        ('\u{1e008}', '\u{1e018}'),
+        ('\u{1e01b}', '\u{1e021}'),
+        ('\u{1e023}', '\u{1e024}'),
+        ('\u{1e026}', '\u{1e02a}'),
+        ('\u{1e100}', '\u{1e12c}'),
+        ('\u{1e130}', '\u{1e13d}'),
+        ('\u{1e140}', '\u{1e149}'),
+        ('\u{1e14e}', '\u{1e14e}'),
+        ('\u{1e2c0}', '\u{1e2f9}'),
+        ('\u{1e800}', '\u{1e8c4}'),
+        ('\u{1e8d0}', '\u{1e8d6}'),
+        ('\u{1e900}', '\u{1e94b}'),
+        ('\u{1e950}', '\u{1e959}'),
+        ('\u{1ee00}', '\u{1ee03}'),
+        ('\u{1ee05}', '\u{1ee1f}'),
+        ('\u{1ee21}', '\u{1ee22}'),
+        ('\u{1ee24}', '\u{1ee24}'),
+        ('\u{1ee27}', '\u{1ee27}'),
+        ('\u{1ee29}', '\u{1ee32}'),
+        ('\u{1ee34}', '\u{1ee37}'),
+        ('\u{1ee39}', '\u{1ee39}'),
+        ('\u{1ee3b}', '\u{1ee3b}'),
+        ('\u{1ee42}', '\u{1ee42}'),
+        ('\u{1ee47}', '\u{1ee47}'),
+        ('\u{1ee49}', '\u{1ee49}'),
+        ('\u{1ee4b}', '\u{1ee4b}'),
+        ('\u{1ee4d}', '\u{1ee4f}'),
+        ('\u{1ee51}', '\u{1ee52}'),
+        ('\u{1ee54}', '\u{1ee54}'),
+        ('\u{1ee57}', '\u{1ee57}'),
+        ('\u{1ee59}', '\u{1ee59}'),
+        ('\u{1ee5b}', '\u{1ee5b}'),
+        ('\u{1ee5d}', '\u{1ee5d}'),
+        ('\u{1ee5f}', '\u{1ee5f}'),
+        ('\u{1ee61}', '\u{1ee62}'),
+        ('\u{1ee64}', '\u{1ee64}'),
+        ('\u{1ee67}', '\u{1ee6a}'),
+        ('\u{1ee6c}', '\u{1ee72}'),
+        ('\u{1ee74}', '\u{1ee77}'),
+        ('\u{1ee79}', '\u{1ee7c}'),
+        ('\u{1ee7e}', '\u{1ee7e}'),
+        ('\u{1ee80}', '\u{1ee89}'),
+        ('\u{1ee8b}', '\u{1ee9b}'),
+        ('\u{1eea1}', '\u{1eea3}'),
+        ('\u{1eea5}', '\u{1eea9}'),
+        ('\u{1eeab}', '\u{1eebb}'),
+        ('\u{1fbf0}', '\u{1fbf9}'),
+        ('\u{20000}', '\u{2a6dd}'),
+        ('\u{2a700}', '\u{2b734}'),
+        ('\u{2b740}', '\u{2b81d}'),
+        ('\u{2b820}', '\u{2cea1}'),
+        ('\u{2ceb0}', '\u{2ebe0}'),
+        ('\u{2f800}', '\u{2fa1d}'),
+        ('\u{30000}', '\u{3134a}'),
+        ('\u{e0100}', '\u{e01ef}'),
+    ];
+
+    pub fn XID_Continue(c: char) -> bool {
+        super::bsearch_range_table(c, XID_Continue_table)
+    }
+
+    pub const XID_Start_table: &[(char, char)] = &[
+        ('\u{41}', '\u{5a}'),
+        ('\u{61}', '\u{7a}'),
+        ('\u{aa}', '\u{aa}'),
+        ('\u{b5}', '\u{b5}'),
+        ('\u{ba}', '\u{ba}'),
+        ('\u{c0}', '\u{d6}'),
+        ('\u{d8}', '\u{f6}'),
+        ('\u{f8}', '\u{2c1}'),
+        ('\u{2c6}', '\u{2d1}'),
+        ('\u{2e0}', '\u{2e4}'),
+        ('\u{2ec}', '\u{2ec}'),
+        ('\u{2ee}', '\u{2ee}'),
+        ('\u{370}', '\u{374}'),
+        ('\u{376}', '\u{377}'),
+        ('\u{37b}', '\u{37d}'),
+        ('\u{37f}', '\u{37f}'),
+        ('\u{386}', '\u{386}'),
+        ('\u{388}', '\u{38a}'),
+        ('\u{38c}', '\u{38c}'),
+        ('\u{38e}', '\u{3a1}'),
+        ('\u{3a3}', '\u{3f5}'),
+        ('\u{3f7}', '\u{481}'),
+        ('\u{48a}', '\u{52f}'),
+        ('\u{531}', '\u{556}'),
+        ('\u{559}', '\u{559}'),
+        ('\u{560}', '\u{588}'),
+        ('\u{5d0}', '\u{5ea}'),
+        ('\u{5ef}', '\u{5f2}'),
+        ('\u{620}', '\u{64a}'),
+        ('\u{66e}', '\u{66f}'),
+        ('\u{671}', '\u{6d3}'),
+        ('\u{6d5}', '\u{6d5}'),
+        ('\u{6e5}', '\u{6e6}'),
+        ('\u{6ee}', '\u{6ef}'),
+        ('\u{6fa}', '\u{6fc}'),
+        ('\u{6ff}', '\u{6ff}'),
+        ('\u{710}', '\u{710}'),
+        ('\u{712}', '\u{72f}'),
+        ('\u{74d}', '\u{7a5}'),
+        ('\u{7b1}', '\u{7b1}'),
+        ('\u{7ca}', '\u{7ea}'),
+        ('\u{7f4}', '\u{7f5}'),
+        ('\u{7fa}', '\u{7fa}'),
+        ('\u{800}', '\u{815}'),
+        ('\u{81a}', '\u{81a}'),
+        ('\u{824}', '\u{824}'),
+        ('\u{828}', '\u{828}'),
+        ('\u{840}', '\u{858}'),
+        ('\u{860}', '\u{86a}'),
+        ('\u{8a0}', '\u{8b4}'),
+        ('\u{8b6}', '\u{8c7}'),
+        ('\u{904}', '\u{939}'),
+        ('\u{93d}', '\u{93d}'),
+        ('\u{950}', '\u{950}'),
+        ('\u{958}', '\u{961}'),
+        ('\u{971}', '\u{980}'),
+        ('\u{985}', '\u{98c}'),
+        ('\u{98f}', '\u{990}'),
+        ('\u{993}', '\u{9a8}'),
+        ('\u{9aa}', '\u{9b0}'),
+        ('\u{9b2}', '\u{9b2}'),
+        ('\u{9b6}', '\u{9b9}'),
+        ('\u{9bd}', '\u{9bd}'),
+        ('\u{9ce}', '\u{9ce}'),
+        ('\u{9dc}', '\u{9dd}'),
+        ('\u{9df}', '\u{9e1}'),
+        ('\u{9f0}', '\u{9f1}'),
+        ('\u{9fc}', '\u{9fc}'),
+        ('\u{a05}', '\u{a0a}'),
+        ('\u{a0f}', '\u{a10}'),
+        ('\u{a13}', '\u{a28}'),
+        ('\u{a2a}', '\u{a30}'),
+        ('\u{a32}', '\u{a33}'),
+        ('\u{a35}', '\u{a36}'),
+        ('\u{a38}', '\u{a39}'),
+        ('\u{a59}', '\u{a5c}'),
+        ('\u{a5e}', '\u{a5e}'),
+        ('\u{a72}', '\u{a74}'),
+        ('\u{a85}', '\u{a8d}'),
+        ('\u{a8f}', '\u{a91}'),
+        ('\u{a93}', '\u{aa8}'),
+        ('\u{aaa}', '\u{ab0}'),
+        ('\u{ab2}', '\u{ab3}'),
+        ('\u{ab5}', '\u{ab9}'),
+        ('\u{abd}', '\u{abd}'),
+        ('\u{ad0}', '\u{ad0}'),
+        ('\u{ae0}', '\u{ae1}'),
+        ('\u{af9}', '\u{af9}'),
+        ('\u{b05}', '\u{b0c}'),
+        ('\u{b0f}', '\u{b10}'),
+        ('\u{b13}', '\u{b28}'),
+        ('\u{b2a}', '\u{b30}'),
+        ('\u{b32}', '\u{b33}'),
+        ('\u{b35}', '\u{b39}'),
+        ('\u{b3d}', '\u{b3d}'),
+        ('\u{b5c}', '\u{b5d}'),
+        ('\u{b5f}', '\u{b61}'),
+        ('\u{b71}', '\u{b71}'),
+        ('\u{b83}', '\u{b83}'),
+        ('\u{b85}', '\u{b8a}'),
+        ('\u{b8e}', '\u{b90}'),
+        ('\u{b92}', '\u{b95}'),
+        ('\u{b99}', '\u{b9a}'),
+        ('\u{b9c}', '\u{b9c}'),
+        ('\u{b9e}', '\u{b9f}'),
+        ('\u{ba3}', '\u{ba4}'),
+        ('\u{ba8}', '\u{baa}'),
+        ('\u{bae}', '\u{bb9}'),
+        ('\u{bd0}', '\u{bd0}'),
+        ('\u{c05}', '\u{c0c}'),
+        ('\u{c0e}', '\u{c10}'),
+        ('\u{c12}', '\u{c28}'),
+        ('\u{c2a}', '\u{c39}'),
+        ('\u{c3d}', '\u{c3d}'),
+        ('\u{c58}', '\u{c5a}'),
+        ('\u{c60}', '\u{c61}'),
+        ('\u{c80}', '\u{c80}'),
+        ('\u{c85}', '\u{c8c}'),
+        ('\u{c8e}', '\u{c90}'),
+        ('\u{c92}', '\u{ca8}'),
+        ('\u{caa}', '\u{cb3}'),
+        ('\u{cb5}', '\u{cb9}'),
+        ('\u{cbd}', '\u{cbd}'),
+        ('\u{cde}', '\u{cde}'),
+        ('\u{ce0}', '\u{ce1}'),
+        ('\u{cf1}', '\u{cf2}'),
+        ('\u{d04}', '\u{d0c}'),
+        ('\u{d0e}', '\u{d10}'),
+        ('\u{d12}', '\u{d3a}'),
+        ('\u{d3d}', '\u{d3d}'),
+        ('\u{d4e}', '\u{d4e}'),
+        ('\u{d54}', '\u{d56}'),
+        ('\u{d5f}', '\u{d61}'),
+        ('\u{d7a}', '\u{d7f}'),
+        ('\u{d85}', '\u{d96}'),
+        ('\u{d9a}', '\u{db1}'),
+        ('\u{db3}', '\u{dbb}'),
+        ('\u{dbd}', '\u{dbd}'),
+        ('\u{dc0}', '\u{dc6}'),
+        ('\u{e01}', '\u{e30}'),
+        ('\u{e32}', '\u{e32}'),
+        ('\u{e40}', '\u{e46}'),
+        ('\u{e81}', '\u{e82}'),
+        ('\u{e84}', '\u{e84}'),
+        ('\u{e86}', '\u{e8a}'),
+        ('\u{e8c}', '\u{ea3}'),
+        ('\u{ea5}', '\u{ea5}'),
+        ('\u{ea7}', '\u{eb0}'),
+        ('\u{eb2}', '\u{eb2}'),
+        ('\u{ebd}', '\u{ebd}'),
+        ('\u{ec0}', '\u{ec4}'),
+        ('\u{ec6}', '\u{ec6}'),
+        ('\u{edc}', '\u{edf}'),
+        ('\u{f00}', '\u{f00}'),
+        ('\u{f40}', '\u{f47}'),
+        ('\u{f49}', '\u{f6c}'),
+        ('\u{f88}', '\u{f8c}'),
+        ('\u{1000}', '\u{102a}'),
+        ('\u{103f}', '\u{103f}'),
+        ('\u{1050}', '\u{1055}'),
+        ('\u{105a}', '\u{105d}'),
+        ('\u{1061}', '\u{1061}'),
+        ('\u{1065}', '\u{1066}'),
+        ('\u{106e}', '\u{1070}'),
+        ('\u{1075}', '\u{1081}'),
+        ('\u{108e}', '\u{108e}'),
+        ('\u{10a0}', '\u{10c5}'),
+        ('\u{10c7}', '\u{10c7}'),
+        ('\u{10cd}', '\u{10cd}'),
+        ('\u{10d0}', '\u{10fa}'),
+        ('\u{10fc}', '\u{1248}'),
+        ('\u{124a}', '\u{124d}'),
+        ('\u{1250}', '\u{1256}'),
+        ('\u{1258}', '\u{1258}'),
+        ('\u{125a}', '\u{125d}'),
+        ('\u{1260}', '\u{1288}'),
+        ('\u{128a}', '\u{128d}'),
+        ('\u{1290}', '\u{12b0}'),
+        ('\u{12b2}', '\u{12b5}'),
+        ('\u{12b8}', '\u{12be}'),
+        ('\u{12c0}', '\u{12c0}'),
+        ('\u{12c2}', '\u{12c5}'),
+        ('\u{12c8}', '\u{12d6}'),
+        ('\u{12d8}', '\u{1310}'),
+        ('\u{1312}', '\u{1315}'),
+        ('\u{1318}', '\u{135a}'),
+        ('\u{1380}', '\u{138f}'),
+        ('\u{13a0}', '\u{13f5}'),
+        ('\u{13f8}', '\u{13fd}'),
+        ('\u{1401}', '\u{166c}'),
+        ('\u{166f}', '\u{167f}'),
+        ('\u{1681}', '\u{169a}'),
+        ('\u{16a0}', '\u{16ea}'),
+        ('\u{16ee}', '\u{16f8}'),
+        ('\u{1700}', '\u{170c}'),
+        ('\u{170e}', '\u{1711}'),
+        ('\u{1720}', '\u{1731}'),
+        ('\u{1740}', '\u{1751}'),
+        ('\u{1760}', '\u{176c}'),
+        ('\u{176e}', '\u{1770}'),
+        ('\u{1780}', '\u{17b3}'),
+        ('\u{17d7}', '\u{17d7}'),
+        ('\u{17dc}', '\u{17dc}'),
+        ('\u{1820}', '\u{1878}'),
+        ('\u{1880}', '\u{18a8}'),
+        ('\u{18aa}', '\u{18aa}'),
+        ('\u{18b0}', '\u{18f5}'),
+        ('\u{1900}', '\u{191e}'),
+        ('\u{1950}', '\u{196d}'),
+        ('\u{1970}', '\u{1974}'),
+        ('\u{1980}', '\u{19ab}'),
+        ('\u{19b0}', '\u{19c9}'),
+        ('\u{1a00}', '\u{1a16}'),
+        ('\u{1a20}', '\u{1a54}'),
+        ('\u{1aa7}', '\u{1aa7}'),
+        ('\u{1b05}', '\u{1b33}'),
+        ('\u{1b45}', '\u{1b4b}'),
+        ('\u{1b83}', '\u{1ba0}'),
+        ('\u{1bae}', '\u{1baf}'),
+        ('\u{1bba}', '\u{1be5}'),
+        ('\u{1c00}', '\u{1c23}'),
+        ('\u{1c4d}', '\u{1c4f}'),
+        ('\u{1c5a}', '\u{1c7d}'),
+        ('\u{1c80}', '\u{1c88}'),
+        ('\u{1c90}', '\u{1cba}'),
+        ('\u{1cbd}', '\u{1cbf}'),
+        ('\u{1ce9}', '\u{1cec}'),
+        ('\u{1cee}', '\u{1cf3}'),
+        ('\u{1cf5}', '\u{1cf6}'),
+        ('\u{1cfa}', '\u{1cfa}'),
+        ('\u{1d00}', '\u{1dbf}'),
+        ('\u{1e00}', '\u{1f15}'),
+        ('\u{1f18}', '\u{1f1d}'),
+        ('\u{1f20}', '\u{1f45}'),
+        ('\u{1f48}', '\u{1f4d}'),
+        ('\u{1f50}', '\u{1f57}'),
+        ('\u{1f59}', '\u{1f59}'),
+        ('\u{1f5b}', '\u{1f5b}'),
+        ('\u{1f5d}', '\u{1f5d}'),
+        ('\u{1f5f}', '\u{1f7d}'),
+        ('\u{1f80}', '\u{1fb4}'),
+        ('\u{1fb6}', '\u{1fbc}'),
+        ('\u{1fbe}', '\u{1fbe}'),
+        ('\u{1fc2}', '\u{1fc4}'),
+        ('\u{1fc6}', '\u{1fcc}'),
+        ('\u{1fd0}', '\u{1fd3}'),
+        ('\u{1fd6}', '\u{1fdb}'),
+        ('\u{1fe0}', '\u{1fec}'),
+        ('\u{1ff2}', '\u{1ff4}'),
+        ('\u{1ff6}', '\u{1ffc}'),
+        ('\u{2071}', '\u{2071}'),
+        ('\u{207f}', '\u{207f}'),
+        ('\u{2090}', '\u{209c}'),
+        ('\u{2102}', '\u{2102}'),
+        ('\u{2107}', '\u{2107}'),
+        ('\u{210a}', '\u{2113}'),
+        ('\u{2115}', '\u{2115}'),
+        ('\u{2118}', '\u{211d}'),
+        ('\u{2124}', '\u{2124}'),
+        ('\u{2126}', '\u{2126}'),
+        ('\u{2128}', '\u{2128}'),
+        ('\u{212a}', '\u{2139}'),
+        ('\u{213c}', '\u{213f}'),
+        ('\u{2145}', '\u{2149}'),
+        ('\u{214e}', '\u{214e}'),
+        ('\u{2160}', '\u{2188}'),
+        ('\u{2c00}', '\u{2c2e}'),
+        ('\u{2c30}', '\u{2c5e}'),
+        ('\u{2c60}', '\u{2ce4}'),
+        ('\u{2ceb}', '\u{2cee}'),
+        ('\u{2cf2}', '\u{2cf3}'),
+        ('\u{2d00}', '\u{2d25}'),
+        ('\u{2d27}', '\u{2d27}'),
+        ('\u{2d2d}', '\u{2d2d}'),
+        ('\u{2d30}', '\u{2d67}'),
+        ('\u{2d6f}', '\u{2d6f}'),
+        ('\u{2d80}', '\u{2d96}'),
+        ('\u{2da0}', '\u{2da6}'),
+        ('\u{2da8}', '\u{2dae}'),
+        ('\u{2db0}', '\u{2db6}'),
+        ('\u{2db8}', '\u{2dbe}'),
+        ('\u{2dc0}', '\u{2dc6}'),
+        ('\u{2dc8}', '\u{2dce}'),
+        ('\u{2dd0}', '\u{2dd6}'),
+        ('\u{2dd8}', '\u{2dde}'),
+        ('\u{3005}', '\u{3007}'),
+        ('\u{3021}', '\u{3029}'),
+        ('\u{3031}', '\u{3035}'),
+        ('\u{3038}', '\u{303c}'),
+        ('\u{3041}', '\u{3096}'),
+        ('\u{309d}', '\u{309f}'),
+        ('\u{30a1}', '\u{30fa}'),
+        ('\u{30fc}', '\u{30ff}'),
+        ('\u{3105}', '\u{312f}'),
+        ('\u{3131}', '\u{318e}'),
+        ('\u{31a0}', '\u{31bf}'),
+        ('\u{31f0}', '\u{31ff}'),
+        ('\u{3400}', '\u{4dbf}'),
+        ('\u{4e00}', '\u{9ffc}'),
+        ('\u{a000}', '\u{a48c}'),
+        ('\u{a4d0}', '\u{a4fd}'),
+        ('\u{a500}', '\u{a60c}'),
+        ('\u{a610}', '\u{a61f}'),
+        ('\u{a62a}', '\u{a62b}'),
+        ('\u{a640}', '\u{a66e}'),
+        ('\u{a67f}', '\u{a69d}'),
+        ('\u{a6a0}', '\u{a6ef}'),
+        ('\u{a717}', '\u{a71f}'),
+        ('\u{a722}', '\u{a788}'),
+        ('\u{a78b}', '\u{a7bf}'),
+        ('\u{a7c2}', '\u{a7ca}'),
+        ('\u{a7f5}', '\u{a801}'),
+        ('\u{a803}', '\u{a805}'),
+        ('\u{a807}', '\u{a80a}'),
+        ('\u{a80c}', '\u{a822}'),
+        ('\u{a840}', '\u{a873}'),
+        ('\u{a882}', '\u{a8b3}'),
+        ('\u{a8f2}', '\u{a8f7}'),
+        ('\u{a8fb}', '\u{a8fb}'),
+        ('\u{a8fd}', '\u{a8fe}'),
+        ('\u{a90a}', '\u{a925}'),
+        ('\u{a930}', '\u{a946}'),
+        ('\u{a960}', '\u{a97c}'),
+        ('\u{a984}', '\u{a9b2}'),
+        ('\u{a9cf}', '\u{a9cf}'),
+        ('\u{a9e0}', '\u{a9e4}'),
+        ('\u{a9e6}', '\u{a9ef}'),
+        ('\u{a9fa}', '\u{a9fe}'),
+        ('\u{aa00}', '\u{aa28}'),
+        ('\u{aa40}', '\u{aa42}'),
+        ('\u{aa44}', '\u{aa4b}'),
+        ('\u{aa60}', '\u{aa76}'),
+        ('\u{aa7a}', '\u{aa7a}'),
+        ('\u{aa7e}', '\u{aaaf}'),
+        ('\u{aab1}', '\u{aab1}'),
+        ('\u{aab5}', '\u{aab6}'),
+        ('\u{aab9}', '\u{aabd}'),
+        ('\u{aac0}', '\u{aac0}'),
+        ('\u{aac2}', '\u{aac2}'),
+        ('\u{aadb}', '\u{aadd}'),
+        ('\u{aae0}', '\u{aaea}'),
+        ('\u{aaf2}', '\u{aaf4}'),
+        ('\u{ab01}', '\u{ab06}'),
+        ('\u{ab09}', '\u{ab0e}'),
+        ('\u{ab11}', '\u{ab16}'),
+        ('\u{ab20}', '\u{ab26}'),
+        ('\u{ab28}', '\u{ab2e}'),
+        ('\u{ab30}', '\u{ab5a}'),
+        ('\u{ab5c}', '\u{ab69}'),
+        ('\u{ab70}', '\u{abe2}'),
+        ('\u{ac00}', '\u{d7a3}'),
+        ('\u{d7b0}', '\u{d7c6}'),
+        ('\u{d7cb}', '\u{d7fb}'),
+        ('\u{f900}', '\u{fa6d}'),
+        ('\u{fa70}', '\u{fad9}'),
+        ('\u{fb00}', '\u{fb06}'),
+        ('\u{fb13}', '\u{fb17}'),
+        ('\u{fb1d}', '\u{fb1d}'),
+        ('\u{fb1f}', '\u{fb28}'),
+        ('\u{fb2a}', '\u{fb36}'),
+        ('\u{fb38}', '\u{fb3c}'),
+        ('\u{fb3e}', '\u{fb3e}'),
+        ('\u{fb40}', '\u{fb41}'),
+        ('\u{fb43}', '\u{fb44}'),
+        ('\u{fb46}', '\u{fbb1}'),
+        ('\u{fbd3}', '\u{fc5d}'),
+        ('\u{fc64}', '\u{fd3d}'),
+        ('\u{fd50}', '\u{fd8f}'),
+        ('\u{fd92}', '\u{fdc7}'),
+        ('\u{fdf0}', '\u{fdf9}'),
+        ('\u{fe71}', '\u{fe71}'),
+        ('\u{fe73}', '\u{fe73}'),
+        ('\u{fe77}', '\u{fe77}'),
+        ('\u{fe79}', '\u{fe79}'),
+        ('\u{fe7b}', '\u{fe7b}'),
+        ('\u{fe7d}', '\u{fe7d}'),
+        ('\u{fe7f}', '\u{fefc}'),
+        ('\u{ff21}', '\u{ff3a}'),
+        ('\u{ff41}', '\u{ff5a}'),
+        ('\u{ff66}', '\u{ff9d}'),
+        ('\u{ffa0}', '\u{ffbe}'),
+        ('\u{ffc2}', '\u{ffc7}'),
+        ('\u{ffca}', '\u{ffcf}'),
+        ('\u{ffd2}', '\u{ffd7}'),
+        ('\u{ffda}', '\u{ffdc}'),
+        ('\u{10000}', '\u{1000b}'),
+        ('\u{1000d}', '\u{10026}'),
+        ('\u{10028}', '\u{1003a}'),
+        ('\u{1003c}', '\u{1003d}'),
+        ('\u{1003f}', '\u{1004d}'),
+        ('\u{10050}', '\u{1005d}'),
+        ('\u{10080}', '\u{100fa}'),
+        ('\u{10140}', '\u{10174}'),
+        ('\u{10280}', '\u{1029c}'),
+        ('\u{102a0}', '\u{102d0}'),
+        ('\u{10300}', '\u{1031f}'),
+        ('\u{1032d}', '\u{1034a}'),
+        ('\u{10350}', '\u{10375}'),
+        ('\u{10380}', '\u{1039d}'),
+        ('\u{103a0}', '\u{103c3}'),
+        ('\u{103c8}', '\u{103cf}'),
+        ('\u{103d1}', '\u{103d5}'),
+        ('\u{10400}', '\u{1049d}'),
+        ('\u{104b0}', '\u{104d3}'),
+        ('\u{104d8}', '\u{104fb}'),
+        ('\u{10500}', '\u{10527}'),
+        ('\u{10530}', '\u{10563}'),
+        ('\u{10600}', '\u{10736}'),
+        ('\u{10740}', '\u{10755}'),
+        ('\u{10760}', '\u{10767}'),
+        ('\u{10800}', '\u{10805}'),
+        ('\u{10808}', '\u{10808}'),
+        ('\u{1080a}', '\u{10835}'),
+        ('\u{10837}', '\u{10838}'),
+        ('\u{1083c}', '\u{1083c}'),
+        ('\u{1083f}', '\u{10855}'),
+        ('\u{10860}', '\u{10876}'),
+        ('\u{10880}', '\u{1089e}'),
+        ('\u{108e0}', '\u{108f2}'),
+        ('\u{108f4}', '\u{108f5}'),
+        ('\u{10900}', '\u{10915}'),
+        ('\u{10920}', '\u{10939}'),
+        ('\u{10980}', '\u{109b7}'),
+        ('\u{109be}', '\u{109bf}'),
+        ('\u{10a00}', '\u{10a00}'),
+        ('\u{10a10}', '\u{10a13}'),
+        ('\u{10a15}', '\u{10a17}'),
+        ('\u{10a19}', '\u{10a35}'),
+        ('\u{10a60}', '\u{10a7c}'),
+        ('\u{10a80}', '\u{10a9c}'),
+        ('\u{10ac0}', '\u{10ac7}'),
+        ('\u{10ac9}', '\u{10ae4}'),
+        ('\u{10b00}', '\u{10b35}'),
+        ('\u{10b40}', '\u{10b55}'),
+        ('\u{10b60}', '\u{10b72}'),
+        ('\u{10b80}', '\u{10b91}'),
+        ('\u{10c00}', '\u{10c48}'),
+        ('\u{10c80}', '\u{10cb2}'),
+        ('\u{10cc0}', '\u{10cf2}'),
+        ('\u{10d00}', '\u{10d23}'),
+        ('\u{10e80}', '\u{10ea9}'),
+        ('\u{10eb0}', '\u{10eb1}'),
+        ('\u{10f00}', '\u{10f1c}'),
+        ('\u{10f27}', '\u{10f27}'),
+        ('\u{10f30}', '\u{10f45}'),
+        ('\u{10fb0}', '\u{10fc4}'),
+        ('\u{10fe0}', '\u{10ff6}'),
+        ('\u{11003}', '\u{11037}'),
+        ('\u{11083}', '\u{110af}'),
+        ('\u{110d0}', '\u{110e8}'),
+        ('\u{11103}', '\u{11126}'),
+        ('\u{11144}', '\u{11144}'),
+        ('\u{11147}', '\u{11147}'),
+        ('\u{11150}', '\u{11172}'),
+        ('\u{11176}', '\u{11176}'),
+        ('\u{11183}', '\u{111b2}'),
+        ('\u{111c1}', '\u{111c4}'),
+        ('\u{111da}', '\u{111da}'),
+        ('\u{111dc}', '\u{111dc}'),
+        ('\u{11200}', '\u{11211}'),
+        ('\u{11213}', '\u{1122b}'),
+        ('\u{11280}', '\u{11286}'),
+        ('\u{11288}', '\u{11288}'),
+        ('\u{1128a}', '\u{1128d}'),
+        ('\u{1128f}', '\u{1129d}'),
+        ('\u{1129f}', '\u{112a8}'),
+        ('\u{112b0}', '\u{112de}'),
+        ('\u{11305}', '\u{1130c}'),
+        ('\u{1130f}', '\u{11310}'),
+        ('\u{11313}', '\u{11328}'),
+        ('\u{1132a}', '\u{11330}'),
+        ('\u{11332}', '\u{11333}'),
+        ('\u{11335}', '\u{11339}'),
+        ('\u{1133d}', '\u{1133d}'),
+        ('\u{11350}', '\u{11350}'),
+        ('\u{1135d}', '\u{11361}'),
+        ('\u{11400}', '\u{11434}'),
+        ('\u{11447}', '\u{1144a}'),
+        ('\u{1145f}', '\u{11461}'),
+        ('\u{11480}', '\u{114af}'),
+        ('\u{114c4}', '\u{114c5}'),
+        ('\u{114c7}', '\u{114c7}'),
+        ('\u{11580}', '\u{115ae}'),
+        ('\u{115d8}', '\u{115db}'),
+        ('\u{11600}', '\u{1162f}'),
+        ('\u{11644}', '\u{11644}'),
+        ('\u{11680}', '\u{116aa}'),
+        ('\u{116b8}', '\u{116b8}'),
+        ('\u{11700}', '\u{1171a}'),
+        ('\u{11800}', '\u{1182b}'),
+        ('\u{118a0}', '\u{118df}'),
+        ('\u{118ff}', '\u{11906}'),
+        ('\u{11909}', '\u{11909}'),
+        ('\u{1190c}', '\u{11913}'),
+        ('\u{11915}', '\u{11916}'),
+        ('\u{11918}', '\u{1192f}'),
+        ('\u{1193f}', '\u{1193f}'),
+        ('\u{11941}', '\u{11941}'),
+        ('\u{119a0}', '\u{119a7}'),
+        ('\u{119aa}', '\u{119d0}'),
+        ('\u{119e1}', '\u{119e1}'),
+        ('\u{119e3}', '\u{119e3}'),
+        ('\u{11a00}', '\u{11a00}'),
+        ('\u{11a0b}', '\u{11a32}'),
+        ('\u{11a3a}', '\u{11a3a}'),
+        ('\u{11a50}', '\u{11a50}'),
+        ('\u{11a5c}', '\u{11a89}'),
+        ('\u{11a9d}', '\u{11a9d}'),
+        ('\u{11ac0}', '\u{11af8}'),
+        ('\u{11c00}', '\u{11c08}'),
+        ('\u{11c0a}', '\u{11c2e}'),
+        ('\u{11c40}', '\u{11c40}'),
+        ('\u{11c72}', '\u{11c8f}'),
+        ('\u{11d00}', '\u{11d06}'),
+        ('\u{11d08}', '\u{11d09}'),
+        ('\u{11d0b}', '\u{11d30}'),
+        ('\u{11d46}', '\u{11d46}'),
+        ('\u{11d60}', '\u{11d65}'),
+        ('\u{11d67}', '\u{11d68}'),
+        ('\u{11d6a}', '\u{11d89}'),
+        ('\u{11d98}', '\u{11d98}'),
+        ('\u{11ee0}', '\u{11ef2}'),
+        ('\u{11fb0}', '\u{11fb0}'),
+        ('\u{12000}', '\u{12399}'),
+        ('\u{12400}', '\u{1246e}'),
+        ('\u{12480}', '\u{12543}'),
+        ('\u{13000}', '\u{1342e}'),
+        ('\u{14400}', '\u{14646}'),
+        ('\u{16800}', '\u{16a38}'),
+        ('\u{16a40}', '\u{16a5e}'),
+        ('\u{16ad0}', '\u{16aed}'),
+        ('\u{16b00}', '\u{16b2f}'),
+        ('\u{16b40}', '\u{16b43}'),
+        ('\u{16b63}', '\u{16b77}'),
+        ('\u{16b7d}', '\u{16b8f}'),
+        ('\u{16e40}', '\u{16e7f}'),
+        ('\u{16f00}', '\u{16f4a}'),
+        ('\u{16f50}', '\u{16f50}'),
+        ('\u{16f93}', '\u{16f9f}'),
+        ('\u{16fe0}', '\u{16fe1}'),
+        ('\u{16fe3}', '\u{16fe3}'),
+        ('\u{17000}', '\u{187f7}'),
+        ('\u{18800}', '\u{18cd5}'),
+        ('\u{18d00}', '\u{18d08}'),
+        ('\u{1b000}', '\u{1b11e}'),
+        ('\u{1b150}', '\u{1b152}'),
+        ('\u{1b164}', '\u{1b167}'),
+        ('\u{1b170}', '\u{1b2fb}'),
+        ('\u{1bc00}', '\u{1bc6a}'),
+        ('\u{1bc70}', '\u{1bc7c}'),
+        ('\u{1bc80}', '\u{1bc88}'),
+        ('\u{1bc90}', '\u{1bc99}'),
+        ('\u{1d400}', '\u{1d454}'),
+        ('\u{1d456}', '\u{1d49c}'),
+        ('\u{1d49e}', '\u{1d49f}'),
+        ('\u{1d4a2}', '\u{1d4a2}'),
+        ('\u{1d4a5}', '\u{1d4a6}'),
+        ('\u{1d4a9}', '\u{1d4ac}'),
+        ('\u{1d4ae}', '\u{1d4b9}'),
+        ('\u{1d4bb}', '\u{1d4bb}'),
+        ('\u{1d4bd}', '\u{1d4c3}'),
+        ('\u{1d4c5}', '\u{1d505}'),
+        ('\u{1d507}', '\u{1d50a}'),
+        ('\u{1d50d}', '\u{1d514}'),
+        ('\u{1d516}', '\u{1d51c}'),
+        ('\u{1d51e}', '\u{1d539}'),
+        ('\u{1d53b}', '\u{1d53e}'),
+        ('\u{1d540}', '\u{1d544}'),
+        ('\u{1d546}', '\u{1d546}'),
+        ('\u{1d54a}', '\u{1d550}'),
+        ('\u{1d552}', '\u{1d6a5}'),
+        ('\u{1d6a8}', '\u{1d6c0}'),
+        ('\u{1d6c2}', '\u{1d6da}'),
+        ('\u{1d6dc}', '\u{1d6fa}'),
+        ('\u{1d6fc}', '\u{1d714}'),
+        ('\u{1d716}', '\u{1d734}'),
+        ('\u{1d736}', '\u{1d74e}'),
+        ('\u{1d750}', '\u{1d76e}'),
+        ('\u{1d770}', '\u{1d788}'),
+        ('\u{1d78a}', '\u{1d7a8}'),
+        ('\u{1d7aa}', '\u{1d7c2}'),
+        ('\u{1d7c4}', '\u{1d7cb}'),
+        ('\u{1e100}', '\u{1e12c}'),
+        ('\u{1e137}', '\u{1e13d}'),
+        ('\u{1e14e}', '\u{1e14e}'),
+        ('\u{1e2c0}', '\u{1e2eb}'),
+        ('\u{1e800}', '\u{1e8c4}'),
+        ('\u{1e900}', '\u{1e943}'),
+        ('\u{1e94b}', '\u{1e94b}'),
+        ('\u{1ee00}', '\u{1ee03}'),
+        ('\u{1ee05}', '\u{1ee1f}'),
+        ('\u{1ee21}', '\u{1ee22}'),
+        ('\u{1ee24}', '\u{1ee24}'),
+        ('\u{1ee27}', '\u{1ee27}'),
+        ('\u{1ee29}', '\u{1ee32}'),
+        ('\u{1ee34}', '\u{1ee37}'),
+        ('\u{1ee39}', '\u{1ee39}'),
+        ('\u{1ee3b}', '\u{1ee3b}'),
+        ('\u{1ee42}', '\u{1ee42}'),
+        ('\u{1ee47}', '\u{1ee47}'),
+        ('\u{1ee49}', '\u{1ee49}'),
+        ('\u{1ee4b}', '\u{1ee4b}'),
+        ('\u{1ee4d}', '\u{1ee4f}'),
+        ('\u{1ee51}', '\u{1ee52}'),
+        ('\u{1ee54}', '\u{1ee54}'),
+        ('\u{1ee57}', '\u{1ee57}'),
+        ('\u{1ee59}', '\u{1ee59}'),
+        ('\u{1ee5b}', '\u{1ee5b}'),
+        ('\u{1ee5d}', '\u{1ee5d}'),
+        ('\u{1ee5f}', '\u{1ee5f}'),
+        ('\u{1ee61}', '\u{1ee62}'),
+        ('\u{1ee64}', '\u{1ee64}'),
+        ('\u{1ee67}', '\u{1ee6a}'),
+        ('\u{1ee6c}', '\u{1ee72}'),
+        ('\u{1ee74}', '\u{1ee77}'),
+        ('\u{1ee79}', '\u{1ee7c}'),
+        ('\u{1ee7e}', '\u{1ee7e}'),
+        ('\u{1ee80}', '\u{1ee89}'),
+        ('\u{1ee8b}', '\u{1ee9b}'),
+        ('\u{1eea1}', '\u{1eea3}'),
+        ('\u{1eea5}', '\u{1eea9}'),
+        ('\u{1eeab}', '\u{1eebb}'),
+        ('\u{20000}', '\u{2a6dd}'),
+        ('\u{2a700}', '\u{2b734}'),
+        ('\u{2b740}', '\u{2b81d}'),
+        ('\u{2b820}', '\u{2cea1}'),
+        ('\u{2ceb0}', '\u{2ebe0}'),
+        ('\u{2f800}', '\u{2fa1d}'),
+        ('\u{30000}', '\u{3134a}'),
+    ];
+
+    pub fn XID_Start(c: char) -> bool {
+        super::bsearch_range_table(c, XID_Start_table)
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/storage.js b/api-docs/m_captcha/0.1.1/storage.js new file mode 100644 index 0000000..318275e --- /dev/null +++ b/api-docs/m_captcha/0.1.1/storage.js @@ -0,0 +1 @@ +var resourcesSuffix="";var darkThemes=["dark","ayu"];var currentTheme=document.getElementById("themeStyle");var mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed!==true){for(i=0;i=0;--i){if(func(arr[i])===true){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function hasOwnProperty(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function usableLocalStorage(){if(typeof Storage==="undefined"){return false}try{return window.localStorage!==null&&window.localStorage!==undefined}catch(err){return false}}function updateLocalStorage(name,value){if(usableLocalStorage()){localStorage[name]=value}else{}}function getCurrentValue(name){if(usableLocalStorage()&&localStorage[name]!==undefined){return localStorage[name]}return null}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){var fullBasicCss="rustdoc"+resourcesSuffix+".css";var fullNewTheme=newTheme+resourcesSuffix+".css";var newHref=mainStyleElem.href.replace(fullBasicCss,fullNewTheme);if(saveTheme===true){updateLocalStorage("rustdoc-theme",newTheme)}if(styleElem.href===newHref){return}var found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),function(el){savedHref.push(el.href)})}onEach(savedHref,function(el){if(el===newHref){found=true;return true}});if(found===true){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("rustdoc-use-system-theme",value);var toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}var updateSystemTheme=(function(){if(!window.matchMedia){return function(){let cssTheme=getComputedStyle(document.documentElement).getPropertyValue('content');switchTheme(currentTheme,mainTheme,JSON.parse(cssTheme)||light,true)}}var mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){if(getSettingValue("use-system-theme")!=="false"){var lightTheme=getSettingValue("preferred-light-theme")||"light";var darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){switchTheme(currentTheme,mainTheme,darkTheme,true)}else{switchTheme(currentTheme,mainTheme,lightTheme,true)}}}mql.addListener(handlePreferenceChange);return function(){handlePreferenceChange(mql)}})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(currentTheme,mainTheme,getSettingValue("theme")||"light",false)} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/theme.js b/api-docs/m_captcha/0.1.1/theme.js new file mode 100644 index 0000000..8f9c49a --- /dev/null +++ b/api-docs/m_captcha/0.1.1/theme.js @@ -0,0 +1 @@ +var themes=document.getElementById("theme-choices");var themePicker=document.getElementById("theme-picker");function showThemeButtonState(){themes.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){themes.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}function switchThemeButtonState(){if(themes.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}};function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!=="theme-picker"&&(!active.parentNode||active.parentNode.id!=="theme-choices")&&(!related||(related.id!=="theme-picker"&&(!related.parentNode||related.parentNode.id!=="theme-choices")))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;["ayu","dark","light"].forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(el){switchTheme(currentTheme,mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themes.appendChild(but)}) \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/unicode_xid/all.html b/api-docs/m_captcha/0.1.1/unicode_xid/all.html new file mode 100644 index 0000000..9b081a3 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/unicode_xid/all.html @@ -0,0 +1,4 @@ +List of all items in this crate

[] + + List of all items

Traits

Constants

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/unicode_xid/constant.UNICODE_VERSION.html b/api-docs/m_captcha/0.1.1/unicode_xid/constant.UNICODE_VERSION.html new file mode 100644 index 0000000..bbed5ce --- /dev/null +++ b/api-docs/m_captcha/0.1.1/unicode_xid/constant.UNICODE_VERSION.html @@ -0,0 +1,4 @@ +unicode_xid::UNICODE_VERSION - Rust

[][src]Constant unicode_xid::UNICODE_VERSION

pub const UNICODE_VERSION: (u64, u64, u64);

The version of Unicode +that this version of unicode-xid is based on.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/unicode_xid/index.html b/api-docs/m_captcha/0.1.1/unicode_xid/index.html new file mode 100644 index 0000000..06cde42 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/unicode_xid/index.html @@ -0,0 +1,22 @@ +unicode_xid - Rust

[][src]Crate unicode_xid

Determine if a char is a valid identifier for a parser and/or lexer according to +Unicode Standard Annex #31 rules.

+ +
+extern crate unicode_xid;
+
+use unicode_xid::UnicodeXID;
+
+fn main() {
+    let ch = 'a';
+    println!("Is {} a valid start of an identifier? {}", ch, UnicodeXID::is_xid_start(ch));
+}
+

features

+

unicode-xid supports a no_std feature. This eliminates dependence +on std, and instead uses equivalent functions from core.

+

Constants

+
UNICODE_VERSION

The version of Unicode +that this version of unicode-xid is based on.

+

Traits

+
UnicodeXID

Methods for determining if a character is a valid identifier character.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/unicode_xid/sidebar-items.js b/api-docs/m_captcha/0.1.1/unicode_xid/sidebar-items.js new file mode 100644 index 0000000..d23714a --- /dev/null +++ b/api-docs/m_captcha/0.1.1/unicode_xid/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["UNICODE_VERSION","The version of Unicode that this version of unicode-xid is based on."]],"trait":[["UnicodeXID","Methods for determining if a character is a valid identifier character."]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/unicode_xid/tables/constant.UNICODE_VERSION.html b/api-docs/m_captcha/0.1.1/unicode_xid/tables/constant.UNICODE_VERSION.html new file mode 100644 index 0000000..b67c5aa --- /dev/null +++ b/api-docs/m_captcha/0.1.1/unicode_xid/tables/constant.UNICODE_VERSION.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../unicode_xid/constant.UNICODE_VERSION.html...

+ + + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/unicode_xid/trait.UnicodeXID.html b/api-docs/m_captcha/0.1.1/unicode_xid/trait.UnicodeXID.html new file mode 100644 index 0000000..096daf6 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/unicode_xid/trait.UnicodeXID.html @@ -0,0 +1,16 @@ +unicode_xid::UnicodeXID - Rust

[][src]Trait unicode_xid::UnicodeXID

pub trait UnicodeXID {
+    fn is_xid_start(self) -> bool;
+
fn is_xid_continue(self) -> bool; +}

Methods for determining if a character is a valid identifier character.

+

Required methods

fn is_xid_start(self) -> bool[src]

Returns whether the specified character satisfies the 'XID_Start' +Unicode property.

+

'XID_Start' is a Unicode Derived Property specified in +UAX #31, +mostly similar to ID_Start but modified for closure under NFKx.

+

fn is_xid_continue(self) -> bool[src]

Returns whether the specified char satisfies the 'XID_Continue' +Unicode property.

+

'XID_Continue' is a Unicode Derived Property specified in +UAX #31, +mostly similar to 'ID_Continue' but modified for closure under NFKx.

+
Loading content...

Implementors

impl UnicodeXID for char[src]

Loading content...
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.1/wheel.svg b/api-docs/m_captcha/0.1.1/wheel.svg new file mode 100644 index 0000000..01da3b2 --- /dev/null +++ b/api-docs/m_captcha/0.1.1/wheel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/COPYRIGHT.txt b/api-docs/m_captcha/0.1.2/COPYRIGHT.txt new file mode 100644 index 0000000..af77776 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/COPYRIGHT.txt @@ -0,0 +1,45 @@ +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif Pro (SourceSerifPro-Regular.ttf.woff, + SourceSerifPro-Bold.ttf.woff, SourceSerifPro-It.ttf.woff): + + Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with + Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of + Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerifPro-LICENSE.txt. + +This copyright file is intended to be distributed with rustdoc output. diff --git a/api-docs/m_captcha/0.1.2/FiraSans-LICENSE.txt b/api-docs/m_captcha/0.1.2/FiraSans-LICENSE.txt new file mode 100644 index 0000000..d444ea9 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/FiraSans-LICENSE.txt @@ -0,0 +1,94 @@ +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/m_captcha/0.1.2/FiraSans-Medium.woff b/api-docs/m_captcha/0.1.2/FiraSans-Medium.woff new file mode 100644 index 0000000..7d742c5 Binary files /dev/null and b/api-docs/m_captcha/0.1.2/FiraSans-Medium.woff differ diff --git a/api-docs/m_captcha/0.1.2/FiraSans-Regular.woff b/api-docs/m_captcha/0.1.2/FiraSans-Regular.woff new file mode 100644 index 0000000..d8e0363 Binary files /dev/null and b/api-docs/m_captcha/0.1.2/FiraSans-Regular.woff differ diff --git a/api-docs/m_captcha/0.1.2/LICENSE-APACHE.txt b/api-docs/m_captcha/0.1.2/LICENSE-APACHE.txt new file mode 100644 index 0000000..16fe87b --- /dev/null +++ b/api-docs/m_captcha/0.1.2/LICENSE-APACHE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/api-docs/m_captcha/0.1.2/LICENSE-MIT.txt b/api-docs/m_captcha/0.1.2/LICENSE-MIT.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/LICENSE-MIT.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/api-docs/m_captcha/0.1.2/SourceCodePro-LICENSE.txt b/api-docs/m_captcha/0.1.2/SourceCodePro-LICENSE.txt new file mode 100644 index 0000000..0754257 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/SourceCodePro-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/m_captcha/0.1.2/SourceCodePro-Regular.woff b/api-docs/m_captcha/0.1.2/SourceCodePro-Regular.woff new file mode 100644 index 0000000..5576670 Binary files /dev/null and b/api-docs/m_captcha/0.1.2/SourceCodePro-Regular.woff differ diff --git a/api-docs/m_captcha/0.1.2/SourceCodePro-Semibold.woff b/api-docs/m_captcha/0.1.2/SourceCodePro-Semibold.woff new file mode 100644 index 0000000..ca972a1 Binary files /dev/null and b/api-docs/m_captcha/0.1.2/SourceCodePro-Semibold.woff differ diff --git a/api-docs/m_captcha/0.1.2/SourceSerifPro-Bold.ttf.woff b/api-docs/m_captcha/0.1.2/SourceSerifPro-Bold.ttf.woff new file mode 100644 index 0000000..ca25431 Binary files /dev/null and b/api-docs/m_captcha/0.1.2/SourceSerifPro-Bold.ttf.woff differ diff --git a/api-docs/m_captcha/0.1.2/SourceSerifPro-It.ttf.woff b/api-docs/m_captcha/0.1.2/SourceSerifPro-It.ttf.woff new file mode 100644 index 0000000..a287bbe Binary files /dev/null and b/api-docs/m_captcha/0.1.2/SourceSerifPro-It.ttf.woff differ diff --git a/api-docs/m_captcha/0.1.2/SourceSerifPro-LICENSE.md b/api-docs/m_captcha/0.1.2/SourceSerifPro-LICENSE.md new file mode 100644 index 0000000..22cb755 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/SourceSerifPro-LICENSE.md @@ -0,0 +1,93 @@ +Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/m_captcha/0.1.2/SourceSerifPro-Regular.ttf.woff b/api-docs/m_captcha/0.1.2/SourceSerifPro-Regular.ttf.woff new file mode 100644 index 0000000..a3d55cf Binary files /dev/null and b/api-docs/m_captcha/0.1.2/SourceSerifPro-Regular.ttf.woff differ diff --git a/api-docs/m_captcha/0.1.2/ayu.css b/api-docs/m_captcha/0.1.2/ayu.css new file mode 100644 index 0000000..096f6f3 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/ayu.css @@ -0,0 +1 @@ + body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod){border-bottom-color:#5c6773;}h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}code{color:#ffb454;}h3>code,h4>code,h5>code{color:#e6e1cf;}pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#5c6773;}.docblock table,.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.content .highlighted{color:#000 !important;background-color:#c6afb3;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted{background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a span.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}.collapse-toggle{color:#999;}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-focus:disabled{color:#929292;}.module-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background-color:transparent;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help>div>span{border-bottom-color:#5c6773;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.content .highlighted.mod,.content .highlighted.externcrate{}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content .highlighted.trait{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content .highlighted.traitalias{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}.content .highlighted.foreigntype{}pre.rust .lifetime{}.content .highlighted.primitive{}.content .highlighted.constant,.content .highlighted.static{}.stab.unstable{}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content .highlighted.enum{}.content .highlighted.struct{}.content .highlighted.keyword{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{}.stab.portability{}.content .highlighted.union{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}.content .highlighted.type{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results td span.alias{color:#c5c5c5;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/brush.svg b/api-docs/m_captcha/0.1.2/brush.svg new file mode 100644 index 0000000..ea266e8 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/brush.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/cfg_if/all.html b/api-docs/m_captcha/0.1.2/cfg_if/all.html new file mode 100644 index 0000000..fb218fa --- /dev/null +++ b/api-docs/m_captcha/0.1.2/cfg_if/all.html @@ -0,0 +1,6 @@ +List of all items in this crate + +

[] + + List of all items

Macros

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/cfg_if/index.html b/api-docs/m_captcha/0.1.2/cfg_if/index.html new file mode 100644 index 0000000..3ec7309 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/cfg_if/index.html @@ -0,0 +1,25 @@ +cfg_if - Rust + +

[][src]Crate cfg_if

A macro for defining #[cfg] if-else statements.

+

The macro provided by this crate, cfg_if, is similar to the if/elif C +preprocessor macro by allowing definition of a cascade of #[cfg] cases, +emitting the implementation which matches first.

+

This allows you to conveniently provide a long list #[cfg]'d blocks of code +without having to rewrite each clause multiple times.

+

Example

+
+cfg_if::cfg_if! {
+    if #[cfg(unix)] {
+        fn foo() { /* unix specific functionality */ }
+    } else if #[cfg(target_pointer_width = "32")] {
+        fn foo() { /* non-unix, 32-bit functionality */ }
+    } else {
+        fn foo() { /* fallback implementation */ }
+    }
+}
+
+

Macros

+
cfg_if

The main macro provided by this crate. See crate documentation for more +information.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/cfg_if/macro.cfg_if!.html b/api-docs/m_captcha/0.1.2/cfg_if/macro.cfg_if!.html new file mode 100644 index 0000000..36f9a6d --- /dev/null +++ b/api-docs/m_captcha/0.1.2/cfg_if/macro.cfg_if!.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to macro.cfg_if.html...

+ + + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/cfg_if/macro.cfg_if.html b/api-docs/m_captcha/0.1.2/cfg_if/macro.cfg_if.html new file mode 100644 index 0000000..cbde7d5 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/cfg_if/macro.cfg_if.html @@ -0,0 +1,23 @@ +cfg_if::cfg_if - Rust + +

[][src]Macro cfg_if::cfg_if

+macro_rules! cfg_if {
+    ($(
+        if #[cfg($meta:meta)] { $($tokens:tt)* }
+    ) else * else {
+        $($tokens2:tt)*
+    }) => { ... };
+    (
+        if #[cfg($i_met:meta)] { $($i_tokens:tt)* }
+        $(
+            else if #[cfg($e_met:meta)] { $($e_tokens:tt)* }
+        )*
+    ) => { ... };
+    (@__items ($($not:meta,)*) ; ) => { ... };
+    (@__items ($($not:meta,)*) ; ( ($($m:meta),*) ($($tokens:tt)*) ), $($rest:tt)*) => { ... };
+    (@__identity $($tokens:tt)*) => { ... };
+}
+

The main macro provided by this crate. See crate documentation for more +information.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/cfg_if/sidebar-items.js b/api-docs/m_captcha/0.1.2/cfg_if/sidebar-items.js new file mode 100644 index 0000000..dbc0f91 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/cfg_if/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"macro":[["cfg_if","The main macro provided by this crate. See crate documentation for more information."]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/dark.css b/api-docs/m_captcha/0.1.2/dark.css new file mode 100644 index 0000000..85dec48 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/dark.css @@ -0,0 +1 @@ +body{background-color:#353535;color:#ddd;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.content .highlighted{color:#eee !important;background-color:#616161;}.content .highlighted a,.content .highlighted span{color:#eee !important;}.content .highlighted.trait{background-color:#013191;}.content .highlighted.traitalias{background-color:#013191;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.mod{background-color:#803a1b;}.content .highlighted.externcrate{background-color:#396bac;}.content .highlighted.enum{background-color:#5b4e68;}.content .highlighted.struct{background-color:#194e9f;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#4950ed;}.content .highlighted.type{background-color:#38902c;}.content .highlighted.foreigntype{background-color:#b200d6;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#217d1c;}.content .highlighted.constant,.content .highlighted.static{background-color:#0063cc;}.content .highlighted.primitive{background-color:#00708a;}.content .highlighted.keyword{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}.collapse-toggle{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-focus:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;color:#2f2f2f;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;color:#2f2f2f;}.stab.portability>code{color:#ddd;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);color:black;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#ffb900;}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results td span.alias{color:#fff;}.search-results td span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/down-arrow.svg b/api-docs/m_captcha/0.1.2/down-arrow.svg new file mode 100644 index 0000000..35437e7 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/down-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/favicon-16x16.png b/api-docs/m_captcha/0.1.2/favicon-16x16.png new file mode 100644 index 0000000..7cfe6c1 Binary files /dev/null and b/api-docs/m_captcha/0.1.2/favicon-16x16.png differ diff --git a/api-docs/m_captcha/0.1.2/favicon-32x32.png b/api-docs/m_captcha/0.1.2/favicon-32x32.png new file mode 100644 index 0000000..5109c1d Binary files /dev/null and b/api-docs/m_captcha/0.1.2/favicon-32x32.png differ diff --git a/api-docs/m_captcha/0.1.2/favicon.svg b/api-docs/m_captcha/0.1.2/favicon.svg new file mode 100644 index 0000000..8b34b51 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/favicon.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/api-docs/m_captcha/0.1.2/implementors/actix/actor/trait.Actor.js b/api-docs/m_captcha/0.1.2/implementors/actix/actor/trait.Actor.js new file mode 100644 index 0000000..16ec94a --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/actix/actor/trait.Actor.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Actor for Master","synthetic":false,"types":[]},{"text":"impl Actor for MCaptcha","synthetic":false,"types":[]},{"text":"impl Actor for HashCache","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/actix/handler/trait.Handler.js b/api-docs/m_captcha/0.1.2/implementors/actix/handler/trait.Handler.js new file mode 100644 index 0000000..dd1ed80 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/actix/handler/trait.Handler.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Handler<GetSite> for Master","synthetic":false,"types":[]},{"text":"impl Handler<CleanUp> for Master","synthetic":false,"types":[]},{"text":"impl Handler<RemoveSite> for Master","synthetic":false,"types":[]},{"text":"impl Handler<AddSite> for Master","synthetic":false,"types":[]},{"text":"impl Handler<AddVisitor> for MCaptcha","synthetic":false,"types":[]},{"text":"impl Handler<GetCurrentVisitorCount> for MCaptcha","synthetic":false,"types":[]},{"text":"impl Handler<Stop> for MCaptcha","synthetic":false,"types":[]},{"text":"impl Handler<Cache> for HashCache","synthetic":false,"types":[]},{"text":"impl Handler<DeleteString> for HashCache","synthetic":false,"types":[]},{"text":"impl Handler<Retrive> for HashCache","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/actix/handler/trait.Message.js b/api-docs/m_captcha/0.1.2/implementors/actix/handler/trait.Message.js new file mode 100644 index 0000000..d015e4e --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/actix/handler/trait.Message.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Message for GetSite","synthetic":false,"types":[]},{"text":"impl Message for CleanUp","synthetic":false,"types":[]},{"text":"impl Message for RemoveSite","synthetic":false,"types":[]},{"text":"impl Message for AddSite","synthetic":false,"types":[]},{"text":"impl Message for AddVisitor","synthetic":false,"types":[]},{"text":"impl Message for GetCurrentVisitorCount","synthetic":false,"types":[]},{"text":"impl Message for Stop","synthetic":false,"types":[]},{"text":"impl Message for Cache","synthetic":false,"types":[]},{"text":"impl Message for Retrive","synthetic":false,"types":[]},{"text":"impl Message for DeleteString","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/core/clone/trait.Clone.js b/api-docs/m_captcha/0.1.2/implementors/core/clone/trait.Clone.js new file mode 100644 index 0000000..3098fa4 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Clone for Level","synthetic":false,"types":[]},{"text":"impl Clone for LevelBuilder","synthetic":false,"types":[]},{"text":"impl Clone for Defense","synthetic":false,"types":[]},{"text":"impl Clone for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl Clone for CaptchaError","synthetic":false,"types":[]},{"text":"impl Clone for Master","synthetic":false,"types":[]},{"text":"impl Clone for AddSiteBuilder","synthetic":false,"types":[]},{"text":"impl Clone for MCaptchaBuilder","synthetic":false,"types":[]},{"text":"impl Clone for MCaptcha","synthetic":false,"types":[]},{"text":"impl Clone for AddVisitorResult","synthetic":false,"types":[]},{"text":"impl Clone for HashCache","synthetic":false,"types":[]},{"text":"impl Clone for CacheBuilder","synthetic":false,"types":[]},{"text":"impl Clone for PoWConfig","synthetic":false,"types":[]},{"text":"impl Clone for Work","synthetic":false,"types":[]},{"text":"impl<T: Clone + Save> Clone for System<T>","synthetic":false,"types":[]},{"text":"impl<T: Clone + Save> Clone for SystemBuilder<T>","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/core/cmp/trait.PartialEq.js b/api-docs/m_captcha/0.1.2/implementors/core/cmp/trait.PartialEq.js new file mode 100644 index 0000000..cf1c21e --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl PartialEq<Level> for Level","synthetic":false,"types":[]},{"text":"impl PartialEq<LevelBuilder> for LevelBuilder","synthetic":false,"types":[]},{"text":"impl PartialEq<Defense> for Defense","synthetic":false,"types":[]},{"text":"impl PartialEq<DefenseBuilder> for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl PartialEq<CaptchaError> for CaptchaError","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/core/convert/trait.From.js b/api-docs/m_captcha/0.1.2/implementors/core/convert/trait.From.js new file mode 100644 index 0000000..9f519a6 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/core/convert/trait.From.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl From<Work> for PoW<String>","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/core/default/trait.Default.js b/api-docs/m_captcha/0.1.2/implementors/core/default/trait.Default.js new file mode 100644 index 0000000..17ac631 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/core/default/trait.Default.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Default for LevelBuilder","synthetic":false,"types":[]},{"text":"impl Default for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl Default for AddSiteBuilder","synthetic":false,"types":[]},{"text":"impl Default for MCaptchaBuilder","synthetic":false,"types":[]},{"text":"impl Default for HashCache","synthetic":false,"types":[]},{"text":"impl Default for CacheBuilder","synthetic":false,"types":[]},{"text":"impl<T: Default + Save> Default for SystemBuilder<T>","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/core/fmt/trait.Debug.js b/api-docs/m_captcha/0.1.2/implementors/core/fmt/trait.Debug.js new file mode 100644 index 0000000..0e52c98 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Debug for Level","synthetic":false,"types":[]},{"text":"impl Debug for LevelBuilder","synthetic":false,"types":[]},{"text":"impl Debug for Defense","synthetic":false,"types":[]},{"text":"impl Debug for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl Debug for CaptchaError","synthetic":false,"types":[]},{"text":"impl Debug for MCaptchaBuilder","synthetic":false,"types":[]},{"text":"impl Debug for MCaptcha","synthetic":false,"types":[]},{"text":"impl Debug for AddVisitorResult","synthetic":false,"types":[]},{"text":"impl Debug for PoWConfig","synthetic":false,"types":[]},{"text":"impl Debug for Work","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/core/fmt/trait.Display.js b/api-docs/m_captcha/0.1.2/implementors/core/fmt/trait.Display.js new file mode 100644 index 0000000..3aa76f3 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/core/fmt/trait.Display.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Display for CaptchaError","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Copy.js b/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Copy.js new file mode 100644 index 0000000..802c013 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Copy.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Copy for Level","synthetic":false,"types":[]},{"text":"impl Copy for LevelBuilder","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Freeze.js b/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Freeze.js new file mode 100644 index 0000000..40e7468 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Freeze for Level","synthetic":true,"types":[]},{"text":"impl Freeze for LevelBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for Defense","synthetic":true,"types":[]},{"text":"impl Freeze for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for CaptchaError","synthetic":true,"types":[]},{"text":"impl Freeze for Master","synthetic":true,"types":[]},{"text":"impl Freeze for GetSite","synthetic":true,"types":[]},{"text":"impl Freeze for CleanUp","synthetic":true,"types":[]},{"text":"impl Freeze for RemoveSite","synthetic":true,"types":[]},{"text":"impl Freeze for AddSite","synthetic":true,"types":[]},{"text":"impl Freeze for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for MCaptcha","synthetic":true,"types":[]},{"text":"impl Freeze for AddVisitor","synthetic":true,"types":[]},{"text":"impl Freeze for AddVisitorResult","synthetic":true,"types":[]},{"text":"impl Freeze for GetCurrentVisitorCount","synthetic":true,"types":[]},{"text":"impl Freeze for Stop","synthetic":true,"types":[]},{"text":"impl Freeze for HashCache","synthetic":true,"types":[]},{"text":"impl Freeze for Cache","synthetic":true,"types":[]},{"text":"impl Freeze for CacheBuilder","synthetic":true,"types":[]},{"text":"impl Freeze for Retrive","synthetic":true,"types":[]},{"text":"impl Freeze for DeleteString","synthetic":true,"types":[]},{"text":"impl Freeze for PoWConfig","synthetic":true,"types":[]},{"text":"impl Freeze for Work","synthetic":true,"types":[]},{"text":"impl<T> Freeze for System<T>","synthetic":true,"types":[]},{"text":"impl<T> Freeze for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Send.js b/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Send.js new file mode 100644 index 0000000..e1dbcd2 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Send for Level","synthetic":true,"types":[]},{"text":"impl Send for LevelBuilder","synthetic":true,"types":[]},{"text":"impl Send for Defense","synthetic":true,"types":[]},{"text":"impl Send for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl Send for CaptchaError","synthetic":true,"types":[]},{"text":"impl Send for Master","synthetic":true,"types":[]},{"text":"impl Send for GetSite","synthetic":true,"types":[]},{"text":"impl Send for CleanUp","synthetic":true,"types":[]},{"text":"impl Send for RemoveSite","synthetic":true,"types":[]},{"text":"impl Send for AddSite","synthetic":true,"types":[]},{"text":"impl Send for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl Send for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl Send for MCaptcha","synthetic":true,"types":[]},{"text":"impl Send for AddVisitor","synthetic":true,"types":[]},{"text":"impl Send for AddVisitorResult","synthetic":true,"types":[]},{"text":"impl Send for GetCurrentVisitorCount","synthetic":true,"types":[]},{"text":"impl Send for Stop","synthetic":true,"types":[]},{"text":"impl Send for HashCache","synthetic":true,"types":[]},{"text":"impl Send for Cache","synthetic":true,"types":[]},{"text":"impl Send for CacheBuilder","synthetic":true,"types":[]},{"text":"impl Send for Retrive","synthetic":true,"types":[]},{"text":"impl Send for DeleteString","synthetic":true,"types":[]},{"text":"impl Send for PoWConfig","synthetic":true,"types":[]},{"text":"impl Send for Work","synthetic":true,"types":[]},{"text":"impl<T> Send for System<T>","synthetic":true,"types":[]},{"text":"impl<T> Send for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.StructuralPartialEq.js b/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 0000000..d87286d --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl StructuralPartialEq for Level","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for LevelBuilder","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Defense","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for DefenseBuilder","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for CaptchaError","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Sync.js b/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Sync.js new file mode 100644 index 0000000..98050da --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Sync for Level","synthetic":true,"types":[]},{"text":"impl Sync for LevelBuilder","synthetic":true,"types":[]},{"text":"impl Sync for Defense","synthetic":true,"types":[]},{"text":"impl Sync for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl Sync for CaptchaError","synthetic":true,"types":[]},{"text":"impl Sync for Master","synthetic":true,"types":[]},{"text":"impl Sync for GetSite","synthetic":true,"types":[]},{"text":"impl Sync for CleanUp","synthetic":true,"types":[]},{"text":"impl Sync for RemoveSite","synthetic":true,"types":[]},{"text":"impl Sync for AddSite","synthetic":true,"types":[]},{"text":"impl Sync for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl Sync for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl Sync for MCaptcha","synthetic":true,"types":[]},{"text":"impl Sync for AddVisitor","synthetic":true,"types":[]},{"text":"impl Sync for AddVisitorResult","synthetic":true,"types":[]},{"text":"impl Sync for GetCurrentVisitorCount","synthetic":true,"types":[]},{"text":"impl Sync for Stop","synthetic":true,"types":[]},{"text":"impl Sync for HashCache","synthetic":true,"types":[]},{"text":"impl Sync for Cache","synthetic":true,"types":[]},{"text":"impl Sync for CacheBuilder","synthetic":true,"types":[]},{"text":"impl Sync for Retrive","synthetic":true,"types":[]},{"text":"impl Sync for DeleteString","synthetic":true,"types":[]},{"text":"impl Sync for PoWConfig","synthetic":true,"types":[]},{"text":"impl Sync for Work","synthetic":true,"types":[]},{"text":"impl<T> Sync for System<T>","synthetic":true,"types":[]},{"text":"impl<T> Sync for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Unpin.js b/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Unpin.js new file mode 100644 index 0000000..1cfa5f9 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Unpin for Level","synthetic":true,"types":[]},{"text":"impl Unpin for LevelBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for Defense","synthetic":true,"types":[]},{"text":"impl Unpin for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for CaptchaError","synthetic":true,"types":[]},{"text":"impl Unpin for Master","synthetic":true,"types":[]},{"text":"impl Unpin for GetSite","synthetic":true,"types":[]},{"text":"impl Unpin for CleanUp","synthetic":true,"types":[]},{"text":"impl Unpin for RemoveSite","synthetic":true,"types":[]},{"text":"impl Unpin for AddSite","synthetic":true,"types":[]},{"text":"impl Unpin for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for MCaptcha","synthetic":true,"types":[]},{"text":"impl Unpin for AddVisitor","synthetic":true,"types":[]},{"text":"impl Unpin for AddVisitorResult","synthetic":true,"types":[]},{"text":"impl Unpin for GetCurrentVisitorCount","synthetic":true,"types":[]},{"text":"impl Unpin for Stop","synthetic":true,"types":[]},{"text":"impl Unpin for HashCache","synthetic":true,"types":[]},{"text":"impl Unpin for Cache","synthetic":true,"types":[]},{"text":"impl Unpin for CacheBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for Retrive","synthetic":true,"types":[]},{"text":"impl Unpin for DeleteString","synthetic":true,"types":[]},{"text":"impl Unpin for PoWConfig","synthetic":true,"types":[]},{"text":"impl Unpin for Work","synthetic":true,"types":[]},{"text":"impl<T> Unpin for System<T>","synthetic":true,"types":[]},{"text":"impl<T> Unpin for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/m_captcha/cache/trait.Save.js b/api-docs/m_captcha/0.1.2/implementors/m_captcha/cache/trait.Save.js new file mode 100644 index 0000000..218677b --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/m_captcha/cache/trait.Save.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/serde/de/trait.Deserialize.js b/api-docs/m_captcha/0.1.2/implementors/serde/de/trait.Deserialize.js new file mode 100644 index 0000000..3a49487 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/serde/de/trait.Deserialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl<'de> Deserialize<'de> for Level","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Defense","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for MCaptchaBuilder","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for MCaptcha","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for AddVisitorResult","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Cache","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for PoWConfig","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Work","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/serde/ser/trait.Serialize.js b/api-docs/m_captcha/0.1.2/implementors/serde/ser/trait.Serialize.js new file mode 100644 index 0000000..a6b6444 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/serde/ser/trait.Serialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Serialize for Level","synthetic":false,"types":[]},{"text":"impl Serialize for Defense","synthetic":false,"types":[]},{"text":"impl Serialize for MCaptchaBuilder","synthetic":false,"types":[]},{"text":"impl Serialize for MCaptcha","synthetic":false,"types":[]},{"text":"impl Serialize for AddVisitorResult","synthetic":false,"types":[]},{"text":"impl Serialize for Cache","synthetic":false,"types":[]},{"text":"impl Serialize for PoWConfig","synthetic":false,"types":[]},{"text":"impl Serialize for Work","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/std/error/trait.Error.js b/api-docs/m_captcha/0.1.2/implementors/std/error/trait.Error.js new file mode 100644 index 0000000..2536e5d --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/std/error/trait.Error.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Error for CaptchaError","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/std/panic/trait.RefUnwindSafe.js b/api-docs/m_captcha/0.1.2/implementors/std/panic/trait.RefUnwindSafe.js new file mode 100644 index 0000000..0e703d0 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/std/panic/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl RefUnwindSafe for Level","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for LevelBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Defense","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for CaptchaError","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for Master","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for GetSite","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for CleanUp","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for RemoveSite","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for AddSite","synthetic":true,"types":[]},{"text":"impl !RefUnwindSafe for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for MCaptcha","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for AddVisitor","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for AddVisitorResult","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for GetCurrentVisitorCount","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Stop","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for HashCache","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Cache","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for CacheBuilder","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Retrive","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for DeleteString","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for PoWConfig","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Work","synthetic":true,"types":[]},{"text":"impl<T> !RefUnwindSafe for System<T>","synthetic":true,"types":[]},{"text":"impl<T> !RefUnwindSafe for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/std/panic/trait.UnwindSafe.js b/api-docs/m_captcha/0.1.2/implementors/std/panic/trait.UnwindSafe.js new file mode 100644 index 0000000..8dc35fa --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/std/panic/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl UnwindSafe for Level","synthetic":true,"types":[]},{"text":"impl UnwindSafe for LevelBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Defense","synthetic":true,"types":[]},{"text":"impl UnwindSafe for DefenseBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for CaptchaError","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for Master","synthetic":true,"types":[]},{"text":"impl UnwindSafe for GetSite","synthetic":true,"types":[]},{"text":"impl UnwindSafe for CleanUp","synthetic":true,"types":[]},{"text":"impl UnwindSafe for RemoveSite","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for AddSite","synthetic":true,"types":[]},{"text":"impl !UnwindSafe for AddSiteBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for MCaptchaBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for MCaptcha","synthetic":true,"types":[]},{"text":"impl UnwindSafe for AddVisitor","synthetic":true,"types":[]},{"text":"impl UnwindSafe for AddVisitorResult","synthetic":true,"types":[]},{"text":"impl UnwindSafe for GetCurrentVisitorCount","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Stop","synthetic":true,"types":[]},{"text":"impl UnwindSafe for HashCache","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Cache","synthetic":true,"types":[]},{"text":"impl UnwindSafe for CacheBuilder","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Retrive","synthetic":true,"types":[]},{"text":"impl UnwindSafe for DeleteString","synthetic":true,"types":[]},{"text":"impl UnwindSafe for PoWConfig","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Work","synthetic":true,"types":[]},{"text":"impl<T> !UnwindSafe for System<T>","synthetic":true,"types":[]},{"text":"impl<T> !UnwindSafe for SystemBuilder<T>","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/implementors/unicode_xid/trait.UnicodeXID.js b/api-docs/m_captcha/0.1.2/implementors/unicode_xid/trait.UnicodeXID.js new file mode 100644 index 0000000..bde1c01 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/implementors/unicode_xid/trait.UnicodeXID.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["unicode_xid"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/light.css b/api-docs/m_captcha/0.1.2/light.css new file mode 100644 index 0000000..fa73fe2 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/light.css @@ -0,0 +1 @@ + body{background-color:white;color:black;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.content .highlighted{color:#000 !important;background-color:#ccc;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted.trait{background-color:#c7b6ff;}.content .highlighted.traitalias{background-color:#c7b6ff;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.enum{background-color:#b4d1b9;}.content .highlighted.struct{background-color:#e7b1a0;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#c6afb3;}.content .highlighted.type{background-color:#ffc891;}.content .highlighted.foreigntype{background-color:#f5c4ff;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#8ce488;}.content .highlighted.constant,.content .highlighted.static{background-color:#c3e0ff;}.content .highlighted.primitive{background-color:#9aecff;}.content .highlighted.keyword{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}.collapse-toggle{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-focus:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;}.stab.portability>code{color:#000;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:#FDFFD3;border-right:3px solid #ffb44c;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#717171;}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results td span.alias{color:#000;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/all.html b/api-docs/m_captcha/0.1.2/m_captcha/all.html new file mode 100644 index 0000000..5dbe3d5 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/all.html @@ -0,0 +1,6 @@ +List of all items in this crate + +

[] + + List of all items

Structs

Enums

Traits

Typedefs

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/cache/hashcache/index.html b/api-docs/m_captcha/0.1.2/m_captcha/cache/hashcache/index.html new file mode 100644 index 0000000..1ec8070 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/cache/hashcache/index.html @@ -0,0 +1,7 @@ +m_captcha::cache::hashcache - Rust + +

[][src]Module m_captcha::cache::hashcache

In-memory cache implementation that uses HashMap

+

Structs

+
HashCache

cache datastructure implementing Save

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/cache/hashcache/sidebar-items.js b/api-docs/m_captcha/0.1.2/m_captcha/cache/hashcache/sidebar-items.js new file mode 100644 index 0000000..5dadaea --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/cache/hashcache/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["HashCache","cache datastructure implementing [Save]"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/cache/hashcache/struct.HashCache.html b/api-docs/m_captcha/0.1.2/m_captcha/cache/hashcache/struct.HashCache.html new file mode 100644 index 0000000..7d47758 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/cache/hashcache/struct.HashCache.html @@ -0,0 +1,40 @@ +m_captcha::cache::hashcache::HashCache - Rust + +

[][src]Struct m_captcha::cache::hashcache::HashCache

pub struct HashCache(_);

cache datastructure implementing Save

+

Trait Implementations

impl Actor for HashCache[src]

type Context = Context<Self>

Actor execution context type

+

impl Clone for HashCache[src]

impl Default for HashCache[src]

impl Handler<Cache> for HashCache[src]

cache a PoWConfig

+

type Result = MessageResult<Cache>

The type of value that this handler will return. Read more

+

impl Handler<DeleteString> for HashCache[src]

Delte a PoWConfig

+

type Result = MessageResult<DeleteString>

The type of value that this handler will return. Read more

+

impl Handler<Retrive> for HashCache[src]

Retrive PoW difficulty_factor for a PoW string

+

type Result = MessageResult<Retrive>

The type of value that this handler will return. Read more

+

impl Save for HashCache[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/cache/index.html b/api-docs/m_captcha/0.1.2/m_captcha/cache/index.html new file mode 100644 index 0000000..2c1d0c1 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/cache/index.html @@ -0,0 +1,13 @@ +m_captcha::cache - Rust + +

[][src]Module m_captcha::cache

message datatypes to interact with MCaptcha actor +Cache is used to save proofof work details and nonces to prevent replay attacks +and rainbow/dictionary attacks

+

Re-exports

+
pub use hashcache::HashCache;

Modules

+
hashcache

In-memory cache implementation that uses HashMap

+
messages

Messages that can be sent to cache data structures implementing Save

+

Traits

+
Save

Describes actor handler trait impls that are required by a cache implementation

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/index.html b/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/index.html new file mode 100644 index 0000000..1bebdf8 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/index.html @@ -0,0 +1,12 @@ +m_captcha::cache::messages - Rust + +

[][src]Module m_captcha::cache::messages

Messages that can be sent to cache data structures implementing Save

+

Structs

+
Cache

Message to cache PoW difficulty factor and string

+
CacheBuilder

Builder for Cache.

+
DeleteString

Message to delete cached PoW difficulty factor and string +when they expire

+
Retrive

Message to retrive the the difficulty factor for the specified +string from the cache

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/sidebar-items.js b/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/sidebar-items.js new file mode 100644 index 0000000..829b034 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Cache","Message to cache PoW difficulty factor and string"],["CacheBuilder","Builder for `Cache`."],["DeleteString","Message to delete cached PoW difficulty factor and string when they expire"],["Retrive","Message to retrive the the difficulty factor for the specified string from the cache"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/struct.Cache.html b/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/struct.Cache.html new file mode 100644 index 0000000..057caf1 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/struct.Cache.html @@ -0,0 +1,27 @@ +m_captcha::cache::messages::Cache - Rust + +

[][src]Struct m_captcha::cache::messages::Cache

pub struct Cache {
+    pub string: String,
+    pub difficulty_factor: u32,
+    pub duration: u64,
+}

Message to cache PoW difficulty factor and string

+

+ Fields

string: Stringdifficulty_factor: u32duration: u64

Implementations

impl Cache[src]

pub fn new(p: &PoWConfig, v: &AddVisitorResult) -> Self[src]

Trait Implementations

impl<'de> Deserialize<'de> for Cache[src]

impl Handler<Cache> for HashCache[src]

cache a PoWConfig

+

type Result = MessageResult<Cache>

The type of value that this handler will return. Read more

+

impl Message for Cache[src]

type Result = CaptchaResult<()>

The type of value that this message will resolved with if it is +successful. Read more

+

impl Serialize for Cache[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/struct.CacheBuilder.html b/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/struct.CacheBuilder.html new file mode 100644 index 0000000..2361a21 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/struct.CacheBuilder.html @@ -0,0 +1,25 @@ +m_captcha::cache::messages::CacheBuilder - Rust + +

[][src]Struct m_captcha::cache::messages::CacheBuilder

pub struct CacheBuilder { /* fields omitted */ }

Builder for Cache.

+

Implementations

impl CacheBuilder[src]

pub fn string(&mut self, value: String) -> &mut Self[src]

pub fn difficulty_factor(&mut self, value: u32) -> &mut Self[src]

pub fn duration(&mut self, value: u64) -> &mut Self[src]

pub fn build(&self) -> Result<Cache, String>[src]

Builds a new Cache.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for CacheBuilder[src]

impl Default for CacheBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/struct.DeleteString.html b/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/struct.DeleteString.html new file mode 100644 index 0000000..a1e2c08 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/struct.DeleteString.html @@ -0,0 +1,21 @@ +m_captcha::cache::messages::DeleteString - Rust + +

[][src]Struct m_captcha::cache::messages::DeleteString

pub struct DeleteString(pub String);

Message to delete cached PoW difficulty factor and string +when they expire

+

Trait Implementations

impl Handler<DeleteString> for HashCache[src]

Delte a PoWConfig

+

type Result = MessageResult<DeleteString>

The type of value that this handler will return. Read more

+

impl Message for DeleteString[src]

type Result = CaptchaResult<()>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/struct.Retrive.html b/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/struct.Retrive.html new file mode 100644 index 0000000..2a0ae09 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/cache/messages/struct.Retrive.html @@ -0,0 +1,21 @@ +m_captcha::cache::messages::Retrive - Rust + +

[][src]Struct m_captcha::cache::messages::Retrive

pub struct Retrive(pub String);

Message to retrive the the difficulty factor for the specified +string from the cache

+

Trait Implementations

impl Handler<Retrive> for HashCache[src]

Retrive PoW difficulty_factor for a PoW string

+

type Result = MessageResult<Retrive>

The type of value that this handler will return. Read more

+

impl Message for Retrive[src]

type Result = CaptchaResult<Option<u32>>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/cache/sidebar-items.js b/api-docs/m_captcha/0.1.2/m_captcha/cache/sidebar-items.js new file mode 100644 index 0000000..d2c721a --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/cache/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["hashcache","In-memory cache implementation that uses [HashMap]"],["messages","Messages that can be sent to cache data structures implementing [Save][super::Save]"]],"trait":[["Save","Describes actor handler trait impls that are required by a cache implementation"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/cache/trait.Save.html b/api-docs/m_captcha/0.1.2/m_captcha/cache/trait.Save.html new file mode 100644 index 0000000..20e3e84 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/cache/trait.Save.html @@ -0,0 +1,5 @@ +m_captcha::cache::Save - Rust + +

[][src]Trait m_captcha::cache::Save

pub trait Save: Actor + Handler<Retrive> + Handler<Cache> + Handler<DeleteString> { }

Describes actor handler trait impls that are required by a cache implementation

+

Implementors

impl Save for HashCache[src]

Loading content...
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/defense/index.html b/api-docs/m_captcha/0.1.2/m_captcha/defense/index.html new file mode 100644 index 0000000..cba2223 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/defense/index.html @@ -0,0 +1,34 @@ +m_captcha::defense - Rust + +

[][src]Module m_captcha::defense

Defense datatypes

+ +
+use m_captcha::{LevelBuilder, DefenseBuilder};
+DefenseBuilder::default()
+       .add_level(
+           LevelBuilder::default()
+               .visitor_threshold(50)
+               .difficulty_factor(50)
+               .unwrap()
+               .build()
+               .unwrap(),
+       )
+       .unwrap()
+       .add_level(
+           LevelBuilder::default()
+               .visitor_threshold(500)
+               .difficulty_factor(500)
+               .unwrap()
+               .build()
+               .unwrap(),
+       )
+       .unwrap()
+       .build()
+       .unwrap();
+

Structs

+
Defense

struct describes all the different Levels at which an mCaptcha system operates

+
DefenseBuilder

Builder struct for Defense

+
Level

Level struct that describes threshold-difficulty factor mapping

+
LevelBuilder

Bulder struct for Level to describe threshold-difficulty factor mapping

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/defense/sidebar-items.js b/api-docs/m_captcha/0.1.2/m_captcha/defense/sidebar-items.js new file mode 100644 index 0000000..49f37fb --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/defense/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Defense","struct describes all the different [Level]s at which an mCaptcha system operates"],["DefenseBuilder","Builder struct for [Defense]"],["Level","Level struct that describes threshold-difficulty factor mapping"],["LevelBuilder","Bulder struct for [Level] to describe threshold-difficulty factor mapping"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/defense/struct.Defense.html b/api-docs/m_captcha/0.1.2/m_captcha/defense/struct.Defense.html new file mode 100644 index 0000000..5d7e384 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/defense/struct.Defense.html @@ -0,0 +1,38 @@ +m_captcha::defense::Defense - Rust + +

[][src]Struct m_captcha::defense::Defense

pub struct Defense { /* fields omitted */ }

struct describes all the different Levels at which an mCaptcha system operates

+

Implementations

impl Defense[src]

pub fn get_difficulty(&self) -> u32[src]

! Difficulty is calculated as: +! rust ! let difficulty = u128::max_value() - u128::max_value() / difficulty_factor; ! +! The higher the difficulty_factor, the higher the difficulty. +Get difficulty factor of current level of defense

+

pub fn tighten_up(&mut self)[src]

tighten up defense. Increases defense level by a factor of one. +When defense is at max level, calling this method will have no effect

+

pub fn loosen_up(&mut self)[src]

Loosen up defense. Decreases defense level by a factor of one. +When defense is at the lowest level, calling this method will have no effect.

+

pub fn max_defense(&mut self)[src]

Set defense to maximum level

+

pub fn min_defense(&mut self)[src]

Set defense to minimum level

+

pub fn visitor_threshold(&self) -> u32[src]

Get current level's visitor threshold

+

Trait Implementations

impl Clone for Defense[src]

impl Debug for Defense[src]

impl<'de> Deserialize<'de> for Defense[src]

impl PartialEq<Defense> for Defense[src]

impl Serialize for Defense[src]

impl StructuralPartialEq for Defense[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/defense/struct.DefenseBuilder.html b/api-docs/m_captcha/0.1.2/m_captcha/defense/struct.DefenseBuilder.html new file mode 100644 index 0000000..a9c926d --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/defense/struct.DefenseBuilder.html @@ -0,0 +1,28 @@ +m_captcha::defense::DefenseBuilder - Rust + +

[][src]Struct m_captcha::defense::DefenseBuilder

pub struct DefenseBuilder { /* fields omitted */ }

Builder struct for Defense

+

Implementations

impl DefenseBuilder[src]

pub fn add_level(&mut self, level: Level) -> CaptchaResult<&mut Self>[src]

add a level to Defense

+

pub fn build(&mut self) -> CaptchaResult<Defense>[src]

Build Defense

+

Trait Implementations

impl Clone for DefenseBuilder[src]

impl Debug for DefenseBuilder[src]

impl Default for DefenseBuilder[src]

impl PartialEq<DefenseBuilder> for DefenseBuilder[src]

impl StructuralPartialEq for DefenseBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/defense/struct.Level.html b/api-docs/m_captcha/0.1.2/m_captcha/defense/struct.Level.html new file mode 100644 index 0000000..7b3d146 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/defense/struct.Level.html @@ -0,0 +1,31 @@ +m_captcha::defense::Level - Rust + +

[][src]Struct m_captcha::defense::Level

pub struct Level {
+    pub visitor_threshold: u32,
+    pub difficulty_factor: u32,
+}

Level struct that describes threshold-difficulty factor mapping

+

+ Fields

visitor_threshold: u32difficulty_factor: u32

Trait Implementations

impl Clone for Level[src]

impl Copy for Level[src]

impl Debug for Level[src]

impl<'de> Deserialize<'de> for Level[src]

impl PartialEq<Level> for Level[src]

impl Serialize for Level[src]

impl StructuralPartialEq for Level[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/defense/struct.LevelBuilder.html b/api-docs/m_captcha/0.1.2/m_captcha/defense/struct.LevelBuilder.html new file mode 100644 index 0000000..1ad0d06 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/defense/struct.LevelBuilder.html @@ -0,0 +1,35 @@ +m_captcha::defense::LevelBuilder - Rust + +

[][src]Struct m_captcha::defense::LevelBuilder

pub struct LevelBuilder { /* fields omitted */ }

Bulder struct for Level to describe threshold-difficulty factor mapping

+

Implementations

impl LevelBuilder[src]

pub fn visitor_threshold(&mut self, visitor_threshold: u32) -> &mut Self[src]

set visitor count for level

+

pub fn difficulty_factor(
    &mut self,
    difficulty_factor: u32
) -> CaptchaResult<&mut Self>
[src]

set difficulty factor for level. difficulty_factor can't be zero because +Difficulty is calculated as:

+ +
+let difficulty_factor = 500;
+let difficulty = u128::max_value() - u128::max_value() / difficulty_factor;
+

the higher the difficulty_factor, the higher the difficulty.

+

pub fn build(&mut self) -> CaptchaResult<Level>[src]

build Level struct

+

Trait Implementations

impl Clone for LevelBuilder[src]

impl Copy for LevelBuilder[src]

impl Debug for LevelBuilder[src]

impl Default for LevelBuilder[src]

impl PartialEq<LevelBuilder> for LevelBuilder[src]

impl StructuralPartialEq for LevelBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/errors/enum.CaptchaError.html b/api-docs/m_captcha/0.1.2/m_captcha/errors/enum.CaptchaError.html new file mode 100644 index 0000000..691a883 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/errors/enum.CaptchaError.html @@ -0,0 +1,61 @@ +m_captcha::errors::CaptchaError - Rust + +

[][src]Enum m_captcha::errors::CaptchaError

pub enum CaptchaError {
+    LevelEmpty,
+    DifficultyFactorZero,
+    CaptchaDurationZero,
+    SetDifficultyFactor,
+    SetVisitorThreshold,
+    DuplicateVisitorCount,
+    DecreaseingDifficultyFactor,
+    MailboxError,
+    InsuffiencientDifficulty,
+    StringNotFound,
+    PleaseSetValue(String),
+}

Error datatype

+

+ Variants

+
LevelEmpty

When configuring m_captcha, DefenseBuilder +must be passed atleast one LevelConfig if not this error will arise

+
DifficultyFactorZero

Visitor count must be a whole number(zero and above). +When configuring m_captcha, LevelBuilder. +difficulty_factor must be set to greater than zero.

+
CaptchaDurationZero

captcha cooldown duration must be greater than 0

+
SetDifficultyFactor

Difficulty factor must be set

+
SetVisitorThreshold

Visitor threshold must be set

+
DuplicateVisitorCount

Visitor count must be Unique

+
DecreaseingDifficultyFactor

Difficulty factor should increase with level

+
MailboxError

Difficulty factor should increase with level

+
InsuffiencientDifficulty

Happens when submitted work doesn't satisfy the required +difficulty factor

+
StringNotFound

Happens when submitted work is computed over string that +isn't in cache

+
PleaseSetValue(String)

Used in builder structs when a value is not set

+

Trait Implementations

impl Clone for CaptchaError[src]

impl Debug for CaptchaError[src]

impl Display for CaptchaError[src]

impl Error for CaptchaError[src]

impl PartialEq<CaptchaError> for CaptchaError[src]

impl StructuralPartialEq for CaptchaError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/errors/index.html b/api-docs/m_captcha/0.1.2/m_captcha/errors/index.html new file mode 100644 index 0000000..ba16508 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/errors/index.html @@ -0,0 +1,9 @@ +m_captcha::errors - Rust + +

[][src]Module m_captcha::errors

Errors and Result module

+

Enums

+
CaptchaError

Error datatype

+

Type Definitions

+
CaptchaResult

Result datatype for m_captcha

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/errors/sidebar-items.js b/api-docs/m_captcha/0.1.2/m_captcha/errors/sidebar-items.js new file mode 100644 index 0000000..ddfbf69 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/errors/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["CaptchaError","Error datatype"]],"type":[["CaptchaResult","[Result] datatype for m_captcha"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/errors/type.CaptchaResult.html b/api-docs/m_captcha/0.1.2/m_captcha/errors/type.CaptchaResult.html new file mode 100644 index 0000000..42f90eb --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/errors/type.CaptchaResult.html @@ -0,0 +1,5 @@ +m_captcha::errors::CaptchaResult - Rust + +

[][src]Type Definition m_captcha::errors::CaptchaResult

type CaptchaResult<V> = Result<V, CaptchaError>;

Result datatype for m_captcha

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/index.html b/api-docs/m_captcha/0.1.2/m_captcha/index.html new file mode 100644 index 0000000..898d8da --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/index.html @@ -0,0 +1,158 @@ +m_captcha - Rust + +

[][src]Crate m_captcha

mCaptcha is a proof of work based Denaial-of-Service attack protection system. +This is is a server library that you can embed in your services to protect your +servers.

+

A commercial managed solution is in the works but I'd much rather prefer +folks host their own instances as it will make the more decentralized and free.

+

In mCaptcha, defense is adjusted in discrete levels that depend on the +ammount of traffic that a service is experiencing. So users of this library are +requested to benchmark their target machines before configuring their mCaptcha +component.

+

Terminology:

+
    +
  • Difficulty(Factor): Minimum ammount of work that a client must do to make a valid +request.
  • +
  • Defense: A datatype that various visitor-difficulty mappigns
  • +
  • Visitor: Smallest unit of traffic, usually a single request. The more you have, the busier +your service is. Determines mCaptcha defense defense
  • +
  • Visitor threshold: The threshold at which MCaptcha will adjust defense defense
  • +
  • Cache : A datatype that implements Save. Used to store +PoW requirements to defend against replay attacks and dictionary attacks.
  • +
  • Master: A datatype that manages +MCaptcha actors. Works like a DNS for +AddVisitor messages.
  • +
  • System: mCaptcha system that manages cache, master and provides +useful abstractions. An mCaptcha system/instance can have only a single +System
  • +
+

Example:

+
+use m_captcha::{
+    cache::HashCache,
+    master::{AddSiteBuilder, Master},
+    pow::{ConfigBuilder, Work},
+    system::SystemBuilder,
+    DefenseBuilder, LevelBuilder, MCaptchaBuilder,
+};
+// traits from actix needs to be in scope for starting actor
+use actix::prelude::*;
+
+#[actix_rt::main]
+async fn main() -> std::io::Result<()> {
+    // start cahce actor
+    // cache is used to store PoW requirements that are sent to clients
+    // This way, it can be verified that the client computed work over a config
+    // that _we_ sent. Offers protection against rainbow tables powered dictionary attacks
+    let cache = HashCache::default().start();
+
+    // create PoW config with unique salt. Salt has to be safely guarded.
+    // salts protect us from replay attacks
+    let pow = ConfigBuilder::default()
+        .salt("myrandomsaltisnotlongenoug".into())
+        .build()
+        .unwrap();
+
+    // start master actor. Master actor is responsible for managing MCaptcha actors
+    // each mCaptcha system should have only one master
+    let master = Master::new(5).start();
+
+    // Create system. System encapsulates master and cache and provides useful abstraction
+    // each mCaptcha system should have only one system
+    let system = SystemBuilder::default()
+        .master(master)
+        .cache(cache)
+        .pow(pow.clone())
+        .build()
+        .unwrap();
+
+    // configure defense. This is a per site configuration. A site can have several levels
+    // of defenses configured
+    let defense = DefenseBuilder::default()
+        // add as many defense as you see fit
+        .add_level(
+            LevelBuilder::default()
+                // visitor_threshold is the threshold/limit at which
+                // mCaptcha will adjust difficulty defense
+                // it is advisable to set small values for the first
+                // defense visitor_threshold and difficulty_factor
+                // as this will be the work that clients will be
+                // computing when there's no load
+                .visitor_threshold(50)
+                .difficulty_factor(500)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .add_level(
+            LevelBuilder::default()
+                .visitor_threshold(5000)
+                .difficulty_factor(50000)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .build()
+        .unwrap();
+
+    // create and start MCaptcha actor that uses the above defense configuration
+    // This is what manages the difficulty factor of sites that an mCaptcha protects
+    let mcaptcha = MCaptchaBuilder::default()
+        .defense(defense)
+        // leaky bucket algorithm's emission interval
+        .duration(30)
+        //   .cache(cache)
+        .build()
+        .unwrap()
+        .start();
+
+    // unique value identifying an MCaptcha actor
+    let mcaptcha_name = "batsense.net";
+
+    // add MCaptcha to Master
+    let msg = AddSiteBuilder::default()
+        .id(mcaptcha_name.into())
+        .addr(mcaptcha.clone())
+        .build()
+        .unwrap();
+    system.master.send(msg).await.unwrap();
+
+    // Get PoW config. Should be called everytime there's a visitor for a
+    // managed site(here mcaptcha_name)
+    let work_req = system.get_pow(mcaptcha_name.into()).await.unwrap();
+
+    // the following computation should be done on the client but for the purpose
+    // of this illustration, we are going to do it on the server it self
+    let work = pow
+        .prove_work(&work_req.string, work_req.difficulty_factor)
+        .unwrap();
+
+    // the payload that the client sends to the server
+    let payload = Work {
+        string: work_req.string,
+        result: work.result,
+        nonce: work.nonce,
+    };
+
+    // Server evaluates client's work. Returns true if everything
+    // checksout and Err() if something fishy is happening
+    let res = system.verify_pow(payload.clone()).await.unwrap();
+    assert!(res);
+
+    Ok(())
+}
+

Re-exports

+
pub use crate::cache::hashcache::HashCache;
pub use defense::Defense;
pub use defense::DefenseBuilder;
pub use defense::LevelBuilder;
pub use mcaptcha::MCaptcha;
pub use mcaptcha::MCaptchaBuilder;

Modules

+
cache

message datatypes to interact with MCaptcha actor +Cache is used to save proofof work details and nonces to prevent replay attacks +and rainbow/dictionary attacks

+
defense

Defense datatypes

+
errors

Errors and Result module

+
master

Master actor module that manages MCaptcha actors

+
mcaptcha

MCaptcha actor module that manages defense levels

+
pow

PoW datatypes used in client-server interaction

+
system

module describing mCaptcha system

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/master/index.html b/api-docs/m_captcha/0.1.2/m_captcha/master/index.html new file mode 100644 index 0000000..8d1c165 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/master/index.html @@ -0,0 +1,15 @@ +m_captcha::master - Rust + +

[][src]Module m_captcha::master

Master actor module that manages MCaptcha actors

+

Structs

+
AddSite

Message to add an MCaptcha actor to Master

+
AddSiteBuilder

Builder for AddSite.

+
CleanUp

Message to clean up master of MCaptcha actors with zero visitor count

+
GetSite

Message to get an MCaptcha actor from master

+
Master

This Actor manages the MCaptcha actors. +A service can have several MCaptcha actors with +varying Defense configurations +so a "master" actor is needed to manage them all

+
RemoveSite

Message to delete MCaptcha actor

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/master/sidebar-items.js b/api-docs/m_captcha/0.1.2/m_captcha/master/sidebar-items.js new file mode 100644 index 0000000..c5ff518 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/master/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["AddSite","Message to add an [MCaptcha] actor to [Master]"],["AddSiteBuilder","Builder for `AddSite`."],["CleanUp","Message to clean up master of [MCaptcha] actors with zero visitor count"],["GetSite","Message to get an [MCaptcha] actor from master"],["Master","This Actor manages the [MCaptcha] actors. A service can have several [MCaptcha] actors with varying [Defense][crate::defense::Defense] configurations so a \"master\" actor is needed to manage them all"],["RemoveSite","Message to delete [MCaptcha] actor"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/master/struct.AddSite.html b/api-docs/m_captcha/0.1.2/m_captcha/master/struct.AddSite.html new file mode 100644 index 0000000..a4ec85e --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/master/struct.AddSite.html @@ -0,0 +1,23 @@ +m_captcha::master::AddSite - Rust + +

[][src]Struct m_captcha::master::AddSite

pub struct AddSite {
+    pub id: String,
+    pub addr: Addr<MCaptcha>,
+}

Message to add an MCaptcha actor to Master

+

+ Fields

id: Stringaddr: Addr<MCaptcha>

Trait Implementations

impl Handler<AddSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Message for AddSite[src]

type Result = ()

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/master/struct.AddSiteBuilder.html b/api-docs/m_captcha/0.1.2/m_captcha/master/struct.AddSiteBuilder.html new file mode 100644 index 0000000..7528487 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/master/struct.AddSiteBuilder.html @@ -0,0 +1,25 @@ +m_captcha::master::AddSiteBuilder - Rust + +

[][src]Struct m_captcha::master::AddSiteBuilder

pub struct AddSiteBuilder { /* fields omitted */ }

Builder for AddSite.

+

Implementations

impl AddSiteBuilder[src]

pub fn id(&mut self, value: String) -> &mut Self[src]

pub fn addr(&mut self, value: Addr<MCaptcha>) -> &mut Self[src]

pub fn build(&self) -> Result<AddSite, String>[src]

Builds a new AddSite.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for AddSiteBuilder[src]

impl Default for AddSiteBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/master/struct.CleanUp.html b/api-docs/m_captcha/0.1.2/m_captcha/master/struct.CleanUp.html new file mode 100644 index 0000000..5b668b6 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/master/struct.CleanUp.html @@ -0,0 +1,19 @@ +m_captcha::master::CleanUp - Rust + +

[][src]Struct m_captcha::master::CleanUp

pub struct CleanUp;

Message to clean up master of MCaptcha actors with zero visitor count

+

Trait Implementations

impl Handler<CleanUp> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Message for CleanUp[src]

type Result = ()

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/master/struct.GetSite.html b/api-docs/m_captcha/0.1.2/m_captcha/master/struct.GetSite.html new file mode 100644 index 0000000..b20cb68 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/master/struct.GetSite.html @@ -0,0 +1,19 @@ +m_captcha::master::GetSite - Rust + +

[][src]Struct m_captcha::master::GetSite

pub struct GetSite(pub String);

Message to get an MCaptcha actor from master

+

Trait Implementations

impl Handler<GetSite> for Master[src]

type Result = MessageResult<GetSite>

The type of value that this handler will return. Read more

+

impl Message for GetSite[src]

type Result = Option<Addr<MCaptcha>>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/master/struct.Master.html b/api-docs/m_captcha/0.1.2/m_captcha/master/struct.Master.html new file mode 100644 index 0000000..3ebebc2 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/master/struct.Master.html @@ -0,0 +1,46 @@ +m_captcha::master::Master - Rust + +

[][src]Struct m_captcha::master::Master

pub struct Master { /* fields omitted */ }

This Actor manages the MCaptcha actors. +A service can have several MCaptcha actors with +varying Defense configurations +so a "master" actor is needed to manage them all

+

Implementations

impl Master[src]

pub fn add_site(&mut self, details: AddSite)[src]

add MCaptcha actor to Master

+

pub fn new(gc: u64) -> Self[src]

create new master +accepts a u64 to configure garbage collection period

+

pub fn get_site<'a, 'b>(&'a mut self, id: &'b str) -> Option<Addr<MCaptcha>>[src]

get MCaptcha actor from Master

+

pub fn rm_site(&mut self, id: &str)[src]

remvoes MCaptcha actor from Master

+

Trait Implementations

impl Actor for Master[src]

type Context = Context<Self>

Actor execution context type

+

impl Clone for Master[src]

impl Handler<AddSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Handler<CleanUp> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Handler<GetSite> for Master[src]

type Result = MessageResult<GetSite>

The type of value that this handler will return. Read more

+

impl Handler<RemoveSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/master/struct.RemoveSite.html b/api-docs/m_captcha/0.1.2/m_captcha/master/struct.RemoveSite.html new file mode 100644 index 0000000..6ca58be --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/master/struct.RemoveSite.html @@ -0,0 +1,19 @@ +m_captcha::master::RemoveSite - Rust + +

[][src]Struct m_captcha::master::RemoveSite

pub struct RemoveSite(pub String);

Message to delete MCaptcha actor

+

Trait Implementations

impl Handler<RemoveSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Message for RemoveSite[src]

type Result = ()

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/index.html b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/index.html new file mode 100644 index 0000000..1c43ef6 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/index.html @@ -0,0 +1,69 @@ +m_captcha::mcaptcha - Rust + +

[][src]Module m_captcha::mcaptcha

MCaptcha actor module that manages defense levels

+

Usage:

+
+use m_captcha::{mcaptcha::AddVisitor, MCaptchaBuilder, cache::HashCache, LevelBuilder, DefenseBuilder};
+// traits from actix needs to be in scope for starting actor
+use actix::prelude::*;
+
+#[actix_rt::main]
+async fn main() -> std::io::Result<()> {
+    // configure defense
+    let defense = DefenseBuilder::default()
+        // add as many levels as you see fit
+        .add_level(
+            LevelBuilder::default()
+                // visitor_threshold is the threshold/limit at which
+                // mCaptcha will adjust difficulty levels
+                // it is advisable to set small values for the first
+                // levels visitor_threshold and difficulty_factor
+                // as this will be the work that clients will be
+                // computing when there's no load
+                .visitor_threshold(50)
+                .difficulty_factor(500)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .add_level(
+            LevelBuilder::default()
+                .visitor_threshold(5000)
+                .difficulty_factor(50000)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .build()
+        .unwrap();
+
+    // create and start MCaptcha actor
+    //let cache = HashCache::default().start();
+    let mcaptcha = MCaptchaBuilder::default()
+        .defense(defense)
+        // leaky bucket algorithm's emission interval
+        .duration(30)
+        .build()
+        .unwrap()
+        .start();
+
+    // increment count when user visits protected routes
+    mcaptcha.send(AddVisitor).await.unwrap();
+
+    Ok(())
+}
+

Structs

+
AddVisitor

Message to increment the visitor count +returns difficulty factor and lifetime

+
AddVisitorResult

Struct representing the return datatime of +AddVisitor message. Contains MCaptcha lifetime +and difficulty factor

+
GetCurrentVisitorCount

Message to get the visitor count

+
MCaptcha

This struct represents the mCaptcha state and is used +to configure leaky-bucket lifetime and manage defense

+
MCaptchaBuilder

Builder for MCaptcha

+
Stop

Message to stop MCaptcha

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/sidebar-items.js b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/sidebar-items.js new file mode 100644 index 0000000..a4685eb --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["AddVisitor","Message to increment the visitor count returns difficulty factor and lifetime"],["AddVisitorResult","Struct representing the return datatime of [AddVisitor] message. Contains MCaptcha lifetime and difficulty factor"],["GetCurrentVisitorCount","Message to get the visitor count"],["MCaptcha","This struct represents the mCaptcha state and is used to configure leaky-bucket lifetime and manage defense"],["MCaptchaBuilder","Builder for [MCaptcha]"],["Stop","Message to stop [MCaptcha]"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.AddVisitor.html b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.AddVisitor.html new file mode 100644 index 0000000..2f6a7f4 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.AddVisitor.html @@ -0,0 +1,20 @@ +m_captcha::mcaptcha::AddVisitor - Rust + +

[][src]Struct m_captcha::mcaptcha::AddVisitor

pub struct AddVisitor;

Message to increment the visitor count +returns difficulty factor and lifetime

+

Trait Implementations

impl Handler<AddVisitor> for MCaptcha[src]

type Result = MessageResult<AddVisitor>

The type of value that this handler will return. Read more

+

impl Message for AddVisitor[src]

type Result = AddVisitorResult

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.AddVisitorResult.html b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.AddVisitorResult.html new file mode 100644 index 0000000..3844c21 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.AddVisitorResult.html @@ -0,0 +1,30 @@ +m_captcha::mcaptcha::AddVisitorResult - Rust + +

[][src]Struct m_captcha::mcaptcha::AddVisitorResult

pub struct AddVisitorResult {
+    pub duration: u64,
+    pub difficulty_factor: u32,
+}

Struct representing the return datatime of +AddVisitor message. Contains MCaptcha lifetime +and difficulty factor

+

+ Fields

duration: u64difficulty_factor: u32

Trait Implementations

impl Clone for AddVisitorResult[src]

impl Debug for AddVisitorResult[src]

impl<'de> Deserialize<'de> for AddVisitorResult[src]

impl Serialize for AddVisitorResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.GetCurrentVisitorCount.html b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.GetCurrentVisitorCount.html new file mode 100644 index 0000000..0c2ff38 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.GetCurrentVisitorCount.html @@ -0,0 +1,19 @@ +m_captcha::mcaptcha::GetCurrentVisitorCount - Rust + +

[][src]Struct m_captcha::mcaptcha::GetCurrentVisitorCount

pub struct GetCurrentVisitorCount;

Message to get the visitor count

+

Trait Implementations

impl Handler<GetCurrentVisitorCount> for MCaptcha[src]

type Result = MessageResult<GetCurrentVisitorCount>

The type of value that this handler will return. Read more

+

impl Message for GetCurrentVisitorCount[src]

type Result = u32

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.MCaptcha.html b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.MCaptcha.html new file mode 100644 index 0000000..85ad246 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.MCaptcha.html @@ -0,0 +1,44 @@ +m_captcha::mcaptcha::MCaptcha - Rust + +

[][src]Struct m_captcha::mcaptcha::MCaptcha

pub struct MCaptcha { /* fields omitted */ }

This struct represents the mCaptcha state and is used +to configure leaky-bucket lifetime and manage defense

+

Implementations

impl MCaptcha[src]

pub fn add_visitor(&mut self)[src]

increments the visitor count by one

+

pub fn decrement_visitor(&mut self)[src]

decrements the visitor count by one

+

pub fn get_difficulty(&self) -> u32[src]

get current difficulty factor

+

pub fn get_duration(&self) -> u64[src]

get MCaptcha's lifetime

+

Trait Implementations

impl Actor for MCaptcha[src]

type Context = Context<Self>

Actor execution context type

+

impl Clone for MCaptcha[src]

impl Debug for MCaptcha[src]

impl<'de> Deserialize<'de> for MCaptcha[src]

impl Handler<AddVisitor> for MCaptcha[src]

type Result = MessageResult<AddVisitor>

The type of value that this handler will return. Read more

+

impl Handler<GetCurrentVisitorCount> for MCaptcha[src]

type Result = MessageResult<GetCurrentVisitorCount>

The type of value that this handler will return. Read more

+

impl Handler<Stop> for MCaptcha[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Serialize for MCaptcha[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.MCaptchaBuilder.html b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.MCaptchaBuilder.html new file mode 100644 index 0000000..b347e7e --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.MCaptchaBuilder.html @@ -0,0 +1,28 @@ +m_captcha::mcaptcha::MCaptchaBuilder - Rust + +

[][src]Struct m_captcha::mcaptcha::MCaptchaBuilder

pub struct MCaptchaBuilder { /* fields omitted */ }

Builder for MCaptcha

+

Implementations

impl MCaptchaBuilder[src]

pub fn defense(&mut self, d: Defense) -> &mut Self[src]

set defense

+

pub fn duration(&mut self, d: u64) -> &mut Self[src]

set duration

+

pub fn build(&mut self) -> CaptchaResult<MCaptcha>[src]

Builds new MCaptcha

+

Trait Implementations

impl Clone for MCaptchaBuilder[src]

impl Debug for MCaptchaBuilder[src]

impl Default for MCaptchaBuilder[src]

impl<'de> Deserialize<'de> for MCaptchaBuilder[src]

impl Serialize for MCaptchaBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.Stop.html b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.Stop.html new file mode 100644 index 0000000..26803b4 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.Stop.html @@ -0,0 +1,19 @@ +m_captcha::mcaptcha::Stop - Rust + +

[][src]Struct m_captcha::mcaptcha::Stop

pub struct Stop;

Message to stop MCaptcha

+

Trait Implementations

impl Handler<Stop> for MCaptcha[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Message for Stop[src]

type Result = ()

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.Visitor.html b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.Visitor.html new file mode 100644 index 0000000..fa6516e --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.Visitor.html @@ -0,0 +1,20 @@ +m_captcha::mcaptcha::Visitor - Rust + +

[][src]Struct m_captcha::mcaptcha::Visitor

pub struct Visitor;

Message to increment the visitor count +returns difficulty factor and lifetime

+

Trait Implementations

impl Handler<Visitor> for MCaptcha[src]

type Result = MessageResult<Visitor>

The type of value that this handler will return. Read more

+

impl Message for Visitor[src]

type Result = VisitorResult

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.VisitorResult.html b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.VisitorResult.html new file mode 100644 index 0000000..8dc6f93 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/mcaptcha/struct.VisitorResult.html @@ -0,0 +1,21 @@ +m_captcha::mcaptcha::VisitorResult - Rust + +

[][src]Struct m_captcha::mcaptcha::VisitorResult

pub struct VisitorResult {
+    pub duration: u64,
+    pub difficulty_factor: u32,
+}

Struct representing the return datatime of +Visitor message. Contains MCaptcha lifetime +and difficulty factor

+

+ Fields

duration: u64difficulty_factor: u32

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/pow/index.html b/api-docs/m_captcha/0.1.2/m_captcha/pow/index.html new file mode 100644 index 0000000..e175a5b --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/pow/index.html @@ -0,0 +1,9 @@ +m_captcha::pow - Rust + +

[][src]Module m_captcha::pow

PoW datatypes used in client-server interaction

+

Structs

+
ConfigBuilder

Builder for Config.

+
PoWConfig

PoW requirement datatype that is be sent to clients for generating PoW

+
Work

PoW datatype that clients send to server

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/pow/sidebar-items.js b/api-docs/m_captcha/0.1.2/m_captcha/pow/sidebar-items.js new file mode 100644 index 0000000..66a8cb8 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/pow/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["ConfigBuilder","Builder for `Config`."],["PoWConfig","PoW requirement datatype that is be sent to clients for generating PoW"],["Work","PoW datatype that clients send to server"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/pow/struct.ConfigBuilder.html b/api-docs/m_captcha/0.1.2/m_captcha/pow/struct.ConfigBuilder.html new file mode 100644 index 0000000..ace8116 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/pow/struct.ConfigBuilder.html @@ -0,0 +1,25 @@ +m_captcha::pow::ConfigBuilder - Rust + +

[]Struct m_captcha::pow::ConfigBuilder

pub struct ConfigBuilder { /* fields omitted */ }

Builder for Config.

+

Implementations

impl ConfigBuilder

pub fn salt(&mut self, value: String) -> &mut ConfigBuilder

pub fn build(&self) -> Result<Config, String>

Builds a new Config.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for ConfigBuilder

impl Default for ConfigBuilder

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/pow/struct.PoWConfig.html b/api-docs/m_captcha/0.1.2/m_captcha/pow/struct.PoWConfig.html new file mode 100644 index 0000000..61b4e1c --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/pow/struct.PoWConfig.html @@ -0,0 +1,29 @@ +m_captcha::pow::PoWConfig - Rust + +

[][src]Struct m_captcha::pow::PoWConfig

pub struct PoWConfig {
+    pub string: String,
+    pub difficulty_factor: u32,
+}

PoW requirement datatype that is be sent to clients for generating PoW

+

+ Fields

string: Stringdifficulty_factor: u32

Implementations

impl PoWConfig[src]

pub fn new(m: u32) -> Self[src]

create new instance of PoWConfig

+

Trait Implementations

impl Clone for PoWConfig[src]

impl Debug for PoWConfig[src]

impl<'de> Deserialize<'de> for PoWConfig[src]

impl Serialize for PoWConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/pow/struct.Work.html b/api-docs/m_captcha/0.1.2/m_captcha/pow/struct.Work.html new file mode 100644 index 0000000..bea7016 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/pow/struct.Work.html @@ -0,0 +1,30 @@ +m_captcha::pow::Work - Rust + +

[][src]Struct m_captcha::pow::Work

pub struct Work {
+    pub string: String,
+    pub result: String,
+    pub nonce: u64,
+}

PoW datatype that clients send to server

+

+ Fields

string: Stringresult: Stringnonce: u64

Trait Implementations

impl Clone for Work[src]

impl Debug for Work[src]

impl<'de> Deserialize<'de> for Work[src]

impl From<Work> for PoW<String>[src]

impl Serialize for Work[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/sidebar-items.js b/api-docs/m_captcha/0.1.2/m_captcha/sidebar-items.js new file mode 100644 index 0000000..454ab30 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["cache","message datatypes to interact with [MCaptcha] actor Cache is used to save proofof work details and nonces to prevent replay attacks and rainbow/dictionary attacks"],["defense","Defense datatypes"],["errors","Errors and Result module"],["master","[Master] actor module that manages [MCaptcha] actors"],["mcaptcha","MCaptcha actor module that manages defense levels"],["pow","PoW datatypes used in client-server interaction"],["system","module describing mCaptcha system"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/system/index.html b/api-docs/m_captcha/0.1.2/m_captcha/system/index.html new file mode 100644 index 0000000..f140da0 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/system/index.html @@ -0,0 +1,8 @@ +m_captcha::system - Rust + +

[][src]Module m_captcha::system

module describing mCaptcha system

+

Structs

+
System

struct describing various bits of data required for an mCaptcha system

+
SystemBuilder

Builder for System.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/system/sidebar-items.js b/api-docs/m_captcha/0.1.2/m_captcha/system/sidebar-items.js new file mode 100644 index 0000000..61ff7ad --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/system/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["System","struct describing various bits of data required for an mCaptcha system"],["SystemBuilder","Builder for `System`."]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/system/struct.System.html b/api-docs/m_captcha/0.1.2/m_captcha/system/struct.System.html new file mode 100644 index 0000000..a356d3b --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/system/struct.System.html @@ -0,0 +1,27 @@ +m_captcha::system::System - Rust + +

[][src]Struct m_captcha::system::System

pub struct System<T: Save> {
+    pub master: Addr<Master>,
+    // some fields omitted
+}

struct describing various bits of data required for an mCaptcha system

+

+ Fields

master: Addr<Master>

Implementations

impl<T> System<T> where
    T: Save,
    <T as Actor>::Context: ToEnvelope<T, Cache> + ToEnvelope<T, Retrive>, 
[src]

pub async fn get_pow(&self, id: String) -> Option<PoWConfig>[src]

utility function to get difficulty factor of site id and cache it

+

pub async fn verify_pow(&self, work: Work) -> CaptchaResult<bool>[src]

utility function to verify Work

+

Trait Implementations

impl<T: Clone + Save> Clone for System<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for System<T>[src]

impl<T> Send for System<T>[src]

impl<T> Sync for System<T>[src]

impl<T> Unpin for System<T>[src]

impl<T> !UnwindSafe for System<T>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/m_captcha/system/struct.SystemBuilder.html b/api-docs/m_captcha/0.1.2/m_captcha/system/struct.SystemBuilder.html new file mode 100644 index 0000000..77b054d --- /dev/null +++ b/api-docs/m_captcha/0.1.2/m_captcha/system/struct.SystemBuilder.html @@ -0,0 +1,25 @@ +m_captcha::system::SystemBuilder - Rust + +

[][src]Struct m_captcha::system::SystemBuilder

pub struct SystemBuilder<T: Save> { /* fields omitted */ }

Builder for System.

+

Implementations

impl<T: Save + Clone> SystemBuilder<T>[src]

pub fn master(&mut self, value: Addr<Master>) -> &mut Self[src]

pub fn cache(&mut self, value: Addr<T>) -> &mut Self[src]

pub fn pow(&mut self, value: Config) -> &mut Self[src]

pub fn build(&self) -> Result<System<T>, String>[src]

Builds a new System.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl<T: Clone + Save> Clone for SystemBuilder<T>[src]

impl<T: Default + Save> Default for SystemBuilder<T>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/main.js b/api-docs/m_captcha/0.1.2/main.js new file mode 100644 index 0000000..03cfb2c --- /dev/null +++ b/api-docs/m_captcha/0.1.2/main.js @@ -0,0 +1,8 @@ +if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}function getSearchInput(){return document.getElementsByClassName("search-input")[0]}function getSearchElement(){return document.getElementById("search")}function getThemesElement(){return document.getElementById("theme-choices")}function getThemePickerElement(){return document.getElementById("theme-picker")}function focusSearchBar(){getSearchInput().focus()}function defocusSearchBar(){getSearchInput().blur()}(function(){"use strict";var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var disableShortcuts=getSettingValue("disable-shortcuts")==="true";var search_input=getSearchInput();var searchTimeout=null;var toggleAllDocsId="toggle-all-docs";var currentTab=0;var mouseMovedAfterSearch=true;var titleBeforeSearch=document.title;var searchTitle=null;function clearInputTimeout(){if(searchTimeout!==null){clearTimeout(searchTimeout);searchTimeout=null}}function getPageId(){if(window.location.hash){var tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}function showSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(main,"hidden");removeClass(search,"hidden");mouseMovedAfterSearch=false;document.title=searchTitle}function hideSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=titleBeforeSearch}var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function getQueryStringParams(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function isHidden(elem){return elem.offsetHeight===0}var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=getSearchElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){hideSearchResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(hash,"","?search=#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}elem=document.getElementById(savedHash.slice(1));if(!elem||!isHidden(elem)){return}var parent=elem.parentNode;if(parent&&hasClass(parent,"impl-items")){onEachLazy(parent.getElementsByClassName("collapsed"),function(e){if(e.parentNode===parent){e.click();return true}});if(isHidden(elem)){if(hasClass(parent.lastElementChild,"collapse-toggle")){parent.lastElementChild.click()}}}}}function highlightSourceLines(match,ev){if(typeof match==="undefined"){hideSidebar();match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to0){collapseDocs(collapses[0],"show")}}}}function getHelpElement(){buildHelperPopup();return document.getElementById("help")}function displayHelp(display,ev,help){help=help?help:getHelpElement();if(display===true){if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else if(hasClass(help,"hidden")===false){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}function handleEscape(ev){var help=getHelpElement();var search=getSearchElement();if(hasClass(help,"hidden")===false){displayHelp(false,ev,help)}else if(hasClass(search,"hidden")===false){clearInputTimeout();ev.preventDefault();hideSearchResults(search)}defocusSearchBar();hideThemeButtonState()}function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts===true){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();focusSearchBar();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:var themePicker=getThemePickerElement();if(themePicker.parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!=="theme-picker"){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!=="theme-picker"){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id==="theme-picker"&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}function findParentElement(elem,tagName){do{if(elem&&elem.tagName===tagName){return elem}elem=elem.parentNode}while(elem);return null}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function resetMouseMoved(ev){mouseMovedAfterSearch=true}document.addEventListener("mousemove",resetMouseMoved);var handleSourceHighlight=(function(){var prev_line_id=0;var set_fragment=function(name){var x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return function(ev){var cur_line_id=parseInt(ev.target.id,10);ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());document.addEventListener("click",function(ev){if(hasClass(ev.target,"help-button")){displayHelp(true,ev)}else if(hasClass(ev.target,"collapse-toggle")){collapseDocs(ev.target,"toggle")}else if(hasClass(ev.target.parentNode,"collapse-toggle")){collapseDocs(ev.target.parentNode,"toggle")}else if(ev.target.tagName==="SPAN"&&hasClass(ev.target.parentNode,"line-numbers")){handleSourceHighlight(ev)}else if(hasClass(getHelpElement(),"hidden")===false){var help=getHelpElement();var is_inside_help_popup=ev.target!==help&&help.contains(ev.target);if(is_inside_help_popup===false){addClass(help,"hidden");removeClass(document.body,"blur")}}else{var a=findParentElement(ev.target,"A");if(a&&a.hash){expandSection(a.hash.replace(/^#/,""))}}});(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=rootPath.match(/\.\.\//g).length+1;for(i=0;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;if(isType!==true||obj.type){var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnProperty(results,entry)){ar.push(results[entry])}}results=ar;var i;var nresults=results.length;for(i=0;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});var length=results.length;for(i=0;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function getObjectFromId(id){if(typeof id==="number"){return searchIndex[id]}return{'name':id}}function checkGenerics(obj,val){var lev_distance=MAX_LEV_DISTANCE+1;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var total=0;var done=0;var vlength=val.generics.length;for(var y=0;yGENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var allFound=true;for(var y=0;allFound===true&&yGENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch===true){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var length=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(aborted===false){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function generateId(ty){if(ty.parent&&ty.parent.name){return itemTypes[ty.ty]+ty.path+ty.parent.name+ty.name}return itemTypes[ty.ty]+ty.path+ty.name}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];var i;if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){for(i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i;var ty;var fullId;var returned;var in_args;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0;i1?paths.length-1:1);var lev;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=generateId(ty);if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||searchWords[j].replace(/_/g,"").indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=searchWords[j].replace(/_/g,"").indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){lev=MAX_LEV_DISTANCE+1}else{lev+=1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function initSearchNav(){var hoverTimeout;var click_func=function(e){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}var dst=e.target.getElementsByTagName("a");if(dst.length<1){return}dst=dst[0];if(window.location.pathname===dst.pathname){hideSearchResults();document.location.href=dst.href}};var mouseover_func=function(e){if(mouseMovedAfterSearch){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}clearTimeout(hoverTimeout);hoverTimeout=setTimeout(function(){onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){removeClass(i_e,"highlighted")})});addClass(el,"highlighted")},20)}};onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){i_e.onclick=click_func;i_e.onmouseover=mouseover_func})});search_input.onkeydown=function(e){var actives=[[],[],[]];var current=0;onEachLazy(document.getElementById("results").childNodes,function(e){onEachLazy(e.getElementsByClassName("highlighted"),function(h_e){actives[current].push(h_e)});current+=1});if(e.which===38){if(e.ctrlKey){printTab(currentTab>0?currentTab-1:2)}else{if(!actives[currentTab].length||!actives[currentTab][0].previousElementSibling){return}addClass(actives[currentTab][0].previousElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===40){if(e.ctrlKey){printTab(currentTab>1?0:currentTab+1)}else if(!actives[currentTab].length){var results=document.getElementById("results").childNodes;if(results.length>0){var res=results[currentTab].getElementsByClassName("result");if(res.length>0){addClass(res[0],"highlighted")}}}else if(actives[currentTab][0].nextElementSibling){addClass(actives[currentTab][0].nextElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===13){if(actives[currentTab].length){document.location.href=actives[currentTab][0].getElementsByTagName("a")[0].href}}else if(e.which===16){}else if(actives[currentTab].length>0){removeClass(actives[currentTab][0],"highlighted")}}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var splitPath=item.path.split("::");var enumName=splitPath.pop();path=splitPath.join("::");displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraStyle="";if(display===false){extraStyle=" style=\"display: none;\""}var output="";var duplicates={};var length=0;if(array.length>0){output="";array.forEach(function(item){var name,type;name=item.name;type=itemTypes[item.ty];if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}length+=1;output+=""});output+="
"+""+(item.is_alias===true?(""+item.alias+"  - see "):"")+item.displayPath+""+name+""+""+""+item.desc+" 
"}else{output="
No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:
"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(currentTab===tabNb){return""}return""}function showResults(results){var search=getSearchElement();if(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==getSearchLoadingText())){var elem=document.createElement("a");elem.href=results.others[0].href;elem.style.display="none";document.body.appendChild(elem);elem.click();return}var query=getQuery(search_input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var output="

Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"+ret_others[0]+ret_in_args[0]+ret_returned[0]+"
";search.innerHTML=output;showSearchResults(search);var tds=search.getElementsByTagName("td");var td_width=0;if(tds.length>0){td_width=tds[0].offsetWidth}var width=search.offsetWidth-40-td_width;onEachLazy(search.getElementsByClassName("desc"),function(e){e.style.width=width+"px"});initSearchNav();var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnProperty(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=getQueryStringParams();var query=getQuery(search_input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(forced!==true&&query.id===currentResults){if(query.query.length>0){putBackSearch(search_input)}return}searchTitle="Results for "+query.query+" - Rust";if(browserSupportsHistoryApi()){if(!history.state&&!params.search){history.pushState(query,"","?search="+encodeURIComponent(query.raw))}else{history.replaceState(query,"","?search="+encodeURIComponent(query.raw))}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates))}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i;var currentIndex=0;for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);searchIndex.push({crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,type:null,});currentIndex+=1;var items=rawSearchIndex[crate].i;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i0){search_input.value=params.search;search(e)}else{search_input.value="";hideSearchResults()}})}search()}index=buildIndex(rawSearchIndex);startSearch();if(rootPath==="../"||rootPath==="./"){var sidebar=document.getElementsByClassName("sidebar-elems")[0];if(sidebar){var div=document.createElement("div");div.className="block crate";div.innerHTML="

Crates

";var ul=document.createElement("ul");div.appendChild(ul);var crates=[];for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}crates.push(crate)}crates.sort();for(var i=0;i','`').replace('','`');return x.innerText}window.initSidebarItems=function(items){var sidebar=document.getElementsByClassName("sidebar-elems")[0];var current=window.sidebarCurrent;function block(shortty,longty){var filtered=items[shortty];if(!filtered){return}var div=document.createElement("div");div.className="block "+shortty;var h3=document.createElement("h3");h3.textContent=longty;div.appendChild(h3);var ul=document.createElement("ul");var length=filtered.length;for(var i=0;i"+""+"
"+code.outerHTML+"
";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function onEveryMatchingChild(elem,className,func){if(elem&&className&&func){var length=elem.childNodes.length;var nodes=elem.childNodes;for(var i=0;i"+labelForToggleButton(sectionIsCollapsed)+"
]";return toggle}function createToggle(toggle,otherMessage,fontSize,extraClass,show){var span=document.createElement("span");span.className="toggle-label";if(show){span.style.display="none"}if(!otherMessage){span.innerHTML=" Expand description"}else{span.innerHTML=otherMessage}if(fontSize){span.style.fontSize=fontSize}var mainToggle=toggle.cloneNode(true);mainToggle.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper";if(!show){addClass(wrapper,"collapsed");var inner=mainToggle.getElementsByClassName("inner");if(inner&&inner.length>0){inner[0].innerHTML="+"}}if(extraClass){addClass(wrapper,extraClass)}wrapper.appendChild(mainToggle);return wrapper}(function(){var toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}var toggle=createSimpleToggle(false);var hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";var hideImplementors=getSettingValue("auto-collapse-implementors")!=="false";var pageId=getPageId();var func=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(!next){return}if(hasClass(next,"docblock")){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideMethodDocs===true&&hasClass(e,"method")===true){collapseDocs(newToggle,"hide",pageId)}}};var funcImpl=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(next&&hasClass(next,"docblock")){next=next.nextElementSibling}if(!next){return}if(hasClass(e,"impl")&&(next.getElementsByClassName("method").length>0||next.getElementsByClassName("associatedconstant").length>0)){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideImplementors===true&&e.parentNode.id==="implementors-list"){collapseDocs(newToggle,"hide",pageId)}}};onEachLazy(document.getElementsByClassName("method"),func);onEachLazy(document.getElementsByClassName("associatedconstant"),func);onEachLazy(document.getElementsByClassName("impl"),funcImpl);var impl_call=function(){};if(hideMethodDocs===true){impl_call=function(e,newToggle){if(e.id.match(/^impl(?:-\d+)?$/)===null){if(hasClass(e,"impl")===true){collapseDocs(newToggle,"hide",pageId)}}}}var newToggle=document.createElement("a");newToggle.href="javascript:void(0)";newToggle.className="collapse-toggle hidden-default collapsed";newToggle.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items";function toggleClicked(){if(hasClass(this,"collapsed")){removeClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("hidden"),function(x){if(hasClass(x,"content")===false){removeClass(x,"hidden");addClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(false)+"] Hide undocumented items"}else{addClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("x"),function(x){if(hasClass(x,"content")===false){addClass(x,"hidden");removeClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items"}}onEachLazy(document.getElementsByClassName("impl-items"),function(e){onEachLazy(e.getElementsByClassName("associatedconstant"),func);var hiddenElems=e.getElementsByClassName("hidden");var needToggle=false;var hlength=hiddenElems.length;for(var i=0;i"+getSearchLoadingText()+"";showSearchResults(search)}var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")===true){hideSidebar()}else{showSidebar()}}}if(main){onEachLazy(main.getElementsByClassName("loading-content"),function(e){e.remove()});onEachLazy(main.childNodes,function(e){if(e.tagName==="H2"||e.tagName==="H3"){var nextTagName=e.nextElementSibling.tagName;if(nextTagName=="H2"||nextTagName=="H3"){e.nextElementSibling.style.display="flex"}else{e.nextElementSibling.style.display="block"}}})}function enableSearchInput(){if(search_input){search_input.removeAttribute('disabled')}}window.addSearchOptions=function(crates){var elem=document.getElementById("crate-search");if(!elem){enableSearchInput();return}var crates_text=[];if(Object.keys(crates).length>1){for(var crate in crates){if(hasOwnProperty(crates,crate)){crates_text.push(crate)}}}crates_text.sort(function(a,b){var lower_a=a.toLowerCase();var lower_b=b.toLowerCase();if(lower_alower_b){return 1}return 0});var savedCrate=getSettingValue("saved-filter-crate");for(var i=0;ithe rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["ctrl + ↑ / ↓","Switch result tab"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>(index&1)===0?""+y+"":y).join("")+"
"+x[1]+"
").join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";var infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + * -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ + str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);popup.appendChild(container);insertAfter(popup,getSearchElement());buildHelperPopup=function(){}}onHashChange(null);window.onhashchange=onHashChange}());window.onunload=function(){} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/normalize.css b/api-docs/m_captcha/0.1.2/normalize.css new file mode 100644 index 0000000..6d692b5 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/normalize.css @@ -0,0 +1,2 @@ + /*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/noscript.css b/api-docs/m_captcha/0.1.2/noscript.css new file mode 100644 index 0000000..5cbcb90 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/noscript.css @@ -0,0 +1 @@ + #main>h2+div,#main>h2+h3,#main>h3+div{display:block;}.loading-content{display:none;}#main>h2+div,#main>h3+div{display:block;}#main>h2+h3{display:flex;}#main .impl-items .hidden{display:block !important;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/rust-logo.png b/api-docs/m_captcha/0.1.2/rust-logo.png new file mode 100644 index 0000000..74b4bd6 Binary files /dev/null and b/api-docs/m_captcha/0.1.2/rust-logo.png differ diff --git a/api-docs/m_captcha/0.1.2/rustdoc.css b/api-docs/m_captcha/0.1.2/rustdoc.css new file mode 100644 index 0000000..757de19 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/rustdoc.css @@ -0,0 +1 @@ + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff") format('woff');}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:400;src:local('Source Serif Pro'),url("SourceSerifPro-Regular.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:italic;font-weight:400;src:local('Source Serif Pro Italic'),url("SourceSerifPro-It.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:700;src:local('Source Serif Pro Bold'),url("SourceSerifPro-Bold.ttf.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.woff") format('woff');}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif Pro",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.notable),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{border-bottom:1px dashed;margin-top:0;}h1.fqn>.in-band>a:hover{text-decoration:underline;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border-bottom:1px solid;}h3.impl,h3.method,h4.method,h3.type,h4.type,h4.associatedconstant{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}h3.impl,h3.method,h3.type{padding-left:15px;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.content table td:first-child>a,.collapse-toggle,div.item-list .out-of-band,#source-sidebar,#sidebar-toggle{font-family:"Fira Sans",sans-serif;}.content ul.crate a.crate{font:16px/1.6 "Fira Sans";}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}code,pre,a.test-arrow{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code,.docblock code.spotlight{padding:0;}.docblock code.spotlight :last-child{padding-bottom:0.6em;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;min-width:70em;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-child{font-weight:500;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{margin-top:0;margin-bottom:8px;text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc:not(.source) .example-wrap{display:inline-flex;margin-bottom:10px;position:relative;}.example-wrap{width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;border-top-left-radius:5px;border-bottom-left-radius:5px;padding:13px 8px;text-align:right;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results{position:absolute;right:0;left:0;overflow:auto;}#results>table{width:100%;table-layout:fixed;margin-bottom:40px;}.content pre.line-numbers{float:left;border:none;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock code,.docblock-short code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}#main>.docblock h1{font-size:1.3em;}#main>.docblock h2{font-size:1.15em;}#main>.docblock h3,#main>.docblock h4,#main>.docblock h5{font-size:1em;}#main>h2+div,#main>h2+h3,#main>h3+div{display:none;flex-wrap:wrap;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{float:right;font-size:23px;margin:0px;padding:0px;font-weight:normal;}h3.impl>.out-of-band{font-size:21px;}h4.method>.out-of-band{font-size:19px;}h4>code,h3>code,.invisible>code{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{margin:0px;padding:0px;}.in-band>code{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content .method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items>h4{border-bottom:0;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.toggle-wrapper.marg-left>.collapse-toggle{left:-24px;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;margin-top:-13px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:-6px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,h4>code+.srclink,h3>code+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results .desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results a{display:block;}.content .search-results td:first-child{padding-right:0;width:50%;}.content .search-results td:first-child a{padding-right:10px;}.content .search-results td:first-child a:after{clear:both;content:"";display:block;}.content .search-results td:first-child a span{float:left;}tr.result span.primitive::after{content:' (primitive type)';font-style:italic;}tr.result span.keyword::after{content:' (keyword)';font-style:italic;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;}#help>div>span{text-align:center;display:block;margin:10px 0;font-size:18px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.module-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since,.methods .since{flex-grow:0;padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code,.methods code{flex-grow:1;}.impl-items h4,h4.impl,h3.impl,.methods h3{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.collapse-toggle{font-weight:300;position:absolute;left:-23px;top:0;}h3>.collapse-toggle,h4>.collapse-toggle{font-size:0.8em;top:5px;}.toggle-wrapper>.collapse-toggle{left:-24px;margin-top:0px;}.toggle-wrapper{position:relative;margin-top:0;}.toggle-wrapper.collapsed{height:25px;transition:height .2s;margin-bottom:.6em;}.collapse-toggle>.inner{display:inline-block;width:1.2ch;text-align:center;}.collapse-toggle.hidden-default{position:relative;margin-left:20px;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.toggle-wrapper>.collapse-toggle{left:0;}.variant+.toggle-wrapper+.docblock>p{margin-top:5px;}.sub-variant,.sub-variant>h3{margin-top:1px !important;}#main>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.enum>.toggle-wrapper+.docblock,.struct>.toggle-wrapper+.docblock{margin-left:30px;margin-bottom:20px;margin-top:5px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}.enum>.collapsed,.struct>.collapsed{margin-bottom:25px;}#main>.variant,#main>.structfield{display:block;}.attributes{display:block;margin-top:0px !important;margin-right:0px;margin-bottom:0px !important;margin-left:30px;}.toggle-attributes.collapsed{margin-bottom:0;}.impl-items>.toggle-attributes{margin-left:20px;}.impl-items .attributes{font-weight:500;}:target>code{opacity:1;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}h4>.notable-traits{position:absolute;left:-44px;top:2px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,.help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}.help-button{right:30px;font-family:"Fira Sans",sans-serif;text-align:center;font-size:17px;}#theme-picker,#settings-menu,.help-button{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}@media (min-width:701px){.information:first-child>.tooltip{margin-top:16px;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;left:0;top:45px;bottom:0;overflow-y:auto;border-right:1px solid;display:none;}.sidebar>.block.version{border-bottom:none;margin-top:12px;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main{margin-top:45px;padding:0;}.content .in-band{width:100%;}.content h4>.out-of-band{position:inherit;}.toggle-wrapper>.collapse-toggle{left:0px;}.toggle-wrapper{height:1.5em;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{display:flex;}.anchor{display:none !important;}h1.fqn{overflow:initial;}.theme-picker{left:10px;top:54px;z-index:1;}h4>.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar{width:calc(100% + 30px);}.show-it{display:block;width:246px;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}.collapse-toggle{left:-20px;}.impl>.collapse-toggle{left:-10px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}.help-button{display:none;}.search-container>div{width:calc(100% - 32px);}}@media print{nav.sub,.content .out-of-band,.collapse-toggle{display:none;}}@media (max-width:416px){#titles,#titles>button{height:73px;}#main{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}}h3.notable{margin:0;margin-bottom:13px;font-size:19px;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}.type-decl>pre>.toggle-wrapper.toggle-attributes.top-attr{margin-left:0 !important;}.type-decl>pre>.docblock.attributes.top-attr{margin-left:1.8em !important;}.type-decl>pre>.toggle-attributes{margin-left:2.2em;}.type-decl>pre>.docblock.attributes{margin-left:4em;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/search-index.js b/api-docs/m_captcha/0.1.2/search-index.js new file mode 100644 index 0000000..e4c6b46 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/search-index.js @@ -0,0 +1,6 @@ +var searchIndex = JSON.parse('{\ +"cfg_if":{"doc":"A macro for defining #[cfg] if-else statements.","i":[[14,"cfg_if","cfg_if","The main macro provided by this crate. See crate …",null,null]],"p":[]},\ +"m_captcha":{"doc":"mCaptcha is a proof of work based Denaial-of-Service …","i":[[0,"defense","m_captcha","Defense datatypes",null,null],[3,"Level","m_captcha::defense","Level struct that describes threshold-difficulty factor …",null,null],[12,"visitor_threshold","","",0,null],[12,"difficulty_factor","","",0,null],[3,"LevelBuilder","","Bulder struct for [Level] to describe …",null,null],[11,"visitor_threshold","","set visitor count for level",1,[[]]],[11,"difficulty_factor","","set difficulty factor for level. difficulty_factor can\'t …",1,[[],["captcharesult",6]]],[11,"build","","build Level struct",1,[[],[["captcharesult",6],["level",3]]]],[3,"Defense","","struct describes all the different [Level]s at which an …",null,null],[3,"DefenseBuilder","","Builder struct for [Defense]",null,null],[11,"add_level","","add a level to [Defense]",2,[[["level",3]],["captcharesult",6]]],[11,"build","","Build [Defense]",2,[[],[["defense",3],["captcharesult",6]]]],[11,"get_difficulty","","! Difficulty is calculated as: ! …",3,[[]]],[11,"tighten_up","","tighten up defense. Increases defense level by a factor …",3,[[]]],[11,"loosen_up","","Loosen up defense. Decreases defense level by a factor of …",3,[[]]],[11,"max_defense","","Set defense to maximum level",3,[[]]],[11,"min_defense","","Set defense to minimum level",3,[[]]],[11,"visitor_threshold","","Get current level\'s visitor threshold",3,[[]]],[0,"errors","m_captcha","Errors and Result module",null,null],[4,"CaptchaError","m_captcha::errors","Error datatype",null,null],[13,"LevelEmpty","","When configuring m_captcha, [DefenseBuilder][…",4,null],[13,"DifficultyFactorZero","","Visitor count must be a whole number(zero and above). …",4,null],[13,"CaptchaDurationZero","","captcha cooldown duration must be greater than 0",4,null],[13,"SetDifficultyFactor","","Difficulty factor must be set",4,null],[13,"SetVisitorThreshold","","Visitor threshold must be set",4,null],[13,"DuplicateVisitorCount","","Visitor count must be Unique",4,null],[13,"DecreaseingDifficultyFactor","","Difficulty factor should increase with level",4,null],[13,"MailboxError","","Difficulty factor should increase with level",4,null],[13,"InsuffiencientDifficulty","","Happens when submitted work doesn\'t satisfy the required …",4,null],[13,"StringNotFound","","Happens when submitted work is computed over string that …",4,null],[13,"PleaseSetValue","","Used in builder structs when a value is not set",4,null],[6,"CaptchaResult","","[Result] datatype for m_captcha",null,null],[0,"master","m_captcha","[Master] actor module that manages [MCaptcha] actors",null,null],[3,"Master","m_captcha::master","This Actor manages the [MCaptcha] actors. A service can …",null,null],[11,"add_site","","add [MCaptcha] actor to [Master]",5,[[["addsite",3]]]],[11,"new","","create new master accepts a u64 to configure garbage …",5,[[]]],[11,"get_site","","get [MCaptcha] actor from [Master]",5,[[],[["addr",3],["option",4]]]],[11,"rm_site","","remvoes [MCaptcha] actor from [Master]",5,[[]]],[3,"GetSite","","Message to get an [MCaptcha] actor from master",null,null],[12,"0","","",6,null],[3,"CleanUp","","Message to clean up master of [MCaptcha] actors with zero …",null,null],[3,"RemoveSite","","Message to delete [MCaptcha] actor",null,null],[12,"0","","",7,null],[3,"AddSite","","Message to add an [MCaptcha] actor to [Master]",null,null],[12,"id","","",8,null],[12,"addr","","",8,null],[3,"AddSiteBuilder","","Builder for AddSite.",null,null],[11,"id","","",9,[[["string",3]]]],[11,"addr","","",9,[[["addr",3],["mcaptcha",3]]]],[11,"build","","Builds a new AddSite.",9,[[],[["addsite",3],["string",3],["result",4]]]],[0,"mcaptcha","m_captcha","MCaptcha actor module that manages defense levels",null,null],[3,"MCaptchaBuilder","m_captcha::mcaptcha","Builder for [MCaptcha]",null,null],[3,"MCaptcha","","This struct represents the mCaptcha state and is used to …",null,null],[11,"defense","","set defense",10,[[["defense",3]]]],[11,"duration","","set duration",10,[[]]],[11,"build","","Builds new [MCaptcha]",10,[[],[["captcharesult",6],["mcaptcha",3]]]],[11,"add_visitor","","increments the visitor count by one",11,[[]]],[11,"decrement_visitor","","decrements the visitor count by one",11,[[]]],[11,"get_difficulty","","get current difficulty factor",11,[[]]],[11,"get_duration","","get [MCaptcha]\'s lifetime",11,[[]]],[3,"AddVisitor","","Message to increment the visitor count returns difficulty …",null,null],[3,"AddVisitorResult","","Struct representing the return datatime of [AddVisitor] …",null,null],[12,"duration","","",12,null],[12,"difficulty_factor","","",12,null],[3,"GetCurrentVisitorCount","","Message to get the visitor count",null,null],[3,"Stop","","Message to stop [MCaptcha]",null,null],[0,"cache","m_captcha","message datatypes to interact with [MCaptcha] actor Cache …",null,null],[0,"hashcache","m_captcha::cache","In-memory cache implementation that uses [HashMap]",null,null],[3,"HashCache","m_captcha::cache::hashcache","cache datastructure implementing [Save]",null,null],[0,"messages","m_captcha::cache","Messages that can be sent to cache data structures …",null,null],[3,"Cache","m_captcha::cache::messages","Message to cache PoW difficulty factor and string",null,null],[12,"string","","",13,null],[12,"difficulty_factor","","",13,null],[12,"duration","","",13,null],[3,"CacheBuilder","","Builder for Cache.",null,null],[11,"string","","",14,[[["string",3]]]],[11,"difficulty_factor","","",14,[[]]],[11,"duration","","",14,[[]]],[11,"build","","Builds a new Cache.",14,[[],[["string",3],["result",4],["cache",3]]]],[11,"new","","",13,[[["powconfig",3],["addvisitorresult",3]]]],[3,"Retrive","","Message to retrive the the difficulty factor for the …",null,null],[12,"0","","",15,null],[3,"DeleteString","","Message to delete cached PoW difficulty factor and string …",null,null],[12,"0","","",16,null],[8,"Save","m_captcha::cache","Describes actor handler trait impls that are required by …",null,null],[0,"pow","m_captcha","PoW datatypes used in client-server interaction",null,null],[3,"ConfigBuilder","m_captcha::pow","Builder for Config.",null,null],[3,"PoWConfig","","PoW requirement datatype that is be sent to clients for …",null,null],[12,"string","","",17,null],[12,"difficulty_factor","","",17,null],[11,"new","","create new instance of [PoWConfig]",17,[[]]],[3,"Work","","PoW datatype that clients send to server",null,null],[12,"string","","",18,null],[12,"result","","",18,null],[12,"nonce","","",18,null],[0,"system","m_captcha","module describing mCaptcha system",null,null],[3,"System","m_captcha::system","struct describing various bits of data required for an …",null,null],[12,"master","","",19,null],[3,"SystemBuilder","","Builder for System.",null,null],[11,"master","","",20,[[["addr",3],["master",3]]]],[11,"cache","","",20,[[["addr",3]]]],[11,"pow","","",20,[[["config",3]]]],[11,"build","","Builds a new System.",20,[[],[["string",3],["result",4],["system",3]]]],[11,"get_pow","","utility function to get difficulty factor of site id and …",19,[[["string",3]]]],[11,"verify_pow","","utility function to verify [Work]",19,[[["work",3]]]],[11,"from","m_captcha::defense","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"vzip","","",0,[[]]],[11,"from","","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_owned","","",1,[[]]],[11,"clone_into","","",1,[[]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"vzip","","",1,[[]]],[11,"from","","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"vzip","","",3,[[]]],[11,"from","","",2,[[]]],[11,"into","","",2,[[]]],[11,"to_owned","","",2,[[]]],[11,"clone_into","","",2,[[]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"vzip","","",2,[[]]],[11,"from","m_captcha::errors","",4,[[]]],[11,"into","","",4,[[]]],[11,"to_owned","","",4,[[]]],[11,"clone_into","","",4,[[]]],[11,"to_string","","",4,[[],["string",3]]],[11,"borrow","","",4,[[]]],[11,"borrow_mut","","",4,[[]]],[11,"try_from","","",4,[[],["result",4]]],[11,"try_into","","",4,[[],["result",4]]],[11,"type_id","","",4,[[],["typeid",3]]],[11,"vzip","","",4,[[]]],[11,"from","m_captcha::master","",5,[[]]],[11,"into","","",5,[[]]],[11,"to_owned","","",5,[[]]],[11,"clone_into","","",5,[[]]],[11,"borrow","","",5,[[]]],[11,"borrow_mut","","",5,[[]]],[11,"try_from","","",5,[[],["result",4]]],[11,"try_into","","",5,[[],["result",4]]],[11,"type_id","","",5,[[],["typeid",3]]],[11,"vzip","","",5,[[]]],[11,"from","","",6,[[]]],[11,"into","","",6,[[]]],[11,"borrow","","",6,[[]]],[11,"borrow_mut","","",6,[[]]],[11,"try_from","","",6,[[],["result",4]]],[11,"try_into","","",6,[[],["result",4]]],[11,"type_id","","",6,[[],["typeid",3]]],[11,"vzip","","",6,[[]]],[11,"from","","",21,[[]]],[11,"into","","",21,[[]]],[11,"borrow","","",21,[[]]],[11,"borrow_mut","","",21,[[]]],[11,"try_from","","",21,[[],["result",4]]],[11,"try_into","","",21,[[],["result",4]]],[11,"type_id","","",21,[[],["typeid",3]]],[11,"vzip","","",21,[[]]],[11,"from","","",7,[[]]],[11,"into","","",7,[[]]],[11,"borrow","","",7,[[]]],[11,"borrow_mut","","",7,[[]]],[11,"try_from","","",7,[[],["result",4]]],[11,"try_into","","",7,[[],["result",4]]],[11,"type_id","","",7,[[],["typeid",3]]],[11,"vzip","","",7,[[]]],[11,"from","","",8,[[]]],[11,"into","","",8,[[]]],[11,"borrow","","",8,[[]]],[11,"borrow_mut","","",8,[[]]],[11,"try_from","","",8,[[],["result",4]]],[11,"try_into","","",8,[[],["result",4]]],[11,"type_id","","",8,[[],["typeid",3]]],[11,"vzip","","",8,[[]]],[11,"from","","",9,[[]]],[11,"into","","",9,[[]]],[11,"to_owned","","",9,[[]]],[11,"clone_into","","",9,[[]]],[11,"borrow","","",9,[[]]],[11,"borrow_mut","","",9,[[]]],[11,"try_from","","",9,[[],["result",4]]],[11,"try_into","","",9,[[],["result",4]]],[11,"type_id","","",9,[[],["typeid",3]]],[11,"vzip","","",9,[[]]],[11,"from","m_captcha::mcaptcha","",10,[[]]],[11,"into","","",10,[[]]],[11,"to_owned","","",10,[[]]],[11,"clone_into","","",10,[[]]],[11,"borrow","","",10,[[]]],[11,"borrow_mut","","",10,[[]]],[11,"try_from","","",10,[[],["result",4]]],[11,"try_into","","",10,[[],["result",4]]],[11,"type_id","","",10,[[],["typeid",3]]],[11,"vzip","","",10,[[]]],[11,"from","","",11,[[]]],[11,"into","","",11,[[]]],[11,"to_owned","","",11,[[]]],[11,"clone_into","","",11,[[]]],[11,"borrow","","",11,[[]]],[11,"borrow_mut","","",11,[[]]],[11,"try_from","","",11,[[],["result",4]]],[11,"try_into","","",11,[[],["result",4]]],[11,"type_id","","",11,[[],["typeid",3]]],[11,"vzip","","",11,[[]]],[11,"from","","",22,[[]]],[11,"into","","",22,[[]]],[11,"borrow","","",22,[[]]],[11,"borrow_mut","","",22,[[]]],[11,"try_from","","",22,[[],["result",4]]],[11,"try_into","","",22,[[],["result",4]]],[11,"type_id","","",22,[[],["typeid",3]]],[11,"vzip","","",22,[[]]],[11,"from","","",12,[[]]],[11,"into","","",12,[[]]],[11,"to_owned","","",12,[[]]],[11,"clone_into","","",12,[[]]],[11,"borrow","","",12,[[]]],[11,"borrow_mut","","",12,[[]]],[11,"try_from","","",12,[[],["result",4]]],[11,"try_into","","",12,[[],["result",4]]],[11,"type_id","","",12,[[],["typeid",3]]],[11,"vzip","","",12,[[]]],[11,"from","","",23,[[]]],[11,"into","","",23,[[]]],[11,"borrow","","",23,[[]]],[11,"borrow_mut","","",23,[[]]],[11,"try_from","","",23,[[],["result",4]]],[11,"try_into","","",23,[[],["result",4]]],[11,"type_id","","",23,[[],["typeid",3]]],[11,"vzip","","",23,[[]]],[11,"from","","",24,[[]]],[11,"into","","",24,[[]]],[11,"borrow","","",24,[[]]],[11,"borrow_mut","","",24,[[]]],[11,"try_from","","",24,[[],["result",4]]],[11,"try_into","","",24,[[],["result",4]]],[11,"type_id","","",24,[[],["typeid",3]]],[11,"vzip","","",24,[[]]],[11,"from","m_captcha::cache::hashcache","",25,[[]]],[11,"into","","",25,[[]]],[11,"to_owned","","",25,[[]]],[11,"clone_into","","",25,[[]]],[11,"borrow","","",25,[[]]],[11,"borrow_mut","","",25,[[]]],[11,"try_from","","",25,[[],["result",4]]],[11,"try_into","","",25,[[],["result",4]]],[11,"type_id","","",25,[[],["typeid",3]]],[11,"vzip","","",25,[[]]],[11,"from","m_captcha::cache::messages","",13,[[]]],[11,"into","","",13,[[]]],[11,"borrow","","",13,[[]]],[11,"borrow_mut","","",13,[[]]],[11,"try_from","","",13,[[],["result",4]]],[11,"try_into","","",13,[[],["result",4]]],[11,"type_id","","",13,[[],["typeid",3]]],[11,"vzip","","",13,[[]]],[11,"from","","",14,[[]]],[11,"into","","",14,[[]]],[11,"to_owned","","",14,[[]]],[11,"clone_into","","",14,[[]]],[11,"borrow","","",14,[[]]],[11,"borrow_mut","","",14,[[]]],[11,"try_from","","",14,[[],["result",4]]],[11,"try_into","","",14,[[],["result",4]]],[11,"type_id","","",14,[[],["typeid",3]]],[11,"vzip","","",14,[[]]],[11,"from","","",15,[[]]],[11,"into","","",15,[[]]],[11,"borrow","","",15,[[]]],[11,"borrow_mut","","",15,[[]]],[11,"try_from","","",15,[[],["result",4]]],[11,"try_into","","",15,[[],["result",4]]],[11,"type_id","","",15,[[],["typeid",3]]],[11,"vzip","","",15,[[]]],[11,"from","","",16,[[]]],[11,"into","","",16,[[]]],[11,"borrow","","",16,[[]]],[11,"borrow_mut","","",16,[[]]],[11,"try_from","","",16,[[],["result",4]]],[11,"try_into","","",16,[[],["result",4]]],[11,"type_id","","",16,[[],["typeid",3]]],[11,"vzip","","",16,[[]]],[11,"from","m_captcha::pow","",26,[[]]],[11,"into","","",26,[[]]],[11,"to_owned","","",26,[[]]],[11,"clone_into","","",26,[[]]],[11,"borrow","","",26,[[]]],[11,"borrow_mut","","",26,[[]]],[11,"try_from","","",26,[[],["result",4]]],[11,"try_into","","",26,[[],["result",4]]],[11,"type_id","","",26,[[],["typeid",3]]],[11,"vzip","","",26,[[]]],[11,"from","","",17,[[]]],[11,"into","","",17,[[]]],[11,"to_owned","","",17,[[]]],[11,"clone_into","","",17,[[]]],[11,"borrow","","",17,[[]]],[11,"borrow_mut","","",17,[[]]],[11,"try_from","","",17,[[],["result",4]]],[11,"try_into","","",17,[[],["result",4]]],[11,"type_id","","",17,[[],["typeid",3]]],[11,"vzip","","",17,[[]]],[11,"from","","",18,[[]]],[11,"into","","",18,[[]]],[11,"to_owned","","",18,[[]]],[11,"clone_into","","",18,[[]]],[11,"borrow","","",18,[[]]],[11,"borrow_mut","","",18,[[]]],[11,"try_from","","",18,[[],["result",4]]],[11,"try_into","","",18,[[],["result",4]]],[11,"type_id","","",18,[[],["typeid",3]]],[11,"vzip","","",18,[[]]],[11,"from","m_captcha::system","",19,[[]]],[11,"into","","",19,[[]]],[11,"to_owned","","",19,[[]]],[11,"clone_into","","",19,[[]]],[11,"borrow","","",19,[[]]],[11,"borrow_mut","","",19,[[]]],[11,"try_from","","",19,[[],["result",4]]],[11,"try_into","","",19,[[],["result",4]]],[11,"type_id","","",19,[[],["typeid",3]]],[11,"vzip","","",19,[[]]],[11,"from","","",20,[[]]],[11,"into","","",20,[[]]],[11,"to_owned","","",20,[[]]],[11,"clone_into","","",20,[[]]],[11,"borrow","","",20,[[]]],[11,"borrow_mut","","",20,[[]]],[11,"try_from","","",20,[[],["result",4]]],[11,"try_into","","",20,[[],["result",4]]],[11,"type_id","","",20,[[],["typeid",3]]],[11,"vzip","","",20,[[]]],[11,"default","m_captcha::pow","",26,[[],["configbuilder",3]]],[11,"clone","","",26,[[],["configbuilder",3]]],[11,"clone","m_captcha::defense","",0,[[],["level",3]]],[11,"clone","","",1,[[],["levelbuilder",3]]],[11,"clone","","",3,[[],["defense",3]]],[11,"clone","","",2,[[],["defensebuilder",3]]],[11,"clone","m_captcha::errors","",4,[[],["captchaerror",4]]],[11,"clone","m_captcha::master","",5,[[],["master",3]]],[11,"clone","","",9,[[],["addsitebuilder",3]]],[11,"clone","m_captcha::mcaptcha","",10,[[],["mcaptchabuilder",3]]],[11,"clone","","",11,[[],["mcaptcha",3]]],[11,"clone","","",12,[[],["addvisitorresult",3]]],[11,"clone","m_captcha::cache::hashcache","",25,[[],["hashcache",3]]],[11,"clone","m_captcha::cache::messages","",14,[[],["cachebuilder",3]]],[11,"clone","m_captcha::pow","",17,[[],["powconfig",3]]],[11,"clone","","",18,[[],["work",3]]],[11,"clone","m_captcha::system","",19,[[],["system",3]]],[11,"clone","","",20,[[],["systembuilder",3]]],[11,"default","m_captcha::defense","",1,[[]]],[11,"default","","",2,[[]]],[11,"default","m_captcha::master","",9,[[],["addsitebuilder",3]]],[11,"default","m_captcha::mcaptcha","",10,[[]]],[11,"default","m_captcha::cache::hashcache","",25,[[],["hashcache",3]]],[11,"default","m_captcha::cache::messages","",14,[[],["cachebuilder",3]]],[11,"default","m_captcha::system","",20,[[],["systembuilder",3]]],[11,"eq","m_captcha::defense","",0,[[["level",3]]]],[11,"ne","","",0,[[["level",3]]]],[11,"eq","","",1,[[["levelbuilder",3]]]],[11,"ne","","",1,[[["levelbuilder",3]]]],[11,"eq","","",3,[[["defense",3]]]],[11,"ne","","",3,[[["defense",3]]]],[11,"eq","","",2,[[["defensebuilder",3]]]],[11,"ne","","",2,[[["defensebuilder",3]]]],[11,"eq","m_captcha::errors","",4,[[["captchaerror",4]]]],[11,"ne","","",4,[[["captchaerror",4]]]],[11,"fmt","m_captcha::defense","",0,[[["formatter",3]],["result",6]]],[11,"fmt","","",1,[[["formatter",3]],["result",6]]],[11,"fmt","","",3,[[["formatter",3]],["result",6]]],[11,"fmt","","",2,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::errors","",4,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::mcaptcha","",10,[[["formatter",3]],["result",6]]],[11,"fmt","","",11,[[["formatter",3]],["result",6]]],[11,"fmt","","",12,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::pow","",17,[[["formatter",3]],["result",6]]],[11,"fmt","","",18,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::errors","",4,[[["formatter",3]],["result",6]]],[11,"serialize","m_captcha::defense","",0,[[],["result",4]]],[11,"serialize","","",3,[[],["result",4]]],[11,"serialize","m_captcha::mcaptcha","",10,[[],["result",4]]],[11,"serialize","","",11,[[],["result",4]]],[11,"serialize","","",12,[[],["result",4]]],[11,"serialize","m_captcha::cache::messages","",13,[[],["result",4]]],[11,"serialize","m_captcha::pow","",17,[[],["result",4]]],[11,"serialize","","",18,[[],["result",4]]],[11,"deserialize","m_captcha::defense","",0,[[],["result",4]]],[11,"deserialize","","",3,[[],["result",4]]],[11,"deserialize","m_captcha::mcaptcha","",10,[[],["result",4]]],[11,"deserialize","","",11,[[],["result",4]]],[11,"deserialize","","",12,[[],["result",4]]],[11,"deserialize","m_captcha::cache::messages","",13,[[],["result",4]]],[11,"deserialize","m_captcha::pow","",17,[[],["result",4]]],[11,"deserialize","","",18,[[],["result",4]]],[11,"started","m_captcha::master","",5,[[]]],[11,"handle","","",5,[[["getsite",3]]]],[11,"handle","","",5,[[["cleanup",3]]]],[11,"handle","","",5,[[["removesite",3]]]],[11,"handle","","",5,[[["addsite",3]]]],[11,"handle","m_captcha::mcaptcha","",11,[[["addvisitor",3]]]],[11,"handle","","",11,[[["getcurrentvisitorcount",3]]]],[11,"handle","","",11,[[["stop",3]]]],[11,"handle","m_captcha::cache::hashcache","",25,[[["cache",3]]]],[11,"handle","","",25,[[["deletestring",3]]]],[11,"handle","","",25,[[["retrive",3]]]],[11,"salt","m_captcha::pow","",26,[[["string",3]],["configbuilder",3]]],[11,"build","","Builds a new Config.",26,[[],[["result",4],["string",3],["config",3]]]]],"p":[[3,"Level"],[3,"LevelBuilder"],[3,"DefenseBuilder"],[3,"Defense"],[4,"CaptchaError"],[3,"Master"],[3,"GetSite"],[3,"RemoveSite"],[3,"AddSite"],[3,"AddSiteBuilder"],[3,"MCaptchaBuilder"],[3,"MCaptcha"],[3,"AddVisitorResult"],[3,"Cache"],[3,"CacheBuilder"],[3,"Retrive"],[3,"DeleteString"],[3,"PoWConfig"],[3,"Work"],[3,"System"],[3,"SystemBuilder"],[3,"CleanUp"],[3,"AddVisitor"],[3,"GetCurrentVisitorCount"],[3,"Stop"],[3,"HashCache"],[3,"ConfigBuilder"]]},\ +"unicode_xid":{"doc":"Determine if a char is a valid identifier for a parser …","i":[[17,"UNICODE_VERSION","unicode_xid","The version of Unicode that this version of unicode-xid …",null,null],[8,"UnicodeXID","","Methods for determining if a character is a valid …",null,null],[10,"is_xid_start","","Returns whether the specified character satisfies the …",0,[[]]],[10,"is_xid_continue","","Returns whether the specified char satisfies the …",0,[[]]]],"p":[[8,"UnicodeXID"]]}\ +}'); +addSearchOptions(searchIndex);initSearch(searchIndex); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/settings.css b/api-docs/m_captcha/0.1.2/settings.css new file mode 100644 index 0000000..6709865 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/settings.css @@ -0,0 +1 @@ +.setting-line{padding:5px;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.select-wrapper{float:right;position:relative;height:27px;min-width:25%;}.select-wrapper select{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:2px solid #ccc;padding-right:28px;width:100%;}.select-wrapper img{pointer-events:none;position:absolute;right:0;bottom:0;background:#ccc;height:100%;width:28px;padding:0px 4px;}.select-wrapper select option{color:initial;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/settings.html b/api-docs/m_captcha/0.1.2/settings.html new file mode 100644 index 0000000..1762d2c --- /dev/null +++ b/api-docs/m_captcha/0.1.2/settings.html @@ -0,0 +1,6 @@ +Rustdoc settings + +

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
+
Auto-hide item declarations
Auto-hide structs declaration
Auto-hide enums declaration
Auto-hide unions declaration
Auto-hide traits declaration
Auto-hide macros declaration
+
Auto-hide item attributes.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Auto-hide implementors of a trait
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/settings.js b/api-docs/m_captcha/0.1.2/settings.js new file mode 100644 index 0000000..b4d6fdc --- /dev/null +++ b/api-docs/m_captcha/0.1.2/settings.js @@ -0,0 +1 @@ +(function(){function changeSetting(settingName,value){updateLocalStorage("rustdoc-"+settingName,value);switch(settingName){case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function setEvents(){onEachLazy(document.getElementsByClassName("slider"),function(elem){var toggle=elem.previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(document.getElementsByClassName("select-wrapper"),function(elem){var select=elem.getElementsByTagName("select")[0];var settingId=select.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}})}window.addEventListener("DOMContentLoaded",setEvents)})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/source-files.js b/api-docs/m_captcha/0.1.2/source-files.js new file mode 100644 index 0000000..cebd474 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/source-files.js @@ -0,0 +1,5 @@ +var N = null;var sourcesIndex = {}; +sourcesIndex["cfg_if"] = {"name":"","files":["lib.rs"]}; +sourcesIndex["m_captcha"] = {"name":"","dirs":[{"name":"cache","files":["hashcache.rs","mod.rs"]}],"files":["defense.rs","errors.rs","lib.rs","master.rs","mcaptcha.rs","pow.rs","system.rs","utils.rs"]}; +sourcesIndex["unicode_xid"] = {"name":"","files":["lib.rs","tables.rs"]}; +createSourceSidebar(); diff --git a/api-docs/m_captcha/0.1.2/source-script.js b/api-docs/m_captcha/0.1.2/source-script.js new file mode 100644 index 0000000..de663ca --- /dev/null +++ b/api-docs/m_captcha/0.1.2/source-script.js @@ -0,0 +1 @@ +function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0;i"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(window.rootPath.endsWith("/")===false){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/src/cfg_if/lib.rs.html b/api-docs/m_captcha/0.1.2/src/cfg_if/lib.rs.html new file mode 100644 index 0000000..b28fa6b --- /dev/null +++ b/api-docs/m_captcha/0.1.2/src/cfg_if/lib.rs.html @@ -0,0 +1,358 @@ +lib.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+
+//! A macro for defining `#[cfg]` if-else statements.
+//!
+//! The macro provided by this crate, `cfg_if`, is similar to the `if/elif` C
+//! preprocessor macro by allowing definition of a cascade of `#[cfg]` cases,
+//! emitting the implementation which matches first.
+//!
+//! This allows you to conveniently provide a long list `#[cfg]`'d blocks of code
+//! without having to rewrite each clause multiple times.
+//!
+//! # Example
+//!
+//! ```
+//! cfg_if::cfg_if! {
+//!     if #[cfg(unix)] {
+//!         fn foo() { /* unix specific functionality */ }
+//!     } else if #[cfg(target_pointer_width = "32")] {
+//!         fn foo() { /* non-unix, 32-bit functionality */ }
+//!     } else {
+//!         fn foo() { /* fallback implementation */ }
+//!     }
+//! }
+//!
+//! # fn main() {}
+//! ```
+
+#![no_std]
+#![doc(html_root_url = "https://docs.rs/cfg-if")]
+#![deny(missing_docs)]
+#![cfg_attr(test, deny(warnings))]
+
+/// The main macro provided by this crate. See crate documentation for more
+/// information.
+#[macro_export]
+macro_rules! cfg_if {
+    // match if/else chains with a final `else`
+    ($(
+        if #[cfg($meta:meta)] { $($tokens:tt)* }
+    ) else * else {
+        $($tokens2:tt)*
+    }) => {
+        $crate::cfg_if! {
+            @__items
+            () ;
+            $( ( ($meta) ($($tokens)*) ), )*
+            ( () ($($tokens2)*) ),
+        }
+    };
+
+    // match if/else chains lacking a final `else`
+    (
+        if #[cfg($i_met:meta)] { $($i_tokens:tt)* }
+        $(
+            else if #[cfg($e_met:meta)] { $($e_tokens:tt)* }
+        )*
+    ) => {
+        $crate::cfg_if! {
+            @__items
+            () ;
+            ( ($i_met) ($($i_tokens)*) ),
+            $( ( ($e_met) ($($e_tokens)*) ), )*
+            ( () () ),
+        }
+    };
+
+    // Internal and recursive macro to emit all the items
+    //
+    // Collects all the negated cfgs in a list at the beginning and after the
+    // semicolon is all the remaining items
+    (@__items ($($not:meta,)*) ; ) => {};
+    (@__items ($($not:meta,)*) ; ( ($($m:meta),*) ($($tokens:tt)*) ), $($rest:tt)*) => {
+        // Emit all items within one block, applying an appropriate #[cfg]. The
+        // #[cfg] will require all `$m` matchers specified and must also negate
+        // all previous matchers.
+        #[cfg(all($($m,)* not(any($($not),*))))] $crate::cfg_if! { @__identity $($tokens)* }
+
+        // Recurse to emit all other items in `$rest`, and when we do so add all
+        // our `$m` matchers to the list of `$not` matchers as future emissions
+        // will have to negate everything we just matched as well.
+        $crate::cfg_if! { @__items ($($not,)* $($m,)*) ; $($rest)* }
+    };
+
+    // Internal macro to make __apply work out right for different match types,
+    // because of how macros matching/expand stuff.
+    (@__identity $($tokens:tt)*) => {
+        $($tokens)*
+    };
+}
+
+#[cfg(test)]
+mod tests {
+    cfg_if! {
+        if #[cfg(test)] {
+            use core::option::Option as Option2;
+            fn works1() -> Option2<u32> { Some(1) }
+        } else {
+            fn works1() -> Option<u32> { None }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(foo)] {
+            fn works2() -> bool { false }
+        } else if #[cfg(test)] {
+            fn works2() -> bool { true }
+        } else {
+            fn works2() -> bool { false }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(foo)] {
+            fn works3() -> bool { false }
+        } else {
+            fn works3() -> bool { true }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(test)] {
+            use core::option::Option as Option3;
+            fn works4() -> Option3<u32> { Some(1) }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(foo)] {
+            fn works5() -> bool { false }
+        } else if #[cfg(test)] {
+            fn works5() -> bool { true }
+        }
+    }
+
+    #[test]
+    fn it_works() {
+        assert!(works1().is_some());
+        assert!(works2());
+        assert!(works3());
+        assert!(works4().is_some());
+        assert!(works5());
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_constants)]
+    fn test_usage_within_a_function() {
+        cfg_if! {if #[cfg(debug_assertions)] {
+            // we want to put more than one thing here to make sure that they
+            // all get configured properly.
+            assert!(cfg!(debug_assertions));
+            assert_eq!(4, 2+2);
+        } else {
+            assert!(works1().is_some());
+            assert_eq!(10, 5+5);
+        }}
+    }
+
+    trait Trait {
+        fn blah(&self);
+    }
+
+    #[allow(dead_code)]
+    struct Struct;
+
+    impl Trait for Struct {
+        cfg_if! {
+            if #[cfg(feature = "blah")] {
+                fn blah(&self) {
+                    unimplemented!();
+                }
+            } else {
+                fn blah(&self) {
+                    unimplemented!();
+                }
+            }
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/src/m_captcha/cache/hashcache.rs.html b/api-docs/m_captcha/0.1.2/src/m_captcha/cache/hashcache.rs.html new file mode 100644 index 0000000..e3fd0a7 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/src/m_captcha/cache/hashcache.rs.html @@ -0,0 +1,276 @@ +hashcache.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! In-memory cache implementation that uses [HashMap]
+use std::collections::HashMap;
+
+use actix::prelude::*;
+
+use super::messages::*;
+use super::Save;
+use crate::errors::*;
+
+#[derive(Clone, Default)]
+/// cache datastructure implementing [Save]
+pub struct HashCache(HashMap<String, u32>);
+
+impl HashCache {
+    // save [PoWConfig] to cache
+    fn save(&mut self, config: Cache) -> CaptchaResult<()> {
+        self.0.insert(config.string, config.difficulty_factor);
+        Ok(())
+    }
+
+    // retrive [PoWConfig] from cache. Deletes config post retrival
+    fn retrive(&mut self, string: String) -> CaptchaResult<Option<u32>> {
+        if let Some(difficulty_factor) = self.remove(&string) {
+            Ok(Some(difficulty_factor.to_owned()))
+        } else {
+            Ok(None)
+        }
+    }
+
+    // delete [PoWConfig] from cache
+    fn remove(&mut self, string: &str) -> Option<u32> {
+        self.0.remove(string)
+    }
+}
+
+impl Save for HashCache {}
+
+impl Actor for HashCache {
+    type Context = Context<Self>;
+}
+
+/// cache a PoWConfig
+impl Handler<Cache> for HashCache {
+    type Result = MessageResult<Cache>;
+    fn handle(&mut self, msg: Cache, ctx: &mut Self::Context) -> Self::Result {
+        use actix::clock::sleep;
+        use std::time::Duration;
+
+        let addr = ctx.address();
+        let del_msg = DeleteString(msg.string.clone());
+
+        let duration: Duration = Duration::new(msg.duration.clone(), 0);
+        let wait_for = async move {
+            sleep(duration).await;
+            addr.send(del_msg).await.unwrap().unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(wait_for);
+
+        MessageResult(self.save(msg))
+    }
+}
+
+/// Delte a PoWConfig
+impl Handler<DeleteString> for HashCache {
+    type Result = MessageResult<DeleteString>;
+    fn handle(&mut self, msg: DeleteString, _ctx: &mut Self::Context) -> Self::Result {
+        self.remove(&msg.0);
+        MessageResult(Ok(()))
+    }
+}
+
+/// Retrive PoW difficulty_factor for a PoW string
+impl Handler<Retrive> for HashCache {
+    type Result = MessageResult<Retrive>;
+    fn handle(&mut self, msg: Retrive, _ctx: &mut Self::Context) -> Self::Result {
+        MessageResult(self.retrive(msg.0))
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::mcaptcha::AddVisitorResult;
+    use crate::pow::PoWConfig;
+
+    async fn sleep(time: u64) {
+        use actix::clock::sleep;
+        use std::time::Duration;
+
+        let duration: Duration = Duration::new(time, 0);
+        sleep(duration).await;
+    }
+
+    #[actix_rt::test]
+    async fn hashcache_works() {
+        const DIFFICULTY_FACTOR: u32 = 54;
+        const DURATION: u64 = 5;
+        let addr = HashCache::default().start();
+        let pow: PoWConfig = PoWConfig::new(DIFFICULTY_FACTOR);
+        let visitor_result = AddVisitorResult {
+            difficulty_factor: DIFFICULTY_FACTOR,
+            duration: DURATION,
+        };
+        let string = pow.string.clone();
+        let msg = Cache::new(&pow, &visitor_result);
+
+        addr.send(msg).await.unwrap().unwrap();
+
+        let cache_difficulty_factor = addr.send(Retrive(string.clone())).await.unwrap().unwrap();
+        assert_eq!(DIFFICULTY_FACTOR, cache_difficulty_factor.unwrap());
+
+        sleep(DURATION + DURATION).await;
+
+        let expired_string = addr.send(Retrive(string)).await.unwrap().unwrap();
+        assert_eq!(None, expired_string);
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/src/m_captcha/cache/mod.rs.html b/api-docs/m_captcha/0.1.2/src/m_captcha/cache/mod.rs.html new file mode 100644 index 0000000..6ab7b24 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/src/m_captcha/cache/mod.rs.html @@ -0,0 +1,148 @@ +mod.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! Cache is used to save proofof work details and nonces to prevent replay attacks
+//! and rainbow/dictionary attacks
+pub use hashcache::HashCache;
+use messages::*;
+
+pub mod hashcache;
+
+/// Describes actor handler trait impls that are required by a cache implementation
+pub trait Save:
+    actix::Actor + actix::Handler<Retrive> + actix::Handler<Cache> + actix::Handler<DeleteString>
+{
+}
+pub mod messages {
+    //! Messages that can be sent to cache data structures implementing [Save][super::Save]
+    use actix::dev::*;
+    use derive_builder::Builder;
+    use serde::{Deserialize, Serialize};
+
+    use crate::errors::*;
+    use crate::mcaptcha::AddVisitorResult;
+    use crate::pow::PoWConfig;
+
+    /// Message to cache PoW difficulty factor and string
+    #[derive(Message, Serialize, Deserialize, Builder)]
+    #[rtype(result = "CaptchaResult<()>")]
+    pub struct Cache {
+        pub string: String,
+        pub difficulty_factor: u32,
+        pub duration: u64,
+    }
+
+    impl Cache {
+        pub fn new(p: &PoWConfig, v: &AddVisitorResult) -> Self {
+            CacheBuilder::default()
+                .string(p.string.clone())
+                .difficulty_factor(v.difficulty_factor)
+                .duration(v.duration)
+                .build()
+                .unwrap()
+        }
+    }
+
+    /// Message to retrive the the difficulty factor for the specified
+    /// string from the cache
+    #[derive(Message)]
+    #[rtype(result = "CaptchaResult<Option<u32>>")]
+    pub struct Retrive(pub String);
+
+    /// Message to delete cached PoW difficulty factor and string
+    /// when they expire
+    #[derive(Message)]
+    #[rtype(result = "CaptchaResult<()>")]
+    pub struct DeleteString(pub String);
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/src/m_captcha/defense.rs.html b/api-docs/m_captcha/0.1.2/src/m_captcha/defense.rs.html new file mode 100644 index 0000000..09541b0 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/src/m_captcha/defense.rs.html @@ -0,0 +1,840 @@ +defense.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+//! Defense datatypes
+//! ```rust
+//! use m_captcha::{LevelBuilder, DefenseBuilder};
+//! DefenseBuilder::default()
+//!        .add_level(
+//!            LevelBuilder::default()
+//!                .visitor_threshold(50)
+//!                .difficulty_factor(50)
+//!                .unwrap()
+//!                .build()
+//!                .unwrap(),
+//!        )
+//!        .unwrap()
+//!        .add_level(
+//!            LevelBuilder::default()
+//!                .visitor_threshold(500)
+//!                .difficulty_factor(500)
+//!                .unwrap()
+//!                .build()
+//!                .unwrap(),
+//!        )
+//!        .unwrap()
+//!        .build()
+//!        .unwrap();
+//! ```
+
+use crate::errors::*;
+use serde::{Deserialize, Serialize};
+
+/// Level struct that describes threshold-difficulty factor mapping
+#[derive(Debug, Deserialize, Serialize, Copy, Clone, PartialEq)]
+pub struct Level {
+    pub visitor_threshold: u32,
+    pub difficulty_factor: u32,
+}
+
+/// Bulder struct for [Level] to describe threshold-difficulty factor mapping
+#[derive(Debug, Copy, Clone, PartialEq)]
+pub struct LevelBuilder {
+    visitor_threshold: Option<u32>,
+    difficulty_factor: Option<u32>,
+}
+
+impl Default for LevelBuilder {
+    fn default() -> Self {
+        LevelBuilder {
+            visitor_threshold: None,
+            difficulty_factor: None,
+        }
+    }
+}
+
+impl LevelBuilder {
+    /// set visitor count for level
+    pub fn visitor_threshold(&mut self, visitor_threshold: u32) -> &mut Self {
+        self.visitor_threshold = Some(visitor_threshold);
+        self
+    }
+
+    /// set difficulty factor for level. difficulty_factor can't be zero because
+    /// Difficulty is calculated as:
+    /// ```no_run
+    /// let difficulty_factor = 500;
+    /// let difficulty = u128::max_value() - u128::max_value() / difficulty_factor;
+    /// ```
+    /// the higher the `difficulty_factor`, the higher the difficulty.
+    pub fn difficulty_factor(&mut self, difficulty_factor: u32) -> CaptchaResult<&mut Self> {
+        if difficulty_factor > 0 {
+            self.difficulty_factor = Some(difficulty_factor);
+            Ok(self)
+        } else {
+            Err(CaptchaError::DifficultyFactorZero)
+        }
+    }
+
+    /// build Level struct
+    pub fn build(&mut self) -> CaptchaResult<Level> {
+        if self.visitor_threshold.is_none() {
+            Err(CaptchaError::SetVisitorThreshold)
+        } else if self.difficulty_factor.is_none() {
+            Err(CaptchaError::SetDifficultyFactor)
+        } else {
+            Ok(Level {
+                difficulty_factor: self.difficulty_factor.unwrap(),
+                visitor_threshold: self.visitor_threshold.unwrap(),
+            })
+        }
+    }
+}
+
+/// struct describes all the different [Level]s at which an mCaptcha system operates
+#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
+pub struct Defense {
+    levels: Vec<Level>,
+    // index of current visitor threshold
+    current_visitor_threshold: usize,
+}
+
+/// Builder struct for [Defense]
+#[derive(Debug, Clone, PartialEq)]
+pub struct DefenseBuilder {
+    levels: Vec<Level>,
+}
+
+impl Default for DefenseBuilder {
+    fn default() -> Self {
+        DefenseBuilder { levels: vec![] }
+    }
+}
+
+impl DefenseBuilder {
+    /// add a level to [Defense]
+    pub fn add_level(&mut self, level: Level) -> CaptchaResult<&mut Self> {
+        for i in self.levels.iter() {
+            if i.visitor_threshold == level.visitor_threshold {
+                return Err(CaptchaError::DuplicateVisitorCount);
+            }
+        }
+        self.levels.push(level);
+        Ok(self)
+    }
+
+    /// Build [Defense]
+    pub fn build(&mut self) -> CaptchaResult<Defense> {
+        if !self.levels.is_empty() {
+            // sort levels to arrange in ascending order
+            self.levels.sort_by_key(|a| a.visitor_threshold);
+
+            for level in self.levels.iter() {
+                if level.difficulty_factor == 0 {
+                    return Err(CaptchaError::DifficultyFactorZero);
+                }
+            }
+
+            // as visitor count increases, difficulty_factor too should increse
+            // if it decreses, an error must be thrown
+            for i in 0..self.levels.len() - 1 {
+                if self.levels[i].difficulty_factor > self.levels[i + 1].difficulty_factor {
+                    return Err(CaptchaError::DecreaseingDifficultyFactor);
+                }
+            }
+
+            Ok(Defense {
+                levels: self.levels.to_owned(),
+                current_visitor_threshold: 0,
+            })
+        } else {
+            Err(CaptchaError::LevelEmpty)
+        }
+    }
+}
+
+impl Defense {
+    ///! Difficulty is calculated as:
+    ///! ```rust
+    ///! let difficulty = u128::max_value() - u128::max_value() / difficulty_factor;
+    ///! ```
+    ///! The higher the `difficulty_factor`, the higher the difficulty.
+
+    /// Get difficulty factor of current level of defense
+    pub fn get_difficulty(&self) -> u32 {
+        self.levels[self.current_visitor_threshold].difficulty_factor
+    }
+
+    /// tighten up defense. Increases defense level by a factor of one.
+    /// When defense is at max level, calling this method will have no effect
+    pub fn tighten_up(&mut self) {
+        if self.current_visitor_threshold != self.levels.len() - 1 {
+            self.current_visitor_threshold += 1;
+        }
+    }
+    /// Loosen up defense. Decreases defense level by a factor of one.
+    /// When defense is at the lowest level, calling this method will have no effect.
+    pub fn loosen_up(&mut self) {
+        if self.current_visitor_threshold != 0 {
+            self.current_visitor_threshold -= 1;
+        }
+    }
+
+    /// Set defense to maximum level
+    pub fn max_defense(&mut self) {
+        self.current_visitor_threshold = self.levels.len() - 1;
+    }
+
+    /// Set defense to minimum level
+    pub fn min_defense(&mut self) {
+        self.current_visitor_threshold = 0;
+    }
+
+    /// Get current level's  visitor threshold
+    pub fn visitor_threshold(&self) -> u32 {
+        self.levels[self.current_visitor_threshold].visitor_threshold
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn level_builder_works() {
+        let level = LevelBuilder::default()
+            .difficulty_factor(1)
+            .unwrap()
+            .visitor_threshold(0)
+            .build()
+            .unwrap();
+
+        assert_eq!(level.visitor_threshold, 0);
+        assert_eq!(level.difficulty_factor, 1);
+
+        assert_eq!(
+            LevelBuilder::default().difficulty_factor(0),
+            Err(CaptchaError::DifficultyFactorZero)
+        );
+
+        assert_eq!(
+            LevelBuilder::default()
+                .difficulty_factor(1)
+                .unwrap()
+                .build(),
+            Err(CaptchaError::SetVisitorThreshold)
+        );
+        assert_eq!(
+            LevelBuilder::default().visitor_threshold(10).build(),
+            Err(CaptchaError::SetDifficultyFactor)
+        );
+    }
+
+    #[test]
+    fn defense_builder_duplicate_visitor_threshold() {
+        let mut defense_builder = DefenseBuilder::default();
+        let err = defense_builder
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            );
+        assert_eq!(err, Err(CaptchaError::DuplicateVisitorCount));
+    }
+
+    #[test]
+    fn defense_builder_decreasing_difficulty_factor() {
+        let mut defense_builder = DefenseBuilder::default();
+        let err = defense_builder
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(500)
+                    .difficulty_factor(10)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .build();
+        assert_eq!(err, Err(CaptchaError::DecreaseingDifficultyFactor));
+    }
+
+    fn get_defense() -> Defense {
+        DefenseBuilder::default()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(500)
+                    .difficulty_factor(5000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(5000)
+                    .difficulty_factor(50000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50000)
+                    .difficulty_factor(500000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(500000)
+                    .difficulty_factor(5000000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .build()
+            .unwrap()
+    }
+    #[test]
+    fn defense_builder_works() {
+        let defense = get_defense();
+
+        assert_eq!(defense.levels[0].difficulty_factor, 50);
+        assert_eq!(defense.levels[1].difficulty_factor, 5000);
+        assert_eq!(defense.levels[2].difficulty_factor, 50_000);
+        assert_eq!(defense.levels[3].difficulty_factor, 500_000);
+        assert_eq!(defense.levels[4].difficulty_factor, 5_000_000);
+    }
+
+    #[test]
+    fn tighten_up_works() {
+        let mut defense = get_defense();
+
+        assert_eq!(defense.get_difficulty(), 50);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 5_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 50_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 500_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+    }
+
+    #[test]
+    fn max_defense_works() {
+        let mut defense = get_defense();
+        defense.max_defense();
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+    }
+
+    #[test]
+    fn minimum_defense_works() {
+        let mut defense = get_defense();
+        defense.min_defense();
+        assert_eq!(defense.get_difficulty(), 50);
+    }
+
+    #[test]
+    fn loosen_up_works() {
+        let mut defense = get_defense();
+        defense.max_defense();
+
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 500_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 50_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 5_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 50);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 50);
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/src/m_captcha/errors.rs.html b/api-docs/m_captcha/0.1.2/src/m_captcha/errors.rs.html new file mode 100644 index 0000000..3f924af --- /dev/null +++ b/api-docs/m_captcha/0.1.2/src/m_captcha/errors.rs.html @@ -0,0 +1,160 @@ +errors.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+//! Errors and Result module
+use derive_more::{Display, Error};
+
+/// Error datatype
+#[derive(Debug, PartialEq, Display, Clone, Error)]
+#[cfg(not(tarpaulin_include))]
+pub enum CaptchaError {
+    /// When configuring m_captcha, [DefenseBuilder][crate::defense::DefenseBuilder]
+    /// must be passed atleast one `LevelConfig` if not this error will arise
+    #[display(fmt = "LevelBuilder should have atleaset one level configured")]
+    LevelEmpty,
+
+    /// Visitor count must be a whole number(zero and above).
+    /// When configuring m_captcha, [LevelBuilder][crate::defense::LevelBuilder].
+    /// difficulty_factor must be set to greater than zero.
+    #[display(fmt = "difficulty factor must be greater than zero")]
+    DifficultyFactorZero,
+
+    /// captcha cooldown duration must be greater than 0
+    #[display(fmt = "difficulty factor must be greater than zero")]
+    CaptchaDurationZero,
+
+    /// Difficulty factor must be set
+    #[display(fmt = "Set difficulty factor")]
+    SetDifficultyFactor,
+
+    /// Visitor threshold must be set
+    #[display(fmt = "Set visitor threshold")]
+    SetVisitorThreshold,
+
+    /// Visitor count must be Unique
+    #[display(fmt = "Duplicate visitor count")]
+    DuplicateVisitorCount,
+
+    /// Difficulty factor should increase with level
+    #[display(fmt = "Difficulty factor should increase with level")]
+    DecreaseingDifficultyFactor,
+
+    /// Difficulty factor should increase with level
+    #[display(fmt = "Actor mailbox error")]
+    MailboxError,
+
+    /// Happens when submitted work doesn't satisfy the required
+    /// difficulty factor
+    #[display(fmt = "Insuffiencient Difficulty")]
+    InsuffiencientDifficulty,
+
+    /// Happens when submitted work is computed over string that
+    /// isn't in cache
+    #[display(fmt = "String now found")]
+    StringNotFound,
+
+    /// Used in builder structs when a value is not set
+    #[display(fmt = "Please set value: {}", _0)]
+    PleaseSetValue(#[error(not(source))] String),
+}
+
+/// [Result] datatype for m_captcha
+pub type CaptchaResult<V> = std::result::Result<V, CaptchaError>;
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/src/m_captcha/lib.rs.html b/api-docs/m_captcha/0.1.2/src/m_captcha/lib.rs.html new file mode 100644 index 0000000..1f6dff4 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/src/m_captcha/lib.rs.html @@ -0,0 +1,366 @@ +lib.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! mCaptcha is a proof of work based Denaial-of-Service attack protection system.
+//! This is is a server library that you can embed in your services to protect your
+//! servers.
+//!
+//! A commercial managed solution is in the works but I'd much rather prefer
+//! folks host their own instances as it will make the more decentralized and free.
+//!
+//! In mCaptcha, defense is adjusted in discrete levels that depend on the
+//! ammount of traffic that a service is experiencing. So users of this library are
+//! requested to benchmark their target machines before configuring their mCaptcha
+//! component.
+//!
+//! ## Terminology:
+//! - Difficulty(Factor): Minimum ammount of work that a client must do to make a valid
+//! request.
+//! - [Defense]: A datatype that various visitor-difficulty mappigns
+//! - Visitor: Smallest unit of traffic, usually a single request. The more you have, the busier
+//! your service is. Determines mCaptcha defense defense
+//! - Visitor threshold: The threshold at which [MCaptcha] will adjust defense defense
+//! - [Cache][crate::cache] : A datatype that implements [Save][crate::cache::Save]. Used to store
+//! PoW requirements to defend against replay attacks and dictionary attacks.
+//! - [Master][crate::master::Master]: A datatype that manages
+//! [MCaptcha][crate::mcaptcha::MCaptcha] actors. Works like a DNS for
+//! [AddVisitor][crate::mcaptcha::AddVisitor] messages.
+//! - [System][crate::system::System]: mCaptcha system that manages cache, master and provides
+//! useful abstractions. An mCaptcha system/instance can have only a single
+//! [System][crate::system::System]
+//!
+//! ## Example:
+//!
+//! ```rust
+//! use m_captcha::{
+//!     cache::HashCache,
+//!     master::{AddSiteBuilder, Master},
+//!     pow::{ConfigBuilder, Work},
+//!     system::SystemBuilder,
+//!     DefenseBuilder, LevelBuilder, MCaptchaBuilder,
+//! };
+//! // traits from actix needs to be in scope for starting actor
+//! use actix::prelude::*;
+//!
+//! #[actix_rt::main]
+//! async fn main() -> std::io::Result<()> {
+//!     // start cahce actor
+//!     // cache is used to store PoW requirements that are sent to clients
+//!     // This way, it can be verified that the client computed work over a config
+//!     // that _we_ sent. Offers protection against rainbow tables powered dictionary attacks
+//!     let cache = HashCache::default().start();
+//!
+//!     // create PoW config with unique salt. Salt has to be safely guarded.
+//!     // salts protect us from replay attacks
+//!     let pow = ConfigBuilder::default()
+//!         .salt("myrandomsaltisnotlongenoug".into())
+//!         .build()
+//!         .unwrap();
+//!
+//!     // start master actor. Master actor is responsible for managing MCaptcha actors
+//!     // each mCaptcha system should have only one master
+//!     let master = Master::new(5).start();
+//!
+//!     // Create system. System encapsulates master and cache and provides useful abstraction
+//!     // each mCaptcha system should have only one system
+//!     let system = SystemBuilder::default()
+//!         .master(master)
+//!         .cache(cache)
+//!         .pow(pow.clone())
+//!         .build()
+//!         .unwrap();
+//!
+//!     // configure defense. This is a per site configuration. A site can have several levels
+//!     // of defenses configured
+//!     let defense = DefenseBuilder::default()
+//!         // add as many defense as you see fit
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 // visitor_threshold is the threshold/limit at which
+//!                 // mCaptcha will adjust difficulty defense
+//!                 // it is advisable to set small values for the first
+//!                 // defense visitor_threshold and difficulty_factor
+//!                 // as this will be the work that clients will be
+//!                 // computing when there's no load
+//!                 .visitor_threshold(50)
+//!                 .difficulty_factor(500)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 .visitor_threshold(5000)
+//!                 .difficulty_factor(50000)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .build()
+//!         .unwrap();
+//!
+//!     // create and start MCaptcha actor that uses the above defense configuration
+//!     // This is what manages the difficulty factor of sites that an mCaptcha protects
+//!     let mcaptcha = MCaptchaBuilder::default()
+//!         .defense(defense)
+//!         // leaky bucket algorithm's emission interval
+//!         .duration(30)
+//!         //   .cache(cache)
+//!         .build()
+//!         .unwrap()
+//!         .start();
+//!
+//!     // unique value identifying an MCaptcha actor
+//!     let mcaptcha_name = "batsense.net";
+//!
+//!     // add MCaptcha to Master
+//!     let msg = AddSiteBuilder::default()
+//!         .id(mcaptcha_name.into())
+//!         .addr(mcaptcha.clone())
+//!         .build()
+//!         .unwrap();
+//!     system.master.send(msg).await.unwrap();
+//!
+//!     // Get PoW config. Should be called everytime there's a visitor for a
+//!     // managed site(here mcaptcha_name)
+//!     let work_req = system.get_pow(mcaptcha_name.into()).await.unwrap();
+//!
+//!     // the following computation should be done on the client but for the purpose
+//!     // of this illustration, we are going to do it on the server it self
+//!     let work = pow
+//!         .prove_work(&work_req.string, work_req.difficulty_factor)
+//!         .unwrap();
+//!
+//!     // the payload that the client sends to the server
+//!     let payload = Work {
+//!         string: work_req.string,
+//!         result: work.result,
+//!         nonce: work.nonce,
+//!     };
+//!
+//!     // Server evaluates client's work. Returns true if everything
+//!     // checksout and Err() if something fishy is happening
+//!     let res = system.verify_pow(payload.clone()).await.unwrap();
+//!     assert!(res);
+//!
+//!     Ok(())
+//! }
+//! ```
+#![forbid(unsafe_code)]
+pub mod defense;
+pub mod errors;
+pub mod master;
+pub mod mcaptcha;
+
+/// message datatypes to interact with [MCaptcha] actor
+pub mod cache;
+pub mod pow;
+pub mod system;
+mod utils;
+
+pub use crate::cache::hashcache::HashCache;
+
+pub use defense::{Defense, DefenseBuilder, LevelBuilder};
+pub use mcaptcha::{MCaptcha, MCaptchaBuilder};
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/src/m_captcha/master.rs.html b/api-docs/m_captcha/0.1.2/src/m_captcha/master.rs.html new file mode 100644 index 0000000..2264876 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/src/m_captcha/master.rs.html @@ -0,0 +1,398 @@ +master.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! [Master] actor module that manages [MCaptcha] actors
+use std::collections::BTreeMap;
+use std::time::Duration;
+
+use actix::clock::sleep;
+use actix::dev::*;
+use derive_builder::Builder;
+
+use crate::mcaptcha::MCaptcha;
+
+/// This Actor manages the [MCaptcha] actors.
+/// A service can have several [MCaptcha] actors with
+/// varying [Defense][crate::defense::Defense] configurations
+/// so a "master" actor is needed to manage them all
+#[derive(Clone)]
+pub struct Master {
+    sites: BTreeMap<String, (Option<()>, Addr<MCaptcha>)>,
+    gc: u64,
+}
+
+impl Master {
+    /// add [MCaptcha] actor to [Master]
+    pub fn add_site(&mut self, details: AddSite) {
+        self.sites
+            .insert(details.id, (None, details.addr.to_owned()));
+    }
+
+    /// create new master
+    /// accepts a `u64` to configure garbage collection period
+    pub fn new(gc: u64) -> Self {
+        Master {
+            sites: BTreeMap::new(),
+            gc,
+        }
+    }
+
+    /// get [MCaptcha] actor from [Master]
+    pub fn get_site<'a, 'b>(&'a mut self, id: &'b str) -> Option<Addr<MCaptcha>> {
+        let mut r = None;
+        if let Some((read_val, addr)) = self.sites.get_mut(id) {
+            r = Some(addr.clone());
+            *read_val = Some(());
+        };
+        r
+    }
+
+    /// remvoes [MCaptcha] actor from [Master]
+    pub fn rm_site(&mut self, id: &str) {
+        self.sites.remove(id);
+    }
+}
+
+impl Actor for Master {
+    type Context = Context<Self>;
+
+    fn started(&mut self, ctx: &mut Self::Context) {
+        let addr = ctx.address();
+        let task = async move {
+            addr.send(CleanUp).await.unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(task);
+    }
+}
+
+/// Message to get an [MCaptcha] actor from master
+#[derive(Message)]
+#[rtype(result = "Option<Addr<MCaptcha>>")]
+pub struct GetSite(pub String);
+
+impl Handler<GetSite> for Master {
+    type Result = MessageResult<GetSite>;
+
+    fn handle(&mut self, m: GetSite, _ctx: &mut Self::Context) -> Self::Result {
+        let addr = self.get_site(&m.0);
+        if addr.is_none() {
+            return MessageResult(None);
+        } else {
+            return MessageResult(Some(addr.unwrap().clone()));
+        }
+    }
+}
+
+/// Message to clean up master of [MCaptcha] actors with zero visitor count
+#[derive(Message)]
+#[rtype(result = "()")]
+pub struct CleanUp;
+
+impl Handler<CleanUp> for Master {
+    type Result = ();
+
+    fn handle(&mut self, _: CleanUp, ctx: &mut Self::Context) -> Self::Result {
+        let sites = self.sites.clone();
+        let gc = self.gc;
+        let master = ctx.address();
+        println!("init cleanup up");
+        let task = async move {
+            for (id, (new, addr)) in sites.iter() {
+                use crate::mcaptcha::{GetCurrentVisitorCount, Stop};
+                let visitor_count = addr.send(GetCurrentVisitorCount).await.unwrap();
+                println!("{}", visitor_count);
+                if visitor_count == 0 && new.is_some() {
+                    addr.send(Stop).await.unwrap();
+                    master.send(RemoveSite(id.to_owned())).await.unwrap();
+                    println!("cleaned up");
+                }
+            }
+
+            let duration = Duration::new(gc, 0);
+            sleep(duration).await;
+            master.send(CleanUp).await.unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(task);
+    }
+}
+
+/// Message to delete [MCaptcha] actor
+#[derive(Message)]
+#[rtype(result = "()")]
+pub struct RemoveSite(pub String);
+
+impl Handler<RemoveSite> for Master {
+    type Result = ();
+
+    fn handle(&mut self, m: RemoveSite, _ctx: &mut Self::Context) -> Self::Result {
+        self.rm_site(&m.0);
+    }
+}
+
+/// Message to add an [MCaptcha] actor to [Master]
+#[derive(Message, Builder)]
+#[rtype(result = "()")]
+pub struct AddSite {
+    pub id: String,
+    pub addr: Addr<MCaptcha>,
+}
+
+impl Handler<AddSite> for Master {
+    type Result = ();
+
+    fn handle(&mut self, m: AddSite, _ctx: &mut Self::Context) -> Self::Result {
+        self.add_site(m);
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::mcaptcha::tests::*;
+
+    #[actix_rt::test]
+    async fn master_actor_works() {
+        let addr = Master::new(1).start();
+
+        let id = "yo";
+        let mcaptcha = get_counter().start();
+        let msg = AddSiteBuilder::default()
+            .id(id.into())
+            .addr(mcaptcha.clone())
+            .build()
+            .unwrap();
+
+        addr.send(msg).await.unwrap();
+
+        let mcaptcha_addr = addr.send(GetSite(id.into())).await.unwrap();
+        assert_eq!(mcaptcha_addr, Some(mcaptcha));
+
+        let addr_doesnt_exist = addr.send(GetSite("a".into())).await.unwrap();
+        assert!(addr_doesnt_exist.is_none());
+
+        let timer_expire = Duration::new(DURATION, 0);
+        sleep(timer_expire).await;
+        sleep(timer_expire).await;
+
+        let mcaptcha_addr = addr.send(GetSite(id.into())).await.unwrap();
+        assert_eq!(mcaptcha_addr, None);
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/src/m_captcha/mcaptcha.rs.html b/api-docs/m_captcha/0.1.2/src/m_captcha/mcaptcha.rs.html new file mode 100644 index 0000000..59b39bf --- /dev/null +++ b/api-docs/m_captcha/0.1.2/src/m_captcha/mcaptcha.rs.html @@ -0,0 +1,768 @@ +mcaptcha.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! MCaptcha actor module that manages defense levels
+//!
+//! ## Usage:
+//! ```rust
+//! use m_captcha::{mcaptcha::AddVisitor, MCaptchaBuilder, cache::HashCache, LevelBuilder, DefenseBuilder};
+//! // traits from actix needs to be in scope for starting actor
+//! use actix::prelude::*;
+//!
+//! #[actix_rt::main]
+//! async fn main() -> std::io::Result<()> {
+//!     // configure defense
+//!     let defense = DefenseBuilder::default()
+//!         // add as many levels as you see fit
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 // visitor_threshold is the threshold/limit at which
+//!                 // mCaptcha will adjust difficulty levels
+//!                 // it is advisable to set small values for the first
+//!                 // levels visitor_threshold and difficulty_factor
+//!                 // as this will be the work that clients will be
+//!                 // computing when there's no load
+//!                 .visitor_threshold(50)
+//!                 .difficulty_factor(500)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 .visitor_threshold(5000)
+//!                 .difficulty_factor(50000)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .build()
+//!         .unwrap();
+//!
+//!     // create and start MCaptcha actor
+//!     //let cache = HashCache::default().start();
+//!     let mcaptcha = MCaptchaBuilder::default()
+//!         .defense(defense)
+//!         // leaky bucket algorithm's emission interval
+//!         .duration(30)
+//!         .build()
+//!         .unwrap()
+//!         .start();
+//!
+//!     // increment count when user visits protected routes
+//!     mcaptcha.send(AddVisitor).await.unwrap();
+//!
+//!     Ok(())
+//! }
+//! ```
+
+use std::time::Duration;
+
+use actix::clock::sleep;
+use actix::dev::*;
+use serde::{Deserialize, Serialize};
+
+use crate::{
+    defense::Defense,
+    errors::{CaptchaError, CaptchaResult},
+};
+
+/// Builder for [MCaptcha]
+#[derive(Clone, Serialize, Deserialize, Debug)]
+pub struct MCaptchaBuilder {
+    visitor_threshold: u32,
+    defense: Option<Defense>,
+    duration: Option<u64>,
+}
+
+impl Default for MCaptchaBuilder {
+    fn default() -> Self {
+        MCaptchaBuilder {
+            visitor_threshold: 0,
+            defense: None,
+            duration: None,
+        }
+    }
+}
+
+/// This struct represents the mCaptcha state and is used
+/// to configure leaky-bucket lifetime and manage defense
+#[derive(Clone, Serialize, Deserialize, Debug)]
+pub struct MCaptcha {
+    visitor_threshold: u32,
+    defense: Defense,
+    duration: u64,
+}
+
+impl MCaptchaBuilder {
+    /// set defense
+    pub fn defense(&mut self, d: Defense) -> &mut Self {
+        self.defense = Some(d);
+        self
+    }
+
+    /// set duration
+    pub fn duration(&mut self, d: u64) -> &mut Self {
+        self.duration = Some(d);
+        self
+    }
+
+    /// Builds new [MCaptcha]
+    pub fn build(&mut self) -> CaptchaResult<MCaptcha> {
+        if self.duration.is_none() {
+            Err(CaptchaError::PleaseSetValue("duration".into()))
+        } else if self.defense.is_none() {
+            Err(CaptchaError::PleaseSetValue("defense".into()))
+        } else if self.duration <= Some(0) {
+            Err(CaptchaError::CaptchaDurationZero)
+        } else {
+            let m = MCaptcha {
+                duration: self.duration.unwrap(),
+                defense: self.defense.clone().unwrap(),
+                visitor_threshold: self.visitor_threshold,
+            };
+            Ok(m)
+        }
+    }
+}
+
+impl MCaptcha {
+    /// increments the visitor count by one
+    pub fn add_visitor(&mut self) {
+        self.visitor_threshold += 1;
+        if self.visitor_threshold > self.defense.visitor_threshold() {
+            self.defense.tighten_up();
+        } else {
+            self.defense.loosen_up();
+        }
+    }
+
+    /// decrements the visitor count by one
+    pub fn decrement_visitor(&mut self) {
+        if self.visitor_threshold > 0 {
+            self.visitor_threshold -= 1;
+        }
+    }
+
+    /// get current difficulty factor
+    pub fn get_difficulty(&self) -> u32 {
+        self.defense.get_difficulty()
+    }
+
+    /// get [MCaptcha]'s lifetime
+    pub fn get_duration(&self) -> u64 {
+        self.duration
+    }
+}
+impl Actor for MCaptcha {
+    type Context = Context<Self>;
+}
+
+/// Message to decrement the visitor count
+#[derive(Message)]
+#[rtype(result = "()")]
+struct DeleteVisitor;
+
+impl Handler<DeleteVisitor> for MCaptcha {
+    type Result = ();
+    fn handle(&mut self, _msg: DeleteVisitor, _ctx: &mut Self::Context) -> Self::Result {
+        self.decrement_visitor();
+    }
+}
+
+/// Message to increment the visitor count
+/// returns difficulty factor and lifetime
+#[derive(Message)]
+#[rtype(result = "AddVisitorResult")]
+pub struct AddVisitor;
+
+/// Struct representing the return datatime of
+/// [AddVisitor] message. Contains MCaptcha lifetime
+/// and difficulty factor
+#[derive(Debug, Clone, Deserialize, Serialize)]
+pub struct AddVisitorResult {
+    pub duration: u64,
+    pub difficulty_factor: u32,
+}
+
+impl AddVisitorResult {
+    fn new(m: &MCaptcha) -> Self {
+        AddVisitorResult {
+            duration: m.get_duration(),
+            difficulty_factor: m.get_difficulty(),
+        }
+    }
+}
+
+impl Handler<AddVisitor> for MCaptcha {
+    type Result = MessageResult<AddVisitor>;
+
+    fn handle(&mut self, _: AddVisitor, ctx: &mut Self::Context) -> Self::Result {
+        let addr = ctx.address();
+
+        let duration: Duration = Duration::new(self.duration.clone(), 0);
+        let wait_for = async move {
+            sleep(duration).await;
+            addr.send(DeleteVisitor).await.unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(wait_for);
+
+        self.add_visitor();
+        MessageResult(AddVisitorResult::new(&self))
+    }
+}
+
+/// Message to get the visitor count
+#[derive(Message)]
+#[rtype(result = "u32")]
+pub struct GetCurrentVisitorCount;
+
+impl Handler<GetCurrentVisitorCount> for MCaptcha {
+    type Result = MessageResult<GetCurrentVisitorCount>;
+
+    fn handle(&mut self, _: GetCurrentVisitorCount, _ctx: &mut Self::Context) -> Self::Result {
+        MessageResult(self.visitor_threshold)
+    }
+}
+
+/// Message to stop [MCaptcha]
+#[derive(Message)]
+#[rtype(result = "()")]
+pub struct Stop;
+
+impl Handler<Stop> for MCaptcha {
+    type Result = ();
+
+    fn handle(&mut self, _: Stop, ctx: &mut Self::Context) -> Self::Result {
+        ctx.stop()
+    }
+}
+
+#[cfg(test)]
+pub mod tests {
+    use super::*;
+    use crate::defense::*;
+
+    // constants for testing
+    // (visitor count, level)
+    pub const LEVEL_1: (u32, u32) = (50, 50);
+    pub const LEVEL_2: (u32, u32) = (500, 500);
+    pub const DURATION: u64 = 5;
+
+    type MyActor = Addr<MCaptcha>;
+
+    pub fn get_defense() -> Defense {
+        DefenseBuilder::default()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(LEVEL_1.0)
+                    .difficulty_factor(LEVEL_1.1)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(LEVEL_2.0)
+                    .difficulty_factor(LEVEL_2.1)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .build()
+            .unwrap()
+    }
+
+    async fn race(addr: Addr<MCaptcha>, count: (u32, u32)) {
+        for _ in 0..count.0 as usize - 1 {
+            let _ = addr.send(AddVisitor).await.unwrap();
+        }
+    }
+
+    pub fn get_counter() -> MCaptcha {
+        MCaptchaBuilder::default()
+            .defense(get_defense())
+            .duration(DURATION)
+            .build()
+            .unwrap()
+    }
+
+    #[actix_rt::test]
+    async fn counter_defense_tightenup_works() {
+        let addr: MyActor = get_counter().start();
+
+        let mut mcaptcha = addr.send(AddVisitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_1.0);
+
+        race(addr.clone(), LEVEL_2).await;
+        mcaptcha = addr.send(AddVisitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_2.1);
+    }
+
+    #[actix_rt::test]
+    async fn counter_defense_loosenup_works() {
+        use actix::clock::sleep;
+        let addr: MyActor = get_counter().start();
+
+        race(addr.clone(), LEVEL_2).await;
+        race(addr.clone(), LEVEL_2).await;
+        let mut mcaptcha = addr.send(AddVisitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_2.1);
+
+        let duration = Duration::new(DURATION, 0);
+        sleep(duration).await;
+
+        mcaptcha = addr.send(AddVisitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_1.1);
+    }
+
+    #[test]
+    fn test_mcatcptha_builder() {
+        let defense = get_defense();
+        let m = MCaptchaBuilder::default()
+            .duration(0)
+            .defense(defense.clone())
+            .build();
+
+        assert_eq!(m.err(), Some(CaptchaError::CaptchaDurationZero));
+
+        let m = MCaptchaBuilder::default().duration(30).build();
+        assert_eq!(
+            m.err(),
+            Some(CaptchaError::PleaseSetValue("defense".into()))
+        );
+
+        let m = MCaptchaBuilder::default().defense(defense.clone()).build();
+        assert_eq!(
+            m.err(),
+            Some(CaptchaError::PleaseSetValue("duration".into()))
+        );
+    }
+
+    #[actix_rt::test]
+    async fn get_current_visitor_count_works() {
+        let addr: MyActor = get_counter().start();
+
+        addr.send(AddVisitor).await.unwrap();
+        addr.send(AddVisitor).await.unwrap();
+        addr.send(AddVisitor).await.unwrap();
+        addr.send(AddVisitor).await.unwrap();
+        let count = addr.send(GetCurrentVisitorCount).await.unwrap();
+
+        assert_eq!(count, 4);
+    }
+
+    #[actix_rt::test]
+    #[should_panic]
+    async fn stop_works() {
+        let addr: MyActor = get_counter().start();
+        addr.send(Stop).await.unwrap();
+        addr.send(AddVisitor).await.unwrap();
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/src/m_captcha/pow.rs.html b/api-docs/m_captcha/0.1.2/src/m_captcha/pow.rs.html new file mode 100644 index 0000000..c48edb1 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/src/m_captcha/pow.rs.html @@ -0,0 +1,126 @@ +pow.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+//! PoW datatypes used in client-server interaction
+use pow_sha256::PoW;
+use serde::{Deserialize, Serialize};
+
+pub use pow_sha256::ConfigBuilder;
+
+/// PoW requirement datatype that is be sent to clients for generating PoW
+#[derive(Clone, Serialize, Deserialize, Debug)]
+pub struct PoWConfig {
+    pub string: String,
+    pub difficulty_factor: u32,
+}
+impl PoWConfig {
+    /// create new instance of [PoWConfig]
+    pub fn new(m: u32) -> Self {
+        use crate::utils::get_random;
+
+        PoWConfig {
+            string: get_random(32),
+            difficulty_factor: m,
+        }
+    }
+}
+
+/// PoW datatype that clients send to server
+#[derive(Clone, Serialize, Deserialize, Debug)]
+pub struct Work {
+    pub string: String,
+    pub result: String,
+    pub nonce: u64,
+}
+
+impl From<Work> for PoW<String> {
+    fn from(w: Work) -> Self {
+        use pow_sha256::PoWBuilder;
+        PoWBuilder::default()
+            .result(w.result)
+            .nonce(w.nonce)
+            .build()
+            .unwrap()
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/src/m_captcha/system.rs.html b/api-docs/m_captcha/0.1.2/src/m_captcha/system.rs.html new file mode 100644 index 0000000..f6f24fc --- /dev/null +++ b/api-docs/m_captcha/0.1.2/src/m_captcha/system.rs.html @@ -0,0 +1,332 @@ +system.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! module describing mCaptcha system
+use actix::dev::*;
+use derive_builder::Builder;
+use pow_sha256::{Config, PoW};
+
+use crate::cache::messages;
+use crate::cache::Save;
+use crate::errors::*;
+use crate::master::Master;
+use crate::pow::*;
+
+/// struct describing various bits of data required for an mCaptcha system
+#[derive(Clone, Builder)]
+pub struct System<T: Save> {
+    pub master: Addr<Master>,
+    cache: Addr<T>,
+    pow: Config,
+}
+
+impl<T> System<T>
+where
+    T: Save,
+    <T as actix::Actor>::Context: ToEnvelope<T, messages::Cache> + ToEnvelope<T, messages::Retrive>,
+{
+    /// utility function to get difficulty factor of site `id` and cache it
+    pub async fn get_pow(&self, id: String) -> Option<PoWConfig> {
+        use crate::cache::messages::Cache;
+        use crate::master::GetSite;
+        use crate::mcaptcha::AddVisitor;
+
+        let site_addr = self.master.send(GetSite(id)).await.unwrap();
+        if site_addr.is_none() {
+            return None;
+        }
+        let mcaptcha = site_addr.unwrap().send(AddVisitor).await.unwrap();
+        let pow_config = PoWConfig::new(mcaptcha.difficulty_factor);
+
+        let cache_msg = Cache::new(&pow_config, &mcaptcha);
+        self.cache.send(cache_msg).await.unwrap().unwrap();
+        Some(pow_config)
+    }
+
+    /// utility function to verify [Work]
+    pub async fn verify_pow(&self, work: Work) -> CaptchaResult<bool> {
+        use crate::cache::messages::Retrive;
+
+        let string = work.string.clone();
+        let msg = Retrive(string.clone());
+        let pow: PoW<String> = work.into();
+
+        let difficulty = self.cache.send(msg).await.unwrap()?;
+        match difficulty {
+            Some(difficulty) => {
+                if self.pow.is_sufficient_difficulty(&pow, difficulty) {
+                    Ok(self.pow.is_valid_proof(&pow, &string))
+                } else {
+                    Err(CaptchaError::InsuffiencientDifficulty)
+                }
+            }
+            None => Err(CaptchaError::StringNotFound),
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+
+    use pow_sha256::ConfigBuilder;
+
+    use super::System;
+    use super::*;
+    use crate::cache::HashCache;
+    use crate::master::*;
+    use crate::mcaptcha::tests::*;
+
+    const MCAPTCHA_NAME: &str = "batsense.net";
+
+    async fn boostrap_system(gc: u64) -> System<HashCache> {
+        let master = Master::new(gc).start();
+        let mcaptcha = get_counter().start();
+        let pow = get_config();
+
+        let cache = HashCache::default().start();
+        let msg = AddSiteBuilder::default()
+            .id(MCAPTCHA_NAME.into())
+            .addr(mcaptcha.clone())
+            .build()
+            .unwrap();
+
+        master.send(msg).await.unwrap();
+
+        SystemBuilder::default()
+            .master(master)
+            .cache(cache)
+            .pow(pow)
+            .build()
+            .unwrap()
+    }
+
+    fn get_config() -> Config {
+        ConfigBuilder::default()
+            .salt("myrandomsaltisnotlongenoug".into())
+            .build()
+            .unwrap()
+    }
+
+    #[actix_rt::test]
+    async fn get_pow_works() {
+        let actors = boostrap_system(10).await;
+        let pow = actors.get_pow(MCAPTCHA_NAME.into()).await.unwrap();
+        assert_eq!(pow.difficulty_factor, LEVEL_1.0);
+    }
+
+    #[actix_rt::test]
+    async fn verify_pow_works() {
+        let actors = boostrap_system(10).await;
+        let work_req = actors.get_pow(MCAPTCHA_NAME.into()).await.unwrap();
+        let config = get_config();
+
+        let work = config
+            .prove_work(&work_req.string, work_req.difficulty_factor)
+            .unwrap();
+        let mut payload = Work {
+            string: work_req.string,
+            result: work.result,
+            nonce: work.nonce,
+        };
+
+        let res = actors.verify_pow(payload.clone()).await.unwrap();
+        assert!(res);
+
+        payload.string = "wrongstring".into();
+        let res = actors.verify_pow(payload.clone()).await;
+        assert_eq!(res, Err(CaptchaError::StringNotFound));
+
+        let insufficient_work_req = actors.get_pow(MCAPTCHA_NAME.into()).await.unwrap();
+        let insufficient_work = config.prove_work(&insufficient_work_req.string, 1).unwrap();
+        let insufficient_work_payload = Work {
+            string: insufficient_work_req.string,
+            result: insufficient_work.result,
+            nonce: insufficient_work.nonce,
+        };
+        let res = actors.verify_pow(insufficient_work_payload.clone()).await;
+        assert_eq!(res, Err(CaptchaError::InsuffiencientDifficulty));
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/src/m_captcha/utils.rs.html b/api-docs/m_captcha/0.1.2/src/m_captcha/utils.rs.html new file mode 100644 index 0000000..5532440 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/src/m_captcha/utils.rs.html @@ -0,0 +1,72 @@ +utils.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+// utility function to get a randomly generated string
+// of size len
+pub fn get_random(len: usize) -> String {
+    use std::iter;
+
+    use rand::{distributions::Alphanumeric, rngs::ThreadRng, thread_rng, Rng};
+
+    let mut rng: ThreadRng = thread_rng();
+
+    iter::repeat(())
+        .map(|()| rng.sample(Alphanumeric))
+        .map(char::from)
+        .take(len)
+        .collect::<String>()
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/src/unicode_xid/lib.rs.html b/api-docs/m_captcha/0.1.2/src/unicode_xid/lib.rs.html new file mode 100644 index 0000000..4f28090 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/src/unicode_xid/lib.rs.html @@ -0,0 +1,172 @@ +lib.rs - source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! Determine if a `char` is a valid identifier for a parser and/or lexer according to
+//! [Unicode Standard Annex #31](http://www.unicode.org/reports/tr31/) rules.
+//!
+//! ```rust
+//! extern crate unicode_xid;
+//!
+//! use unicode_xid::UnicodeXID;
+//!
+//! fn main() {
+//!     let ch = 'a';
+//!     println!("Is {} a valid start of an identifier? {}", ch, UnicodeXID::is_xid_start(ch));
+//! }
+//! ```
+//!
+//! # features
+//!
+//! unicode-xid supports a `no_std` feature. This eliminates dependence
+//! on std, and instead uses equivalent functions from core.
+//!
+
+#![forbid(unsafe_code)]
+#![deny(missing_docs)]
+#![doc(
+    html_logo_url = "https://unicode-rs.github.io/unicode-rs_sm.png",
+    html_favicon_url = "https://unicode-rs.github.io/unicode-rs_sm.png"
+)]
+#![no_std]
+#![cfg_attr(feature = "bench", feature(test, unicode_internals))]
+
+#[cfg(test)]
+#[macro_use]
+extern crate std;
+
+#[cfg(feature = "bench")]
+extern crate test;
+
+use tables::derived_property;
+pub use tables::UNICODE_VERSION;
+
+mod tables;
+
+#[cfg(test)]
+mod tests;
+
+/// Methods for determining if a character is a valid identifier character.
+pub trait UnicodeXID {
+    /// Returns whether the specified character satisfies the 'XID_Start'
+    /// Unicode property.
+    ///
+    /// 'XID_Start' is a Unicode Derived Property specified in
+    /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications),
+    /// mostly similar to ID_Start but modified for closure under NFKx.
+    fn is_xid_start(self) -> bool;
+
+    /// Returns whether the specified `char` satisfies the 'XID_Continue'
+    /// Unicode property.
+    ///
+    /// 'XID_Continue' is a Unicode Derived Property specified in
+    /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications),
+    /// mostly similar to 'ID_Continue' but modified for closure under NFKx.
+    fn is_xid_continue(self) -> bool;
+}
+
+impl UnicodeXID for char {
+    #[inline]
+    fn is_xid_start(self) -> bool {
+        derived_property::XID_Start(self)
+    }
+
+    #[inline]
+    fn is_xid_continue(self) -> bool {
+        derived_property::XID_Continue(self)
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/src/unicode_xid/tables.rs.html b/api-docs/m_captcha/0.1.2/src/unicode_xid/tables.rs.html new file mode 100644 index 0000000..44ff13d --- /dev/null +++ b/api-docs/m_captcha/0.1.2/src/unicode_xid/tables.rs.html @@ -0,0 +1,2842 @@ +tables.rs - source
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// NOTE: The following code was generated by "scripts/unicode.py", do not edit directly
+
+#![allow(missing_docs, non_upper_case_globals, non_snake_case)]
+
+/// The version of [Unicode](http://www.unicode.org/)
+/// that this version of unicode-xid is based on.
+pub const UNICODE_VERSION: (u64, u64, u64) = (13, 0, 0);
+
+fn bsearch_range_table(c: char, r: &[(char, char)]) -> bool {
+    use core::cmp::Ordering::{Equal, Greater, Less};
+
+    r.binary_search_by(|&(lo, hi)| {
+        // Because ASCII ranges are at the start of the tables, a search for an
+        // ASCII char will involve more `Greater` results (i.e. the `(lo,hi)`
+        // table entry is greater than `c`) than `Less` results. And given that
+        // ASCII chars are so common, it makes sense to favor them. Therefore,
+        // the `Greater` case is tested for before the `Less` case.
+        if lo > c {
+            Greater
+        } else if hi < c {
+            Less
+        } else {
+            Equal
+        }
+    })
+    .is_ok()
+}
+
+pub mod derived_property {
+    pub const XID_Continue_table: &[(char, char)] = &[
+        ('\u{30}', '\u{39}'),
+        ('\u{41}', '\u{5a}'),
+        ('\u{5f}', '\u{5f}'),
+        ('\u{61}', '\u{7a}'),
+        ('\u{aa}', '\u{aa}'),
+        ('\u{b5}', '\u{b5}'),
+        ('\u{b7}', '\u{b7}'),
+        ('\u{ba}', '\u{ba}'),
+        ('\u{c0}', '\u{d6}'),
+        ('\u{d8}', '\u{f6}'),
+        ('\u{f8}', '\u{2c1}'),
+        ('\u{2c6}', '\u{2d1}'),
+        ('\u{2e0}', '\u{2e4}'),
+        ('\u{2ec}', '\u{2ec}'),
+        ('\u{2ee}', '\u{2ee}'),
+        ('\u{300}', '\u{374}'),
+        ('\u{376}', '\u{377}'),
+        ('\u{37b}', '\u{37d}'),
+        ('\u{37f}', '\u{37f}'),
+        ('\u{386}', '\u{38a}'),
+        ('\u{38c}', '\u{38c}'),
+        ('\u{38e}', '\u{3a1}'),
+        ('\u{3a3}', '\u{3f5}'),
+        ('\u{3f7}', '\u{481}'),
+        ('\u{483}', '\u{487}'),
+        ('\u{48a}', '\u{52f}'),
+        ('\u{531}', '\u{556}'),
+        ('\u{559}', '\u{559}'),
+        ('\u{560}', '\u{588}'),
+        ('\u{591}', '\u{5bd}'),
+        ('\u{5bf}', '\u{5bf}'),
+        ('\u{5c1}', '\u{5c2}'),
+        ('\u{5c4}', '\u{5c5}'),
+        ('\u{5c7}', '\u{5c7}'),
+        ('\u{5d0}', '\u{5ea}'),
+        ('\u{5ef}', '\u{5f2}'),
+        ('\u{610}', '\u{61a}'),
+        ('\u{620}', '\u{669}'),
+        ('\u{66e}', '\u{6d3}'),
+        ('\u{6d5}', '\u{6dc}'),
+        ('\u{6df}', '\u{6e8}'),
+        ('\u{6ea}', '\u{6fc}'),
+        ('\u{6ff}', '\u{6ff}'),
+        ('\u{710}', '\u{74a}'),
+        ('\u{74d}', '\u{7b1}'),
+        ('\u{7c0}', '\u{7f5}'),
+        ('\u{7fa}', '\u{7fa}'),
+        ('\u{7fd}', '\u{7fd}'),
+        ('\u{800}', '\u{82d}'),
+        ('\u{840}', '\u{85b}'),
+        ('\u{860}', '\u{86a}'),
+        ('\u{8a0}', '\u{8b4}'),
+        ('\u{8b6}', '\u{8c7}'),
+        ('\u{8d3}', '\u{8e1}'),
+        ('\u{8e3}', '\u{963}'),
+        ('\u{966}', '\u{96f}'),
+        ('\u{971}', '\u{983}'),
+        ('\u{985}', '\u{98c}'),
+        ('\u{98f}', '\u{990}'),
+        ('\u{993}', '\u{9a8}'),
+        ('\u{9aa}', '\u{9b0}'),
+        ('\u{9b2}', '\u{9b2}'),
+        ('\u{9b6}', '\u{9b9}'),
+        ('\u{9bc}', '\u{9c4}'),
+        ('\u{9c7}', '\u{9c8}'),
+        ('\u{9cb}', '\u{9ce}'),
+        ('\u{9d7}', '\u{9d7}'),
+        ('\u{9dc}', '\u{9dd}'),
+        ('\u{9df}', '\u{9e3}'),
+        ('\u{9e6}', '\u{9f1}'),
+        ('\u{9fc}', '\u{9fc}'),
+        ('\u{9fe}', '\u{9fe}'),
+        ('\u{a01}', '\u{a03}'),
+        ('\u{a05}', '\u{a0a}'),
+        ('\u{a0f}', '\u{a10}'),
+        ('\u{a13}', '\u{a28}'),
+        ('\u{a2a}', '\u{a30}'),
+        ('\u{a32}', '\u{a33}'),
+        ('\u{a35}', '\u{a36}'),
+        ('\u{a38}', '\u{a39}'),
+        ('\u{a3c}', '\u{a3c}'),
+        ('\u{a3e}', '\u{a42}'),
+        ('\u{a47}', '\u{a48}'),
+        ('\u{a4b}', '\u{a4d}'),
+        ('\u{a51}', '\u{a51}'),
+        ('\u{a59}', '\u{a5c}'),
+        ('\u{a5e}', '\u{a5e}'),
+        ('\u{a66}', '\u{a75}'),
+        ('\u{a81}', '\u{a83}'),
+        ('\u{a85}', '\u{a8d}'),
+        ('\u{a8f}', '\u{a91}'),
+        ('\u{a93}', '\u{aa8}'),
+        ('\u{aaa}', '\u{ab0}'),
+        ('\u{ab2}', '\u{ab3}'),
+        ('\u{ab5}', '\u{ab9}'),
+        ('\u{abc}', '\u{ac5}'),
+        ('\u{ac7}', '\u{ac9}'),
+        ('\u{acb}', '\u{acd}'),
+        ('\u{ad0}', '\u{ad0}'),
+        ('\u{ae0}', '\u{ae3}'),
+        ('\u{ae6}', '\u{aef}'),
+        ('\u{af9}', '\u{aff}'),
+        ('\u{b01}', '\u{b03}'),
+        ('\u{b05}', '\u{b0c}'),
+        ('\u{b0f}', '\u{b10}'),
+        ('\u{b13}', '\u{b28}'),
+        ('\u{b2a}', '\u{b30}'),
+        ('\u{b32}', '\u{b33}'),
+        ('\u{b35}', '\u{b39}'),
+        ('\u{b3c}', '\u{b44}'),
+        ('\u{b47}', '\u{b48}'),
+        ('\u{b4b}', '\u{b4d}'),
+        ('\u{b55}', '\u{b57}'),
+        ('\u{b5c}', '\u{b5d}'),
+        ('\u{b5f}', '\u{b63}'),
+        ('\u{b66}', '\u{b6f}'),
+        ('\u{b71}', '\u{b71}'),
+        ('\u{b82}', '\u{b83}'),
+        ('\u{b85}', '\u{b8a}'),
+        ('\u{b8e}', '\u{b90}'),
+        ('\u{b92}', '\u{b95}'),
+        ('\u{b99}', '\u{b9a}'),
+        ('\u{b9c}', '\u{b9c}'),
+        ('\u{b9e}', '\u{b9f}'),
+        ('\u{ba3}', '\u{ba4}'),
+        ('\u{ba8}', '\u{baa}'),
+        ('\u{bae}', '\u{bb9}'),
+        ('\u{bbe}', '\u{bc2}'),
+        ('\u{bc6}', '\u{bc8}'),
+        ('\u{bca}', '\u{bcd}'),
+        ('\u{bd0}', '\u{bd0}'),
+        ('\u{bd7}', '\u{bd7}'),
+        ('\u{be6}', '\u{bef}'),
+        ('\u{c00}', '\u{c0c}'),
+        ('\u{c0e}', '\u{c10}'),
+        ('\u{c12}', '\u{c28}'),
+        ('\u{c2a}', '\u{c39}'),
+        ('\u{c3d}', '\u{c44}'),
+        ('\u{c46}', '\u{c48}'),
+        ('\u{c4a}', '\u{c4d}'),
+        ('\u{c55}', '\u{c56}'),
+        ('\u{c58}', '\u{c5a}'),
+        ('\u{c60}', '\u{c63}'),
+        ('\u{c66}', '\u{c6f}'),
+        ('\u{c80}', '\u{c83}'),
+        ('\u{c85}', '\u{c8c}'),
+        ('\u{c8e}', '\u{c90}'),
+        ('\u{c92}', '\u{ca8}'),
+        ('\u{caa}', '\u{cb3}'),
+        ('\u{cb5}', '\u{cb9}'),
+        ('\u{cbc}', '\u{cc4}'),
+        ('\u{cc6}', '\u{cc8}'),
+        ('\u{cca}', '\u{ccd}'),
+        ('\u{cd5}', '\u{cd6}'),
+        ('\u{cde}', '\u{cde}'),
+        ('\u{ce0}', '\u{ce3}'),
+        ('\u{ce6}', '\u{cef}'),
+        ('\u{cf1}', '\u{cf2}'),
+        ('\u{d00}', '\u{d0c}'),
+        ('\u{d0e}', '\u{d10}'),
+        ('\u{d12}', '\u{d44}'),
+        ('\u{d46}', '\u{d48}'),
+        ('\u{d4a}', '\u{d4e}'),
+        ('\u{d54}', '\u{d57}'),
+        ('\u{d5f}', '\u{d63}'),
+        ('\u{d66}', '\u{d6f}'),
+        ('\u{d7a}', '\u{d7f}'),
+        ('\u{d81}', '\u{d83}'),
+        ('\u{d85}', '\u{d96}'),
+        ('\u{d9a}', '\u{db1}'),
+        ('\u{db3}', '\u{dbb}'),
+        ('\u{dbd}', '\u{dbd}'),
+        ('\u{dc0}', '\u{dc6}'),
+        ('\u{dca}', '\u{dca}'),
+        ('\u{dcf}', '\u{dd4}'),
+        ('\u{dd6}', '\u{dd6}'),
+        ('\u{dd8}', '\u{ddf}'),
+        ('\u{de6}', '\u{def}'),
+        ('\u{df2}', '\u{df3}'),
+        ('\u{e01}', '\u{e3a}'),
+        ('\u{e40}', '\u{e4e}'),
+        ('\u{e50}', '\u{e59}'),
+        ('\u{e81}', '\u{e82}'),
+        ('\u{e84}', '\u{e84}'),
+        ('\u{e86}', '\u{e8a}'),
+        ('\u{e8c}', '\u{ea3}'),
+        ('\u{ea5}', '\u{ea5}'),
+        ('\u{ea7}', '\u{ebd}'),
+        ('\u{ec0}', '\u{ec4}'),
+        ('\u{ec6}', '\u{ec6}'),
+        ('\u{ec8}', '\u{ecd}'),
+        ('\u{ed0}', '\u{ed9}'),
+        ('\u{edc}', '\u{edf}'),
+        ('\u{f00}', '\u{f00}'),
+        ('\u{f18}', '\u{f19}'),
+        ('\u{f20}', '\u{f29}'),
+        ('\u{f35}', '\u{f35}'),
+        ('\u{f37}', '\u{f37}'),
+        ('\u{f39}', '\u{f39}'),
+        ('\u{f3e}', '\u{f47}'),
+        ('\u{f49}', '\u{f6c}'),
+        ('\u{f71}', '\u{f84}'),
+        ('\u{f86}', '\u{f97}'),
+        ('\u{f99}', '\u{fbc}'),
+        ('\u{fc6}', '\u{fc6}'),
+        ('\u{1000}', '\u{1049}'),
+        ('\u{1050}', '\u{109d}'),
+        ('\u{10a0}', '\u{10c5}'),
+        ('\u{10c7}', '\u{10c7}'),
+        ('\u{10cd}', '\u{10cd}'),
+        ('\u{10d0}', '\u{10fa}'),
+        ('\u{10fc}', '\u{1248}'),
+        ('\u{124a}', '\u{124d}'),
+        ('\u{1250}', '\u{1256}'),
+        ('\u{1258}', '\u{1258}'),
+        ('\u{125a}', '\u{125d}'),
+        ('\u{1260}', '\u{1288}'),
+        ('\u{128a}', '\u{128d}'),
+        ('\u{1290}', '\u{12b0}'),
+        ('\u{12b2}', '\u{12b5}'),
+        ('\u{12b8}', '\u{12be}'),
+        ('\u{12c0}', '\u{12c0}'),
+        ('\u{12c2}', '\u{12c5}'),
+        ('\u{12c8}', '\u{12d6}'),
+        ('\u{12d8}', '\u{1310}'),
+        ('\u{1312}', '\u{1315}'),
+        ('\u{1318}', '\u{135a}'),
+        ('\u{135d}', '\u{135f}'),
+        ('\u{1369}', '\u{1371}'),
+        ('\u{1380}', '\u{138f}'),
+        ('\u{13a0}', '\u{13f5}'),
+        ('\u{13f8}', '\u{13fd}'),
+        ('\u{1401}', '\u{166c}'),
+        ('\u{166f}', '\u{167f}'),
+        ('\u{1681}', '\u{169a}'),
+        ('\u{16a0}', '\u{16ea}'),
+        ('\u{16ee}', '\u{16f8}'),
+        ('\u{1700}', '\u{170c}'),
+        ('\u{170e}', '\u{1714}'),
+        ('\u{1720}', '\u{1734}'),
+        ('\u{1740}', '\u{1753}'),
+        ('\u{1760}', '\u{176c}'),
+        ('\u{176e}', '\u{1770}'),
+        ('\u{1772}', '\u{1773}'),
+        ('\u{1780}', '\u{17d3}'),
+        ('\u{17d7}', '\u{17d7}'),
+        ('\u{17dc}', '\u{17dd}'),
+        ('\u{17e0}', '\u{17e9}'),
+        ('\u{180b}', '\u{180d}'),
+        ('\u{1810}', '\u{1819}'),
+        ('\u{1820}', '\u{1878}'),
+        ('\u{1880}', '\u{18aa}'),
+        ('\u{18b0}', '\u{18f5}'),
+        ('\u{1900}', '\u{191e}'),
+        ('\u{1920}', '\u{192b}'),
+        ('\u{1930}', '\u{193b}'),
+        ('\u{1946}', '\u{196d}'),
+        ('\u{1970}', '\u{1974}'),
+        ('\u{1980}', '\u{19ab}'),
+        ('\u{19b0}', '\u{19c9}'),
+        ('\u{19d0}', '\u{19da}'),
+        ('\u{1a00}', '\u{1a1b}'),
+        ('\u{1a20}', '\u{1a5e}'),
+        ('\u{1a60}', '\u{1a7c}'),
+        ('\u{1a7f}', '\u{1a89}'),
+        ('\u{1a90}', '\u{1a99}'),
+        ('\u{1aa7}', '\u{1aa7}'),
+        ('\u{1ab0}', '\u{1abd}'),
+        ('\u{1abf}', '\u{1ac0}'),
+        ('\u{1b00}', '\u{1b4b}'),
+        ('\u{1b50}', '\u{1b59}'),
+        ('\u{1b6b}', '\u{1b73}'),
+        ('\u{1b80}', '\u{1bf3}'),
+        ('\u{1c00}', '\u{1c37}'),
+        ('\u{1c40}', '\u{1c49}'),
+        ('\u{1c4d}', '\u{1c7d}'),
+        ('\u{1c80}', '\u{1c88}'),
+        ('\u{1c90}', '\u{1cba}'),
+        ('\u{1cbd}', '\u{1cbf}'),
+        ('\u{1cd0}', '\u{1cd2}'),
+        ('\u{1cd4}', '\u{1cfa}'),
+        ('\u{1d00}', '\u{1df9}'),
+        ('\u{1dfb}', '\u{1f15}'),
+        ('\u{1f18}', '\u{1f1d}'),
+        ('\u{1f20}', '\u{1f45}'),
+        ('\u{1f48}', '\u{1f4d}'),
+        ('\u{1f50}', '\u{1f57}'),
+        ('\u{1f59}', '\u{1f59}'),
+        ('\u{1f5b}', '\u{1f5b}'),
+        ('\u{1f5d}', '\u{1f5d}'),
+        ('\u{1f5f}', '\u{1f7d}'),
+        ('\u{1f80}', '\u{1fb4}'),
+        ('\u{1fb6}', '\u{1fbc}'),
+        ('\u{1fbe}', '\u{1fbe}'),
+        ('\u{1fc2}', '\u{1fc4}'),
+        ('\u{1fc6}', '\u{1fcc}'),
+        ('\u{1fd0}', '\u{1fd3}'),
+        ('\u{1fd6}', '\u{1fdb}'),
+        ('\u{1fe0}', '\u{1fec}'),
+        ('\u{1ff2}', '\u{1ff4}'),
+        ('\u{1ff6}', '\u{1ffc}'),
+        ('\u{203f}', '\u{2040}'),
+        ('\u{2054}', '\u{2054}'),
+        ('\u{2071}', '\u{2071}'),
+        ('\u{207f}', '\u{207f}'),
+        ('\u{2090}', '\u{209c}'),
+        ('\u{20d0}', '\u{20dc}'),
+        ('\u{20e1}', '\u{20e1}'),
+        ('\u{20e5}', '\u{20f0}'),
+        ('\u{2102}', '\u{2102}'),
+        ('\u{2107}', '\u{2107}'),
+        ('\u{210a}', '\u{2113}'),
+        ('\u{2115}', '\u{2115}'),
+        ('\u{2118}', '\u{211d}'),
+        ('\u{2124}', '\u{2124}'),
+        ('\u{2126}', '\u{2126}'),
+        ('\u{2128}', '\u{2128}'),
+        ('\u{212a}', '\u{2139}'),
+        ('\u{213c}', '\u{213f}'),
+        ('\u{2145}', '\u{2149}'),
+        ('\u{214e}', '\u{214e}'),
+        ('\u{2160}', '\u{2188}'),
+        ('\u{2c00}', '\u{2c2e}'),
+        ('\u{2c30}', '\u{2c5e}'),
+        ('\u{2c60}', '\u{2ce4}'),
+        ('\u{2ceb}', '\u{2cf3}'),
+        ('\u{2d00}', '\u{2d25}'),
+        ('\u{2d27}', '\u{2d27}'),
+        ('\u{2d2d}', '\u{2d2d}'),
+        ('\u{2d30}', '\u{2d67}'),
+        ('\u{2d6f}', '\u{2d6f}'),
+        ('\u{2d7f}', '\u{2d96}'),
+        ('\u{2da0}', '\u{2da6}'),
+        ('\u{2da8}', '\u{2dae}'),
+        ('\u{2db0}', '\u{2db6}'),
+        ('\u{2db8}', '\u{2dbe}'),
+        ('\u{2dc0}', '\u{2dc6}'),
+        ('\u{2dc8}', '\u{2dce}'),
+        ('\u{2dd0}', '\u{2dd6}'),
+        ('\u{2dd8}', '\u{2dde}'),
+        ('\u{2de0}', '\u{2dff}'),
+        ('\u{3005}', '\u{3007}'),
+        ('\u{3021}', '\u{302f}'),
+        ('\u{3031}', '\u{3035}'),
+        ('\u{3038}', '\u{303c}'),
+        ('\u{3041}', '\u{3096}'),
+        ('\u{3099}', '\u{309a}'),
+        ('\u{309d}', '\u{309f}'),
+        ('\u{30a1}', '\u{30fa}'),
+        ('\u{30fc}', '\u{30ff}'),
+        ('\u{3105}', '\u{312f}'),
+        ('\u{3131}', '\u{318e}'),
+        ('\u{31a0}', '\u{31bf}'),
+        ('\u{31f0}', '\u{31ff}'),
+        ('\u{3400}', '\u{4dbf}'),
+        ('\u{4e00}', '\u{9ffc}'),
+        ('\u{a000}', '\u{a48c}'),
+        ('\u{a4d0}', '\u{a4fd}'),
+        ('\u{a500}', '\u{a60c}'),
+        ('\u{a610}', '\u{a62b}'),
+        ('\u{a640}', '\u{a66f}'),
+        ('\u{a674}', '\u{a67d}'),
+        ('\u{a67f}', '\u{a6f1}'),
+        ('\u{a717}', '\u{a71f}'),
+        ('\u{a722}', '\u{a788}'),
+        ('\u{a78b}', '\u{a7bf}'),
+        ('\u{a7c2}', '\u{a7ca}'),
+        ('\u{a7f5}', '\u{a827}'),
+        ('\u{a82c}', '\u{a82c}'),
+        ('\u{a840}', '\u{a873}'),
+        ('\u{a880}', '\u{a8c5}'),
+        ('\u{a8d0}', '\u{a8d9}'),
+        ('\u{a8e0}', '\u{a8f7}'),
+        ('\u{a8fb}', '\u{a8fb}'),
+        ('\u{a8fd}', '\u{a92d}'),
+        ('\u{a930}', '\u{a953}'),
+        ('\u{a960}', '\u{a97c}'),
+        ('\u{a980}', '\u{a9c0}'),
+        ('\u{a9cf}', '\u{a9d9}'),
+        ('\u{a9e0}', '\u{a9fe}'),
+        ('\u{aa00}', '\u{aa36}'),
+        ('\u{aa40}', '\u{aa4d}'),
+        ('\u{aa50}', '\u{aa59}'),
+        ('\u{aa60}', '\u{aa76}'),
+        ('\u{aa7a}', '\u{aac2}'),
+        ('\u{aadb}', '\u{aadd}'),
+        ('\u{aae0}', '\u{aaef}'),
+        ('\u{aaf2}', '\u{aaf6}'),
+        ('\u{ab01}', '\u{ab06}'),
+        ('\u{ab09}', '\u{ab0e}'),
+        ('\u{ab11}', '\u{ab16}'),
+        ('\u{ab20}', '\u{ab26}'),
+        ('\u{ab28}', '\u{ab2e}'),
+        ('\u{ab30}', '\u{ab5a}'),
+        ('\u{ab5c}', '\u{ab69}'),
+        ('\u{ab70}', '\u{abea}'),
+        ('\u{abec}', '\u{abed}'),
+        ('\u{abf0}', '\u{abf9}'),
+        ('\u{ac00}', '\u{d7a3}'),
+        ('\u{d7b0}', '\u{d7c6}'),
+        ('\u{d7cb}', '\u{d7fb}'),
+        ('\u{f900}', '\u{fa6d}'),
+        ('\u{fa70}', '\u{fad9}'),
+        ('\u{fb00}', '\u{fb06}'),
+        ('\u{fb13}', '\u{fb17}'),
+        ('\u{fb1d}', '\u{fb28}'),
+        ('\u{fb2a}', '\u{fb36}'),
+        ('\u{fb38}', '\u{fb3c}'),
+        ('\u{fb3e}', '\u{fb3e}'),
+        ('\u{fb40}', '\u{fb41}'),
+        ('\u{fb43}', '\u{fb44}'),
+        ('\u{fb46}', '\u{fbb1}'),
+        ('\u{fbd3}', '\u{fc5d}'),
+        ('\u{fc64}', '\u{fd3d}'),
+        ('\u{fd50}', '\u{fd8f}'),
+        ('\u{fd92}', '\u{fdc7}'),
+        ('\u{fdf0}', '\u{fdf9}'),
+        ('\u{fe00}', '\u{fe0f}'),
+        ('\u{fe20}', '\u{fe2f}'),
+        ('\u{fe33}', '\u{fe34}'),
+        ('\u{fe4d}', '\u{fe4f}'),
+        ('\u{fe71}', '\u{fe71}'),
+        ('\u{fe73}', '\u{fe73}'),
+        ('\u{fe77}', '\u{fe77}'),
+        ('\u{fe79}', '\u{fe79}'),
+        ('\u{fe7b}', '\u{fe7b}'),
+        ('\u{fe7d}', '\u{fe7d}'),
+        ('\u{fe7f}', '\u{fefc}'),
+        ('\u{ff10}', '\u{ff19}'),
+        ('\u{ff21}', '\u{ff3a}'),
+        ('\u{ff3f}', '\u{ff3f}'),
+        ('\u{ff41}', '\u{ff5a}'),
+        ('\u{ff66}', '\u{ffbe}'),
+        ('\u{ffc2}', '\u{ffc7}'),
+        ('\u{ffca}', '\u{ffcf}'),
+        ('\u{ffd2}', '\u{ffd7}'),
+        ('\u{ffda}', '\u{ffdc}'),
+        ('\u{10000}', '\u{1000b}'),
+        ('\u{1000d}', '\u{10026}'),
+        ('\u{10028}', '\u{1003a}'),
+        ('\u{1003c}', '\u{1003d}'),
+        ('\u{1003f}', '\u{1004d}'),
+        ('\u{10050}', '\u{1005d}'),
+        ('\u{10080}', '\u{100fa}'),
+        ('\u{10140}', '\u{10174}'),
+        ('\u{101fd}', '\u{101fd}'),
+        ('\u{10280}', '\u{1029c}'),
+        ('\u{102a0}', '\u{102d0}'),
+        ('\u{102e0}', '\u{102e0}'),
+        ('\u{10300}', '\u{1031f}'),
+        ('\u{1032d}', '\u{1034a}'),
+        ('\u{10350}', '\u{1037a}'),
+        ('\u{10380}', '\u{1039d}'),
+        ('\u{103a0}', '\u{103c3}'),
+        ('\u{103c8}', '\u{103cf}'),
+        ('\u{103d1}', '\u{103d5}'),
+        ('\u{10400}', '\u{1049d}'),
+        ('\u{104a0}', '\u{104a9}'),
+        ('\u{104b0}', '\u{104d3}'),
+        ('\u{104d8}', '\u{104fb}'),
+        ('\u{10500}', '\u{10527}'),
+        ('\u{10530}', '\u{10563}'),
+        ('\u{10600}', '\u{10736}'),
+        ('\u{10740}', '\u{10755}'),
+        ('\u{10760}', '\u{10767}'),
+        ('\u{10800}', '\u{10805}'),
+        ('\u{10808}', '\u{10808}'),
+        ('\u{1080a}', '\u{10835}'),
+        ('\u{10837}', '\u{10838}'),
+        ('\u{1083c}', '\u{1083c}'),
+        ('\u{1083f}', '\u{10855}'),
+        ('\u{10860}', '\u{10876}'),
+        ('\u{10880}', '\u{1089e}'),
+        ('\u{108e0}', '\u{108f2}'),
+        ('\u{108f4}', '\u{108f5}'),
+        ('\u{10900}', '\u{10915}'),
+        ('\u{10920}', '\u{10939}'),
+        ('\u{10980}', '\u{109b7}'),
+        ('\u{109be}', '\u{109bf}'),
+        ('\u{10a00}', '\u{10a03}'),
+        ('\u{10a05}', '\u{10a06}'),
+        ('\u{10a0c}', '\u{10a13}'),
+        ('\u{10a15}', '\u{10a17}'),
+        ('\u{10a19}', '\u{10a35}'),
+        ('\u{10a38}', '\u{10a3a}'),
+        ('\u{10a3f}', '\u{10a3f}'),
+        ('\u{10a60}', '\u{10a7c}'),
+        ('\u{10a80}', '\u{10a9c}'),
+        ('\u{10ac0}', '\u{10ac7}'),
+        ('\u{10ac9}', '\u{10ae6}'),
+        ('\u{10b00}', '\u{10b35}'),
+        ('\u{10b40}', '\u{10b55}'),
+        ('\u{10b60}', '\u{10b72}'),
+        ('\u{10b80}', '\u{10b91}'),
+        ('\u{10c00}', '\u{10c48}'),
+        ('\u{10c80}', '\u{10cb2}'),
+        ('\u{10cc0}', '\u{10cf2}'),
+        ('\u{10d00}', '\u{10d27}'),
+        ('\u{10d30}', '\u{10d39}'),
+        ('\u{10e80}', '\u{10ea9}'),
+        ('\u{10eab}', '\u{10eac}'),
+        ('\u{10eb0}', '\u{10eb1}'),
+        ('\u{10f00}', '\u{10f1c}'),
+        ('\u{10f27}', '\u{10f27}'),
+        ('\u{10f30}', '\u{10f50}'),
+        ('\u{10fb0}', '\u{10fc4}'),
+        ('\u{10fe0}', '\u{10ff6}'),
+        ('\u{11000}', '\u{11046}'),
+        ('\u{11066}', '\u{1106f}'),
+        ('\u{1107f}', '\u{110ba}'),
+        ('\u{110d0}', '\u{110e8}'),
+        ('\u{110f0}', '\u{110f9}'),
+        ('\u{11100}', '\u{11134}'),
+        ('\u{11136}', '\u{1113f}'),
+        ('\u{11144}', '\u{11147}'),
+        ('\u{11150}', '\u{11173}'),
+        ('\u{11176}', '\u{11176}'),
+        ('\u{11180}', '\u{111c4}'),
+        ('\u{111c9}', '\u{111cc}'),
+        ('\u{111ce}', '\u{111da}'),
+        ('\u{111dc}', '\u{111dc}'),
+        ('\u{11200}', '\u{11211}'),
+        ('\u{11213}', '\u{11237}'),
+        ('\u{1123e}', '\u{1123e}'),
+        ('\u{11280}', '\u{11286}'),
+        ('\u{11288}', '\u{11288}'),
+        ('\u{1128a}', '\u{1128d}'),
+        ('\u{1128f}', '\u{1129d}'),
+        ('\u{1129f}', '\u{112a8}'),
+        ('\u{112b0}', '\u{112ea}'),
+        ('\u{112f0}', '\u{112f9}'),
+        ('\u{11300}', '\u{11303}'),
+        ('\u{11305}', '\u{1130c}'),
+        ('\u{1130f}', '\u{11310}'),
+        ('\u{11313}', '\u{11328}'),
+        ('\u{1132a}', '\u{11330}'),
+        ('\u{11332}', '\u{11333}'),
+        ('\u{11335}', '\u{11339}'),
+        ('\u{1133b}', '\u{11344}'),
+        ('\u{11347}', '\u{11348}'),
+        ('\u{1134b}', '\u{1134d}'),
+        ('\u{11350}', '\u{11350}'),
+        ('\u{11357}', '\u{11357}'),
+        ('\u{1135d}', '\u{11363}'),
+        ('\u{11366}', '\u{1136c}'),
+        ('\u{11370}', '\u{11374}'),
+        ('\u{11400}', '\u{1144a}'),
+        ('\u{11450}', '\u{11459}'),
+        ('\u{1145e}', '\u{11461}'),
+        ('\u{11480}', '\u{114c5}'),
+        ('\u{114c7}', '\u{114c7}'),
+        ('\u{114d0}', '\u{114d9}'),
+        ('\u{11580}', '\u{115b5}'),
+        ('\u{115b8}', '\u{115c0}'),
+        ('\u{115d8}', '\u{115dd}'),
+        ('\u{11600}', '\u{11640}'),
+        ('\u{11644}', '\u{11644}'),
+        ('\u{11650}', '\u{11659}'),
+        ('\u{11680}', '\u{116b8}'),
+        ('\u{116c0}', '\u{116c9}'),
+        ('\u{11700}', '\u{1171a}'),
+        ('\u{1171d}', '\u{1172b}'),
+        ('\u{11730}', '\u{11739}'),
+        ('\u{11800}', '\u{1183a}'),
+        ('\u{118a0}', '\u{118e9}'),
+        ('\u{118ff}', '\u{11906}'),
+        ('\u{11909}', '\u{11909}'),
+        ('\u{1190c}', '\u{11913}'),
+        ('\u{11915}', '\u{11916}'),
+        ('\u{11918}', '\u{11935}'),
+        ('\u{11937}', '\u{11938}'),
+        ('\u{1193b}', '\u{11943}'),
+        ('\u{11950}', '\u{11959}'),
+        ('\u{119a0}', '\u{119a7}'),
+        ('\u{119aa}', '\u{119d7}'),
+        ('\u{119da}', '\u{119e1}'),
+        ('\u{119e3}', '\u{119e4}'),
+        ('\u{11a00}', '\u{11a3e}'),
+        ('\u{11a47}', '\u{11a47}'),
+        ('\u{11a50}', '\u{11a99}'),
+        ('\u{11a9d}', '\u{11a9d}'),
+        ('\u{11ac0}', '\u{11af8}'),
+        ('\u{11c00}', '\u{11c08}'),
+        ('\u{11c0a}', '\u{11c36}'),
+        ('\u{11c38}', '\u{11c40}'),
+        ('\u{11c50}', '\u{11c59}'),
+        ('\u{11c72}', '\u{11c8f}'),
+        ('\u{11c92}', '\u{11ca7}'),
+        ('\u{11ca9}', '\u{11cb6}'),
+        ('\u{11d00}', '\u{11d06}'),
+        ('\u{11d08}', '\u{11d09}'),
+        ('\u{11d0b}', '\u{11d36}'),
+        ('\u{11d3a}', '\u{11d3a}'),
+        ('\u{11d3c}', '\u{11d3d}'),
+        ('\u{11d3f}', '\u{11d47}'),
+        ('\u{11d50}', '\u{11d59}'),
+        ('\u{11d60}', '\u{11d65}'),
+        ('\u{11d67}', '\u{11d68}'),
+        ('\u{11d6a}', '\u{11d8e}'),
+        ('\u{11d90}', '\u{11d91}'),
+        ('\u{11d93}', '\u{11d98}'),
+        ('\u{11da0}', '\u{11da9}'),
+        ('\u{11ee0}', '\u{11ef6}'),
+        ('\u{11fb0}', '\u{11fb0}'),
+        ('\u{12000}', '\u{12399}'),
+        ('\u{12400}', '\u{1246e}'),
+        ('\u{12480}', '\u{12543}'),
+        ('\u{13000}', '\u{1342e}'),
+        ('\u{14400}', '\u{14646}'),
+        ('\u{16800}', '\u{16a38}'),
+        ('\u{16a40}', '\u{16a5e}'),
+        ('\u{16a60}', '\u{16a69}'),
+        ('\u{16ad0}', '\u{16aed}'),
+        ('\u{16af0}', '\u{16af4}'),
+        ('\u{16b00}', '\u{16b36}'),
+        ('\u{16b40}', '\u{16b43}'),
+        ('\u{16b50}', '\u{16b59}'),
+        ('\u{16b63}', '\u{16b77}'),
+        ('\u{16b7d}', '\u{16b8f}'),
+        ('\u{16e40}', '\u{16e7f}'),
+        ('\u{16f00}', '\u{16f4a}'),
+        ('\u{16f4f}', '\u{16f87}'),
+        ('\u{16f8f}', '\u{16f9f}'),
+        ('\u{16fe0}', '\u{16fe1}'),
+        ('\u{16fe3}', '\u{16fe4}'),
+        ('\u{16ff0}', '\u{16ff1}'),
+        ('\u{17000}', '\u{187f7}'),
+        ('\u{18800}', '\u{18cd5}'),
+        ('\u{18d00}', '\u{18d08}'),
+        ('\u{1b000}', '\u{1b11e}'),
+        ('\u{1b150}', '\u{1b152}'),
+        ('\u{1b164}', '\u{1b167}'),
+        ('\u{1b170}', '\u{1b2fb}'),
+        ('\u{1bc00}', '\u{1bc6a}'),
+        ('\u{1bc70}', '\u{1bc7c}'),
+        ('\u{1bc80}', '\u{1bc88}'),
+        ('\u{1bc90}', '\u{1bc99}'),
+        ('\u{1bc9d}', '\u{1bc9e}'),
+        ('\u{1d165}', '\u{1d169}'),
+        ('\u{1d16d}', '\u{1d172}'),
+        ('\u{1d17b}', '\u{1d182}'),
+        ('\u{1d185}', '\u{1d18b}'),
+        ('\u{1d1aa}', '\u{1d1ad}'),
+        ('\u{1d242}', '\u{1d244}'),
+        ('\u{1d400}', '\u{1d454}'),
+        ('\u{1d456}', '\u{1d49c}'),
+        ('\u{1d49e}', '\u{1d49f}'),
+        ('\u{1d4a2}', '\u{1d4a2}'),
+        ('\u{1d4a5}', '\u{1d4a6}'),
+        ('\u{1d4a9}', '\u{1d4ac}'),
+        ('\u{1d4ae}', '\u{1d4b9}'),
+        ('\u{1d4bb}', '\u{1d4bb}'),
+        ('\u{1d4bd}', '\u{1d4c3}'),
+        ('\u{1d4c5}', '\u{1d505}'),
+        ('\u{1d507}', '\u{1d50a}'),
+        ('\u{1d50d}', '\u{1d514}'),
+        ('\u{1d516}', '\u{1d51c}'),
+        ('\u{1d51e}', '\u{1d539}'),
+        ('\u{1d53b}', '\u{1d53e}'),
+        ('\u{1d540}', '\u{1d544}'),
+        ('\u{1d546}', '\u{1d546}'),
+        ('\u{1d54a}', '\u{1d550}'),
+        ('\u{1d552}', '\u{1d6a5}'),
+        ('\u{1d6a8}', '\u{1d6c0}'),
+        ('\u{1d6c2}', '\u{1d6da}'),
+        ('\u{1d6dc}', '\u{1d6fa}'),
+        ('\u{1d6fc}', '\u{1d714}'),
+        ('\u{1d716}', '\u{1d734}'),
+        ('\u{1d736}', '\u{1d74e}'),
+        ('\u{1d750}', '\u{1d76e}'),
+        ('\u{1d770}', '\u{1d788}'),
+        ('\u{1d78a}', '\u{1d7a8}'),
+        ('\u{1d7aa}', '\u{1d7c2}'),
+        ('\u{1d7c4}', '\u{1d7cb}'),
+        ('\u{1d7ce}', '\u{1d7ff}'),
+        ('\u{1da00}', '\u{1da36}'),
+        ('\u{1da3b}', '\u{1da6c}'),
+        ('\u{1da75}', '\u{1da75}'),
+        ('\u{1da84}', '\u{1da84}'),
+        ('\u{1da9b}', '\u{1da9f}'),
+        ('\u{1daa1}', '\u{1daaf}'),
+        ('\u{1e000}', '\u{1e006}'),
+        ('\u{1e008}', '\u{1e018}'),
+        ('\u{1e01b}', '\u{1e021}'),
+        ('\u{1e023}', '\u{1e024}'),
+        ('\u{1e026}', '\u{1e02a}'),
+        ('\u{1e100}', '\u{1e12c}'),
+        ('\u{1e130}', '\u{1e13d}'),
+        ('\u{1e140}', '\u{1e149}'),
+        ('\u{1e14e}', '\u{1e14e}'),
+        ('\u{1e2c0}', '\u{1e2f9}'),
+        ('\u{1e800}', '\u{1e8c4}'),
+        ('\u{1e8d0}', '\u{1e8d6}'),
+        ('\u{1e900}', '\u{1e94b}'),
+        ('\u{1e950}', '\u{1e959}'),
+        ('\u{1ee00}', '\u{1ee03}'),
+        ('\u{1ee05}', '\u{1ee1f}'),
+        ('\u{1ee21}', '\u{1ee22}'),
+        ('\u{1ee24}', '\u{1ee24}'),
+        ('\u{1ee27}', '\u{1ee27}'),
+        ('\u{1ee29}', '\u{1ee32}'),
+        ('\u{1ee34}', '\u{1ee37}'),
+        ('\u{1ee39}', '\u{1ee39}'),
+        ('\u{1ee3b}', '\u{1ee3b}'),
+        ('\u{1ee42}', '\u{1ee42}'),
+        ('\u{1ee47}', '\u{1ee47}'),
+        ('\u{1ee49}', '\u{1ee49}'),
+        ('\u{1ee4b}', '\u{1ee4b}'),
+        ('\u{1ee4d}', '\u{1ee4f}'),
+        ('\u{1ee51}', '\u{1ee52}'),
+        ('\u{1ee54}', '\u{1ee54}'),
+        ('\u{1ee57}', '\u{1ee57}'),
+        ('\u{1ee59}', '\u{1ee59}'),
+        ('\u{1ee5b}', '\u{1ee5b}'),
+        ('\u{1ee5d}', '\u{1ee5d}'),
+        ('\u{1ee5f}', '\u{1ee5f}'),
+        ('\u{1ee61}', '\u{1ee62}'),
+        ('\u{1ee64}', '\u{1ee64}'),
+        ('\u{1ee67}', '\u{1ee6a}'),
+        ('\u{1ee6c}', '\u{1ee72}'),
+        ('\u{1ee74}', '\u{1ee77}'),
+        ('\u{1ee79}', '\u{1ee7c}'),
+        ('\u{1ee7e}', '\u{1ee7e}'),
+        ('\u{1ee80}', '\u{1ee89}'),
+        ('\u{1ee8b}', '\u{1ee9b}'),
+        ('\u{1eea1}', '\u{1eea3}'),
+        ('\u{1eea5}', '\u{1eea9}'),
+        ('\u{1eeab}', '\u{1eebb}'),
+        ('\u{1fbf0}', '\u{1fbf9}'),
+        ('\u{20000}', '\u{2a6dd}'),
+        ('\u{2a700}', '\u{2b734}'),
+        ('\u{2b740}', '\u{2b81d}'),
+        ('\u{2b820}', '\u{2cea1}'),
+        ('\u{2ceb0}', '\u{2ebe0}'),
+        ('\u{2f800}', '\u{2fa1d}'),
+        ('\u{30000}', '\u{3134a}'),
+        ('\u{e0100}', '\u{e01ef}'),
+    ];
+
+    pub fn XID_Continue(c: char) -> bool {
+        super::bsearch_range_table(c, XID_Continue_table)
+    }
+
+    pub const XID_Start_table: &[(char, char)] = &[
+        ('\u{41}', '\u{5a}'),
+        ('\u{61}', '\u{7a}'),
+        ('\u{aa}', '\u{aa}'),
+        ('\u{b5}', '\u{b5}'),
+        ('\u{ba}', '\u{ba}'),
+        ('\u{c0}', '\u{d6}'),
+        ('\u{d8}', '\u{f6}'),
+        ('\u{f8}', '\u{2c1}'),
+        ('\u{2c6}', '\u{2d1}'),
+        ('\u{2e0}', '\u{2e4}'),
+        ('\u{2ec}', '\u{2ec}'),
+        ('\u{2ee}', '\u{2ee}'),
+        ('\u{370}', '\u{374}'),
+        ('\u{376}', '\u{377}'),
+        ('\u{37b}', '\u{37d}'),
+        ('\u{37f}', '\u{37f}'),
+        ('\u{386}', '\u{386}'),
+        ('\u{388}', '\u{38a}'),
+        ('\u{38c}', '\u{38c}'),
+        ('\u{38e}', '\u{3a1}'),
+        ('\u{3a3}', '\u{3f5}'),
+        ('\u{3f7}', '\u{481}'),
+        ('\u{48a}', '\u{52f}'),
+        ('\u{531}', '\u{556}'),
+        ('\u{559}', '\u{559}'),
+        ('\u{560}', '\u{588}'),
+        ('\u{5d0}', '\u{5ea}'),
+        ('\u{5ef}', '\u{5f2}'),
+        ('\u{620}', '\u{64a}'),
+        ('\u{66e}', '\u{66f}'),
+        ('\u{671}', '\u{6d3}'),
+        ('\u{6d5}', '\u{6d5}'),
+        ('\u{6e5}', '\u{6e6}'),
+        ('\u{6ee}', '\u{6ef}'),
+        ('\u{6fa}', '\u{6fc}'),
+        ('\u{6ff}', '\u{6ff}'),
+        ('\u{710}', '\u{710}'),
+        ('\u{712}', '\u{72f}'),
+        ('\u{74d}', '\u{7a5}'),
+        ('\u{7b1}', '\u{7b1}'),
+        ('\u{7ca}', '\u{7ea}'),
+        ('\u{7f4}', '\u{7f5}'),
+        ('\u{7fa}', '\u{7fa}'),
+        ('\u{800}', '\u{815}'),
+        ('\u{81a}', '\u{81a}'),
+        ('\u{824}', '\u{824}'),
+        ('\u{828}', '\u{828}'),
+        ('\u{840}', '\u{858}'),
+        ('\u{860}', '\u{86a}'),
+        ('\u{8a0}', '\u{8b4}'),
+        ('\u{8b6}', '\u{8c7}'),
+        ('\u{904}', '\u{939}'),
+        ('\u{93d}', '\u{93d}'),
+        ('\u{950}', '\u{950}'),
+        ('\u{958}', '\u{961}'),
+        ('\u{971}', '\u{980}'),
+        ('\u{985}', '\u{98c}'),
+        ('\u{98f}', '\u{990}'),
+        ('\u{993}', '\u{9a8}'),
+        ('\u{9aa}', '\u{9b0}'),
+        ('\u{9b2}', '\u{9b2}'),
+        ('\u{9b6}', '\u{9b9}'),
+        ('\u{9bd}', '\u{9bd}'),
+        ('\u{9ce}', '\u{9ce}'),
+        ('\u{9dc}', '\u{9dd}'),
+        ('\u{9df}', '\u{9e1}'),
+        ('\u{9f0}', '\u{9f1}'),
+        ('\u{9fc}', '\u{9fc}'),
+        ('\u{a05}', '\u{a0a}'),
+        ('\u{a0f}', '\u{a10}'),
+        ('\u{a13}', '\u{a28}'),
+        ('\u{a2a}', '\u{a30}'),
+        ('\u{a32}', '\u{a33}'),
+        ('\u{a35}', '\u{a36}'),
+        ('\u{a38}', '\u{a39}'),
+        ('\u{a59}', '\u{a5c}'),
+        ('\u{a5e}', '\u{a5e}'),
+        ('\u{a72}', '\u{a74}'),
+        ('\u{a85}', '\u{a8d}'),
+        ('\u{a8f}', '\u{a91}'),
+        ('\u{a93}', '\u{aa8}'),
+        ('\u{aaa}', '\u{ab0}'),
+        ('\u{ab2}', '\u{ab3}'),
+        ('\u{ab5}', '\u{ab9}'),
+        ('\u{abd}', '\u{abd}'),
+        ('\u{ad0}', '\u{ad0}'),
+        ('\u{ae0}', '\u{ae1}'),
+        ('\u{af9}', '\u{af9}'),
+        ('\u{b05}', '\u{b0c}'),
+        ('\u{b0f}', '\u{b10}'),
+        ('\u{b13}', '\u{b28}'),
+        ('\u{b2a}', '\u{b30}'),
+        ('\u{b32}', '\u{b33}'),
+        ('\u{b35}', '\u{b39}'),
+        ('\u{b3d}', '\u{b3d}'),
+        ('\u{b5c}', '\u{b5d}'),
+        ('\u{b5f}', '\u{b61}'),
+        ('\u{b71}', '\u{b71}'),
+        ('\u{b83}', '\u{b83}'),
+        ('\u{b85}', '\u{b8a}'),
+        ('\u{b8e}', '\u{b90}'),
+        ('\u{b92}', '\u{b95}'),
+        ('\u{b99}', '\u{b9a}'),
+        ('\u{b9c}', '\u{b9c}'),
+        ('\u{b9e}', '\u{b9f}'),
+        ('\u{ba3}', '\u{ba4}'),
+        ('\u{ba8}', '\u{baa}'),
+        ('\u{bae}', '\u{bb9}'),
+        ('\u{bd0}', '\u{bd0}'),
+        ('\u{c05}', '\u{c0c}'),
+        ('\u{c0e}', '\u{c10}'),
+        ('\u{c12}', '\u{c28}'),
+        ('\u{c2a}', '\u{c39}'),
+        ('\u{c3d}', '\u{c3d}'),
+        ('\u{c58}', '\u{c5a}'),
+        ('\u{c60}', '\u{c61}'),
+        ('\u{c80}', '\u{c80}'),
+        ('\u{c85}', '\u{c8c}'),
+        ('\u{c8e}', '\u{c90}'),
+        ('\u{c92}', '\u{ca8}'),
+        ('\u{caa}', '\u{cb3}'),
+        ('\u{cb5}', '\u{cb9}'),
+        ('\u{cbd}', '\u{cbd}'),
+        ('\u{cde}', '\u{cde}'),
+        ('\u{ce0}', '\u{ce1}'),
+        ('\u{cf1}', '\u{cf2}'),
+        ('\u{d04}', '\u{d0c}'),
+        ('\u{d0e}', '\u{d10}'),
+        ('\u{d12}', '\u{d3a}'),
+        ('\u{d3d}', '\u{d3d}'),
+        ('\u{d4e}', '\u{d4e}'),
+        ('\u{d54}', '\u{d56}'),
+        ('\u{d5f}', '\u{d61}'),
+        ('\u{d7a}', '\u{d7f}'),
+        ('\u{d85}', '\u{d96}'),
+        ('\u{d9a}', '\u{db1}'),
+        ('\u{db3}', '\u{dbb}'),
+        ('\u{dbd}', '\u{dbd}'),
+        ('\u{dc0}', '\u{dc6}'),
+        ('\u{e01}', '\u{e30}'),
+        ('\u{e32}', '\u{e32}'),
+        ('\u{e40}', '\u{e46}'),
+        ('\u{e81}', '\u{e82}'),
+        ('\u{e84}', '\u{e84}'),
+        ('\u{e86}', '\u{e8a}'),
+        ('\u{e8c}', '\u{ea3}'),
+        ('\u{ea5}', '\u{ea5}'),
+        ('\u{ea7}', '\u{eb0}'),
+        ('\u{eb2}', '\u{eb2}'),
+        ('\u{ebd}', '\u{ebd}'),
+        ('\u{ec0}', '\u{ec4}'),
+        ('\u{ec6}', '\u{ec6}'),
+        ('\u{edc}', '\u{edf}'),
+        ('\u{f00}', '\u{f00}'),
+        ('\u{f40}', '\u{f47}'),
+        ('\u{f49}', '\u{f6c}'),
+        ('\u{f88}', '\u{f8c}'),
+        ('\u{1000}', '\u{102a}'),
+        ('\u{103f}', '\u{103f}'),
+        ('\u{1050}', '\u{1055}'),
+        ('\u{105a}', '\u{105d}'),
+        ('\u{1061}', '\u{1061}'),
+        ('\u{1065}', '\u{1066}'),
+        ('\u{106e}', '\u{1070}'),
+        ('\u{1075}', '\u{1081}'),
+        ('\u{108e}', '\u{108e}'),
+        ('\u{10a0}', '\u{10c5}'),
+        ('\u{10c7}', '\u{10c7}'),
+        ('\u{10cd}', '\u{10cd}'),
+        ('\u{10d0}', '\u{10fa}'),
+        ('\u{10fc}', '\u{1248}'),
+        ('\u{124a}', '\u{124d}'),
+        ('\u{1250}', '\u{1256}'),
+        ('\u{1258}', '\u{1258}'),
+        ('\u{125a}', '\u{125d}'),
+        ('\u{1260}', '\u{1288}'),
+        ('\u{128a}', '\u{128d}'),
+        ('\u{1290}', '\u{12b0}'),
+        ('\u{12b2}', '\u{12b5}'),
+        ('\u{12b8}', '\u{12be}'),
+        ('\u{12c0}', '\u{12c0}'),
+        ('\u{12c2}', '\u{12c5}'),
+        ('\u{12c8}', '\u{12d6}'),
+        ('\u{12d8}', '\u{1310}'),
+        ('\u{1312}', '\u{1315}'),
+        ('\u{1318}', '\u{135a}'),
+        ('\u{1380}', '\u{138f}'),
+        ('\u{13a0}', '\u{13f5}'),
+        ('\u{13f8}', '\u{13fd}'),
+        ('\u{1401}', '\u{166c}'),
+        ('\u{166f}', '\u{167f}'),
+        ('\u{1681}', '\u{169a}'),
+        ('\u{16a0}', '\u{16ea}'),
+        ('\u{16ee}', '\u{16f8}'),
+        ('\u{1700}', '\u{170c}'),
+        ('\u{170e}', '\u{1711}'),
+        ('\u{1720}', '\u{1731}'),
+        ('\u{1740}', '\u{1751}'),
+        ('\u{1760}', '\u{176c}'),
+        ('\u{176e}', '\u{1770}'),
+        ('\u{1780}', '\u{17b3}'),
+        ('\u{17d7}', '\u{17d7}'),
+        ('\u{17dc}', '\u{17dc}'),
+        ('\u{1820}', '\u{1878}'),
+        ('\u{1880}', '\u{18a8}'),
+        ('\u{18aa}', '\u{18aa}'),
+        ('\u{18b0}', '\u{18f5}'),
+        ('\u{1900}', '\u{191e}'),
+        ('\u{1950}', '\u{196d}'),
+        ('\u{1970}', '\u{1974}'),
+        ('\u{1980}', '\u{19ab}'),
+        ('\u{19b0}', '\u{19c9}'),
+        ('\u{1a00}', '\u{1a16}'),
+        ('\u{1a20}', '\u{1a54}'),
+        ('\u{1aa7}', '\u{1aa7}'),
+        ('\u{1b05}', '\u{1b33}'),
+        ('\u{1b45}', '\u{1b4b}'),
+        ('\u{1b83}', '\u{1ba0}'),
+        ('\u{1bae}', '\u{1baf}'),
+        ('\u{1bba}', '\u{1be5}'),
+        ('\u{1c00}', '\u{1c23}'),
+        ('\u{1c4d}', '\u{1c4f}'),
+        ('\u{1c5a}', '\u{1c7d}'),
+        ('\u{1c80}', '\u{1c88}'),
+        ('\u{1c90}', '\u{1cba}'),
+        ('\u{1cbd}', '\u{1cbf}'),
+        ('\u{1ce9}', '\u{1cec}'),
+        ('\u{1cee}', '\u{1cf3}'),
+        ('\u{1cf5}', '\u{1cf6}'),
+        ('\u{1cfa}', '\u{1cfa}'),
+        ('\u{1d00}', '\u{1dbf}'),
+        ('\u{1e00}', '\u{1f15}'),
+        ('\u{1f18}', '\u{1f1d}'),
+        ('\u{1f20}', '\u{1f45}'),
+        ('\u{1f48}', '\u{1f4d}'),
+        ('\u{1f50}', '\u{1f57}'),
+        ('\u{1f59}', '\u{1f59}'),
+        ('\u{1f5b}', '\u{1f5b}'),
+        ('\u{1f5d}', '\u{1f5d}'),
+        ('\u{1f5f}', '\u{1f7d}'),
+        ('\u{1f80}', '\u{1fb4}'),
+        ('\u{1fb6}', '\u{1fbc}'),
+        ('\u{1fbe}', '\u{1fbe}'),
+        ('\u{1fc2}', '\u{1fc4}'),
+        ('\u{1fc6}', '\u{1fcc}'),
+        ('\u{1fd0}', '\u{1fd3}'),
+        ('\u{1fd6}', '\u{1fdb}'),
+        ('\u{1fe0}', '\u{1fec}'),
+        ('\u{1ff2}', '\u{1ff4}'),
+        ('\u{1ff6}', '\u{1ffc}'),
+        ('\u{2071}', '\u{2071}'),
+        ('\u{207f}', '\u{207f}'),
+        ('\u{2090}', '\u{209c}'),
+        ('\u{2102}', '\u{2102}'),
+        ('\u{2107}', '\u{2107}'),
+        ('\u{210a}', '\u{2113}'),
+        ('\u{2115}', '\u{2115}'),
+        ('\u{2118}', '\u{211d}'),
+        ('\u{2124}', '\u{2124}'),
+        ('\u{2126}', '\u{2126}'),
+        ('\u{2128}', '\u{2128}'),
+        ('\u{212a}', '\u{2139}'),
+        ('\u{213c}', '\u{213f}'),
+        ('\u{2145}', '\u{2149}'),
+        ('\u{214e}', '\u{214e}'),
+        ('\u{2160}', '\u{2188}'),
+        ('\u{2c00}', '\u{2c2e}'),
+        ('\u{2c30}', '\u{2c5e}'),
+        ('\u{2c60}', '\u{2ce4}'),
+        ('\u{2ceb}', '\u{2cee}'),
+        ('\u{2cf2}', '\u{2cf3}'),
+        ('\u{2d00}', '\u{2d25}'),
+        ('\u{2d27}', '\u{2d27}'),
+        ('\u{2d2d}', '\u{2d2d}'),
+        ('\u{2d30}', '\u{2d67}'),
+        ('\u{2d6f}', '\u{2d6f}'),
+        ('\u{2d80}', '\u{2d96}'),
+        ('\u{2da0}', '\u{2da6}'),
+        ('\u{2da8}', '\u{2dae}'),
+        ('\u{2db0}', '\u{2db6}'),
+        ('\u{2db8}', '\u{2dbe}'),
+        ('\u{2dc0}', '\u{2dc6}'),
+        ('\u{2dc8}', '\u{2dce}'),
+        ('\u{2dd0}', '\u{2dd6}'),
+        ('\u{2dd8}', '\u{2dde}'),
+        ('\u{3005}', '\u{3007}'),
+        ('\u{3021}', '\u{3029}'),
+        ('\u{3031}', '\u{3035}'),
+        ('\u{3038}', '\u{303c}'),
+        ('\u{3041}', '\u{3096}'),
+        ('\u{309d}', '\u{309f}'),
+        ('\u{30a1}', '\u{30fa}'),
+        ('\u{30fc}', '\u{30ff}'),
+        ('\u{3105}', '\u{312f}'),
+        ('\u{3131}', '\u{318e}'),
+        ('\u{31a0}', '\u{31bf}'),
+        ('\u{31f0}', '\u{31ff}'),
+        ('\u{3400}', '\u{4dbf}'),
+        ('\u{4e00}', '\u{9ffc}'),
+        ('\u{a000}', '\u{a48c}'),
+        ('\u{a4d0}', '\u{a4fd}'),
+        ('\u{a500}', '\u{a60c}'),
+        ('\u{a610}', '\u{a61f}'),
+        ('\u{a62a}', '\u{a62b}'),
+        ('\u{a640}', '\u{a66e}'),
+        ('\u{a67f}', '\u{a69d}'),
+        ('\u{a6a0}', '\u{a6ef}'),
+        ('\u{a717}', '\u{a71f}'),
+        ('\u{a722}', '\u{a788}'),
+        ('\u{a78b}', '\u{a7bf}'),
+        ('\u{a7c2}', '\u{a7ca}'),
+        ('\u{a7f5}', '\u{a801}'),
+        ('\u{a803}', '\u{a805}'),
+        ('\u{a807}', '\u{a80a}'),
+        ('\u{a80c}', '\u{a822}'),
+        ('\u{a840}', '\u{a873}'),
+        ('\u{a882}', '\u{a8b3}'),
+        ('\u{a8f2}', '\u{a8f7}'),
+        ('\u{a8fb}', '\u{a8fb}'),
+        ('\u{a8fd}', '\u{a8fe}'),
+        ('\u{a90a}', '\u{a925}'),
+        ('\u{a930}', '\u{a946}'),
+        ('\u{a960}', '\u{a97c}'),
+        ('\u{a984}', '\u{a9b2}'),
+        ('\u{a9cf}', '\u{a9cf}'),
+        ('\u{a9e0}', '\u{a9e4}'),
+        ('\u{a9e6}', '\u{a9ef}'),
+        ('\u{a9fa}', '\u{a9fe}'),
+        ('\u{aa00}', '\u{aa28}'),
+        ('\u{aa40}', '\u{aa42}'),
+        ('\u{aa44}', '\u{aa4b}'),
+        ('\u{aa60}', '\u{aa76}'),
+        ('\u{aa7a}', '\u{aa7a}'),
+        ('\u{aa7e}', '\u{aaaf}'),
+        ('\u{aab1}', '\u{aab1}'),
+        ('\u{aab5}', '\u{aab6}'),
+        ('\u{aab9}', '\u{aabd}'),
+        ('\u{aac0}', '\u{aac0}'),
+        ('\u{aac2}', '\u{aac2}'),
+        ('\u{aadb}', '\u{aadd}'),
+        ('\u{aae0}', '\u{aaea}'),
+        ('\u{aaf2}', '\u{aaf4}'),
+        ('\u{ab01}', '\u{ab06}'),
+        ('\u{ab09}', '\u{ab0e}'),
+        ('\u{ab11}', '\u{ab16}'),
+        ('\u{ab20}', '\u{ab26}'),
+        ('\u{ab28}', '\u{ab2e}'),
+        ('\u{ab30}', '\u{ab5a}'),
+        ('\u{ab5c}', '\u{ab69}'),
+        ('\u{ab70}', '\u{abe2}'),
+        ('\u{ac00}', '\u{d7a3}'),
+        ('\u{d7b0}', '\u{d7c6}'),
+        ('\u{d7cb}', '\u{d7fb}'),
+        ('\u{f900}', '\u{fa6d}'),
+        ('\u{fa70}', '\u{fad9}'),
+        ('\u{fb00}', '\u{fb06}'),
+        ('\u{fb13}', '\u{fb17}'),
+        ('\u{fb1d}', '\u{fb1d}'),
+        ('\u{fb1f}', '\u{fb28}'),
+        ('\u{fb2a}', '\u{fb36}'),
+        ('\u{fb38}', '\u{fb3c}'),
+        ('\u{fb3e}', '\u{fb3e}'),
+        ('\u{fb40}', '\u{fb41}'),
+        ('\u{fb43}', '\u{fb44}'),
+        ('\u{fb46}', '\u{fbb1}'),
+        ('\u{fbd3}', '\u{fc5d}'),
+        ('\u{fc64}', '\u{fd3d}'),
+        ('\u{fd50}', '\u{fd8f}'),
+        ('\u{fd92}', '\u{fdc7}'),
+        ('\u{fdf0}', '\u{fdf9}'),
+        ('\u{fe71}', '\u{fe71}'),
+        ('\u{fe73}', '\u{fe73}'),
+        ('\u{fe77}', '\u{fe77}'),
+        ('\u{fe79}', '\u{fe79}'),
+        ('\u{fe7b}', '\u{fe7b}'),
+        ('\u{fe7d}', '\u{fe7d}'),
+        ('\u{fe7f}', '\u{fefc}'),
+        ('\u{ff21}', '\u{ff3a}'),
+        ('\u{ff41}', '\u{ff5a}'),
+        ('\u{ff66}', '\u{ff9d}'),
+        ('\u{ffa0}', '\u{ffbe}'),
+        ('\u{ffc2}', '\u{ffc7}'),
+        ('\u{ffca}', '\u{ffcf}'),
+        ('\u{ffd2}', '\u{ffd7}'),
+        ('\u{ffda}', '\u{ffdc}'),
+        ('\u{10000}', '\u{1000b}'),
+        ('\u{1000d}', '\u{10026}'),
+        ('\u{10028}', '\u{1003a}'),
+        ('\u{1003c}', '\u{1003d}'),
+        ('\u{1003f}', '\u{1004d}'),
+        ('\u{10050}', '\u{1005d}'),
+        ('\u{10080}', '\u{100fa}'),
+        ('\u{10140}', '\u{10174}'),
+        ('\u{10280}', '\u{1029c}'),
+        ('\u{102a0}', '\u{102d0}'),
+        ('\u{10300}', '\u{1031f}'),
+        ('\u{1032d}', '\u{1034a}'),
+        ('\u{10350}', '\u{10375}'),
+        ('\u{10380}', '\u{1039d}'),
+        ('\u{103a0}', '\u{103c3}'),
+        ('\u{103c8}', '\u{103cf}'),
+        ('\u{103d1}', '\u{103d5}'),
+        ('\u{10400}', '\u{1049d}'),
+        ('\u{104b0}', '\u{104d3}'),
+        ('\u{104d8}', '\u{104fb}'),
+        ('\u{10500}', '\u{10527}'),
+        ('\u{10530}', '\u{10563}'),
+        ('\u{10600}', '\u{10736}'),
+        ('\u{10740}', '\u{10755}'),
+        ('\u{10760}', '\u{10767}'),
+        ('\u{10800}', '\u{10805}'),
+        ('\u{10808}', '\u{10808}'),
+        ('\u{1080a}', '\u{10835}'),
+        ('\u{10837}', '\u{10838}'),
+        ('\u{1083c}', '\u{1083c}'),
+        ('\u{1083f}', '\u{10855}'),
+        ('\u{10860}', '\u{10876}'),
+        ('\u{10880}', '\u{1089e}'),
+        ('\u{108e0}', '\u{108f2}'),
+        ('\u{108f4}', '\u{108f5}'),
+        ('\u{10900}', '\u{10915}'),
+        ('\u{10920}', '\u{10939}'),
+        ('\u{10980}', '\u{109b7}'),
+        ('\u{109be}', '\u{109bf}'),
+        ('\u{10a00}', '\u{10a00}'),
+        ('\u{10a10}', '\u{10a13}'),
+        ('\u{10a15}', '\u{10a17}'),
+        ('\u{10a19}', '\u{10a35}'),
+        ('\u{10a60}', '\u{10a7c}'),
+        ('\u{10a80}', '\u{10a9c}'),
+        ('\u{10ac0}', '\u{10ac7}'),
+        ('\u{10ac9}', '\u{10ae4}'),
+        ('\u{10b00}', '\u{10b35}'),
+        ('\u{10b40}', '\u{10b55}'),
+        ('\u{10b60}', '\u{10b72}'),
+        ('\u{10b80}', '\u{10b91}'),
+        ('\u{10c00}', '\u{10c48}'),
+        ('\u{10c80}', '\u{10cb2}'),
+        ('\u{10cc0}', '\u{10cf2}'),
+        ('\u{10d00}', '\u{10d23}'),
+        ('\u{10e80}', '\u{10ea9}'),
+        ('\u{10eb0}', '\u{10eb1}'),
+        ('\u{10f00}', '\u{10f1c}'),
+        ('\u{10f27}', '\u{10f27}'),
+        ('\u{10f30}', '\u{10f45}'),
+        ('\u{10fb0}', '\u{10fc4}'),
+        ('\u{10fe0}', '\u{10ff6}'),
+        ('\u{11003}', '\u{11037}'),
+        ('\u{11083}', '\u{110af}'),
+        ('\u{110d0}', '\u{110e8}'),
+        ('\u{11103}', '\u{11126}'),
+        ('\u{11144}', '\u{11144}'),
+        ('\u{11147}', '\u{11147}'),
+        ('\u{11150}', '\u{11172}'),
+        ('\u{11176}', '\u{11176}'),
+        ('\u{11183}', '\u{111b2}'),
+        ('\u{111c1}', '\u{111c4}'),
+        ('\u{111da}', '\u{111da}'),
+        ('\u{111dc}', '\u{111dc}'),
+        ('\u{11200}', '\u{11211}'),
+        ('\u{11213}', '\u{1122b}'),
+        ('\u{11280}', '\u{11286}'),
+        ('\u{11288}', '\u{11288}'),
+        ('\u{1128a}', '\u{1128d}'),
+        ('\u{1128f}', '\u{1129d}'),
+        ('\u{1129f}', '\u{112a8}'),
+        ('\u{112b0}', '\u{112de}'),
+        ('\u{11305}', '\u{1130c}'),
+        ('\u{1130f}', '\u{11310}'),
+        ('\u{11313}', '\u{11328}'),
+        ('\u{1132a}', '\u{11330}'),
+        ('\u{11332}', '\u{11333}'),
+        ('\u{11335}', '\u{11339}'),
+        ('\u{1133d}', '\u{1133d}'),
+        ('\u{11350}', '\u{11350}'),
+        ('\u{1135d}', '\u{11361}'),
+        ('\u{11400}', '\u{11434}'),
+        ('\u{11447}', '\u{1144a}'),
+        ('\u{1145f}', '\u{11461}'),
+        ('\u{11480}', '\u{114af}'),
+        ('\u{114c4}', '\u{114c5}'),
+        ('\u{114c7}', '\u{114c7}'),
+        ('\u{11580}', '\u{115ae}'),
+        ('\u{115d8}', '\u{115db}'),
+        ('\u{11600}', '\u{1162f}'),
+        ('\u{11644}', '\u{11644}'),
+        ('\u{11680}', '\u{116aa}'),
+        ('\u{116b8}', '\u{116b8}'),
+        ('\u{11700}', '\u{1171a}'),
+        ('\u{11800}', '\u{1182b}'),
+        ('\u{118a0}', '\u{118df}'),
+        ('\u{118ff}', '\u{11906}'),
+        ('\u{11909}', '\u{11909}'),
+        ('\u{1190c}', '\u{11913}'),
+        ('\u{11915}', '\u{11916}'),
+        ('\u{11918}', '\u{1192f}'),
+        ('\u{1193f}', '\u{1193f}'),
+        ('\u{11941}', '\u{11941}'),
+        ('\u{119a0}', '\u{119a7}'),
+        ('\u{119aa}', '\u{119d0}'),
+        ('\u{119e1}', '\u{119e1}'),
+        ('\u{119e3}', '\u{119e3}'),
+        ('\u{11a00}', '\u{11a00}'),
+        ('\u{11a0b}', '\u{11a32}'),
+        ('\u{11a3a}', '\u{11a3a}'),
+        ('\u{11a50}', '\u{11a50}'),
+        ('\u{11a5c}', '\u{11a89}'),
+        ('\u{11a9d}', '\u{11a9d}'),
+        ('\u{11ac0}', '\u{11af8}'),
+        ('\u{11c00}', '\u{11c08}'),
+        ('\u{11c0a}', '\u{11c2e}'),
+        ('\u{11c40}', '\u{11c40}'),
+        ('\u{11c72}', '\u{11c8f}'),
+        ('\u{11d00}', '\u{11d06}'),
+        ('\u{11d08}', '\u{11d09}'),
+        ('\u{11d0b}', '\u{11d30}'),
+        ('\u{11d46}', '\u{11d46}'),
+        ('\u{11d60}', '\u{11d65}'),
+        ('\u{11d67}', '\u{11d68}'),
+        ('\u{11d6a}', '\u{11d89}'),
+        ('\u{11d98}', '\u{11d98}'),
+        ('\u{11ee0}', '\u{11ef2}'),
+        ('\u{11fb0}', '\u{11fb0}'),
+        ('\u{12000}', '\u{12399}'),
+        ('\u{12400}', '\u{1246e}'),
+        ('\u{12480}', '\u{12543}'),
+        ('\u{13000}', '\u{1342e}'),
+        ('\u{14400}', '\u{14646}'),
+        ('\u{16800}', '\u{16a38}'),
+        ('\u{16a40}', '\u{16a5e}'),
+        ('\u{16ad0}', '\u{16aed}'),
+        ('\u{16b00}', '\u{16b2f}'),
+        ('\u{16b40}', '\u{16b43}'),
+        ('\u{16b63}', '\u{16b77}'),
+        ('\u{16b7d}', '\u{16b8f}'),
+        ('\u{16e40}', '\u{16e7f}'),
+        ('\u{16f00}', '\u{16f4a}'),
+        ('\u{16f50}', '\u{16f50}'),
+        ('\u{16f93}', '\u{16f9f}'),
+        ('\u{16fe0}', '\u{16fe1}'),
+        ('\u{16fe3}', '\u{16fe3}'),
+        ('\u{17000}', '\u{187f7}'),
+        ('\u{18800}', '\u{18cd5}'),
+        ('\u{18d00}', '\u{18d08}'),
+        ('\u{1b000}', '\u{1b11e}'),
+        ('\u{1b150}', '\u{1b152}'),
+        ('\u{1b164}', '\u{1b167}'),
+        ('\u{1b170}', '\u{1b2fb}'),
+        ('\u{1bc00}', '\u{1bc6a}'),
+        ('\u{1bc70}', '\u{1bc7c}'),
+        ('\u{1bc80}', '\u{1bc88}'),
+        ('\u{1bc90}', '\u{1bc99}'),
+        ('\u{1d400}', '\u{1d454}'),
+        ('\u{1d456}', '\u{1d49c}'),
+        ('\u{1d49e}', '\u{1d49f}'),
+        ('\u{1d4a2}', '\u{1d4a2}'),
+        ('\u{1d4a5}', '\u{1d4a6}'),
+        ('\u{1d4a9}', '\u{1d4ac}'),
+        ('\u{1d4ae}', '\u{1d4b9}'),
+        ('\u{1d4bb}', '\u{1d4bb}'),
+        ('\u{1d4bd}', '\u{1d4c3}'),
+        ('\u{1d4c5}', '\u{1d505}'),
+        ('\u{1d507}', '\u{1d50a}'),
+        ('\u{1d50d}', '\u{1d514}'),
+        ('\u{1d516}', '\u{1d51c}'),
+        ('\u{1d51e}', '\u{1d539}'),
+        ('\u{1d53b}', '\u{1d53e}'),
+        ('\u{1d540}', '\u{1d544}'),
+        ('\u{1d546}', '\u{1d546}'),
+        ('\u{1d54a}', '\u{1d550}'),
+        ('\u{1d552}', '\u{1d6a5}'),
+        ('\u{1d6a8}', '\u{1d6c0}'),
+        ('\u{1d6c2}', '\u{1d6da}'),
+        ('\u{1d6dc}', '\u{1d6fa}'),
+        ('\u{1d6fc}', '\u{1d714}'),
+        ('\u{1d716}', '\u{1d734}'),
+        ('\u{1d736}', '\u{1d74e}'),
+        ('\u{1d750}', '\u{1d76e}'),
+        ('\u{1d770}', '\u{1d788}'),
+        ('\u{1d78a}', '\u{1d7a8}'),
+        ('\u{1d7aa}', '\u{1d7c2}'),
+        ('\u{1d7c4}', '\u{1d7cb}'),
+        ('\u{1e100}', '\u{1e12c}'),
+        ('\u{1e137}', '\u{1e13d}'),
+        ('\u{1e14e}', '\u{1e14e}'),
+        ('\u{1e2c0}', '\u{1e2eb}'),
+        ('\u{1e800}', '\u{1e8c4}'),
+        ('\u{1e900}', '\u{1e943}'),
+        ('\u{1e94b}', '\u{1e94b}'),
+        ('\u{1ee00}', '\u{1ee03}'),
+        ('\u{1ee05}', '\u{1ee1f}'),
+        ('\u{1ee21}', '\u{1ee22}'),
+        ('\u{1ee24}', '\u{1ee24}'),
+        ('\u{1ee27}', '\u{1ee27}'),
+        ('\u{1ee29}', '\u{1ee32}'),
+        ('\u{1ee34}', '\u{1ee37}'),
+        ('\u{1ee39}', '\u{1ee39}'),
+        ('\u{1ee3b}', '\u{1ee3b}'),
+        ('\u{1ee42}', '\u{1ee42}'),
+        ('\u{1ee47}', '\u{1ee47}'),
+        ('\u{1ee49}', '\u{1ee49}'),
+        ('\u{1ee4b}', '\u{1ee4b}'),
+        ('\u{1ee4d}', '\u{1ee4f}'),
+        ('\u{1ee51}', '\u{1ee52}'),
+        ('\u{1ee54}', '\u{1ee54}'),
+        ('\u{1ee57}', '\u{1ee57}'),
+        ('\u{1ee59}', '\u{1ee59}'),
+        ('\u{1ee5b}', '\u{1ee5b}'),
+        ('\u{1ee5d}', '\u{1ee5d}'),
+        ('\u{1ee5f}', '\u{1ee5f}'),
+        ('\u{1ee61}', '\u{1ee62}'),
+        ('\u{1ee64}', '\u{1ee64}'),
+        ('\u{1ee67}', '\u{1ee6a}'),
+        ('\u{1ee6c}', '\u{1ee72}'),
+        ('\u{1ee74}', '\u{1ee77}'),
+        ('\u{1ee79}', '\u{1ee7c}'),
+        ('\u{1ee7e}', '\u{1ee7e}'),
+        ('\u{1ee80}', '\u{1ee89}'),
+        ('\u{1ee8b}', '\u{1ee9b}'),
+        ('\u{1eea1}', '\u{1eea3}'),
+        ('\u{1eea5}', '\u{1eea9}'),
+        ('\u{1eeab}', '\u{1eebb}'),
+        ('\u{20000}', '\u{2a6dd}'),
+        ('\u{2a700}', '\u{2b734}'),
+        ('\u{2b740}', '\u{2b81d}'),
+        ('\u{2b820}', '\u{2cea1}'),
+        ('\u{2ceb0}', '\u{2ebe0}'),
+        ('\u{2f800}', '\u{2fa1d}'),
+        ('\u{30000}', '\u{3134a}'),
+    ];
+
+    pub fn XID_Start(c: char) -> bool {
+        super::bsearch_range_table(c, XID_Start_table)
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/storage.js b/api-docs/m_captcha/0.1.2/storage.js new file mode 100644 index 0000000..318275e --- /dev/null +++ b/api-docs/m_captcha/0.1.2/storage.js @@ -0,0 +1 @@ +var resourcesSuffix="";var darkThemes=["dark","ayu"];var currentTheme=document.getElementById("themeStyle");var mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed!==true){for(i=0;i=0;--i){if(func(arr[i])===true){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function hasOwnProperty(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function usableLocalStorage(){if(typeof Storage==="undefined"){return false}try{return window.localStorage!==null&&window.localStorage!==undefined}catch(err){return false}}function updateLocalStorage(name,value){if(usableLocalStorage()){localStorage[name]=value}else{}}function getCurrentValue(name){if(usableLocalStorage()&&localStorage[name]!==undefined){return localStorage[name]}return null}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){var fullBasicCss="rustdoc"+resourcesSuffix+".css";var fullNewTheme=newTheme+resourcesSuffix+".css";var newHref=mainStyleElem.href.replace(fullBasicCss,fullNewTheme);if(saveTheme===true){updateLocalStorage("rustdoc-theme",newTheme)}if(styleElem.href===newHref){return}var found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),function(el){savedHref.push(el.href)})}onEach(savedHref,function(el){if(el===newHref){found=true;return true}});if(found===true){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("rustdoc-use-system-theme",value);var toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}var updateSystemTheme=(function(){if(!window.matchMedia){return function(){let cssTheme=getComputedStyle(document.documentElement).getPropertyValue('content');switchTheme(currentTheme,mainTheme,JSON.parse(cssTheme)||light,true)}}var mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){if(getSettingValue("use-system-theme")!=="false"){var lightTheme=getSettingValue("preferred-light-theme")||"light";var darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){switchTheme(currentTheme,mainTheme,darkTheme,true)}else{switchTheme(currentTheme,mainTheme,lightTheme,true)}}}mql.addListener(handlePreferenceChange);return function(){handlePreferenceChange(mql)}})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(currentTheme,mainTheme,getSettingValue("theme")||"light",false)} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/theme.js b/api-docs/m_captcha/0.1.2/theme.js new file mode 100644 index 0000000..8f9c49a --- /dev/null +++ b/api-docs/m_captcha/0.1.2/theme.js @@ -0,0 +1 @@ +var themes=document.getElementById("theme-choices");var themePicker=document.getElementById("theme-picker");function showThemeButtonState(){themes.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){themes.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}function switchThemeButtonState(){if(themes.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}};function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!=="theme-picker"&&(!active.parentNode||active.parentNode.id!=="theme-choices")&&(!related||(related.id!=="theme-picker"&&(!related.parentNode||related.parentNode.id!=="theme-choices")))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;["ayu","dark","light"].forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(el){switchTheme(currentTheme,mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themes.appendChild(but)}) \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/unicode_xid/all.html b/api-docs/m_captcha/0.1.2/unicode_xid/all.html new file mode 100644 index 0000000..9b081a3 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/unicode_xid/all.html @@ -0,0 +1,4 @@ +List of all items in this crate

[] + + List of all items

Traits

Constants

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/unicode_xid/constant.UNICODE_VERSION.html b/api-docs/m_captcha/0.1.2/unicode_xid/constant.UNICODE_VERSION.html new file mode 100644 index 0000000..bbed5ce --- /dev/null +++ b/api-docs/m_captcha/0.1.2/unicode_xid/constant.UNICODE_VERSION.html @@ -0,0 +1,4 @@ +unicode_xid::UNICODE_VERSION - Rust

[][src]Constant unicode_xid::UNICODE_VERSION

pub const UNICODE_VERSION: (u64, u64, u64);

The version of Unicode +that this version of unicode-xid is based on.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/unicode_xid/index.html b/api-docs/m_captcha/0.1.2/unicode_xid/index.html new file mode 100644 index 0000000..06cde42 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/unicode_xid/index.html @@ -0,0 +1,22 @@ +unicode_xid - Rust

[][src]Crate unicode_xid

Determine if a char is a valid identifier for a parser and/or lexer according to +Unicode Standard Annex #31 rules.

+ +
+extern crate unicode_xid;
+
+use unicode_xid::UnicodeXID;
+
+fn main() {
+    let ch = 'a';
+    println!("Is {} a valid start of an identifier? {}", ch, UnicodeXID::is_xid_start(ch));
+}
+

features

+

unicode-xid supports a no_std feature. This eliminates dependence +on std, and instead uses equivalent functions from core.

+

Constants

+
UNICODE_VERSION

The version of Unicode +that this version of unicode-xid is based on.

+

Traits

+
UnicodeXID

Methods for determining if a character is a valid identifier character.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/unicode_xid/sidebar-items.js b/api-docs/m_captcha/0.1.2/unicode_xid/sidebar-items.js new file mode 100644 index 0000000..d23714a --- /dev/null +++ b/api-docs/m_captcha/0.1.2/unicode_xid/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["UNICODE_VERSION","The version of Unicode that this version of unicode-xid is based on."]],"trait":[["UnicodeXID","Methods for determining if a character is a valid identifier character."]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/unicode_xid/tables/constant.UNICODE_VERSION.html b/api-docs/m_captcha/0.1.2/unicode_xid/tables/constant.UNICODE_VERSION.html new file mode 100644 index 0000000..b67c5aa --- /dev/null +++ b/api-docs/m_captcha/0.1.2/unicode_xid/tables/constant.UNICODE_VERSION.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../unicode_xid/constant.UNICODE_VERSION.html...

+ + + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/unicode_xid/trait.UnicodeXID.html b/api-docs/m_captcha/0.1.2/unicode_xid/trait.UnicodeXID.html new file mode 100644 index 0000000..096daf6 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/unicode_xid/trait.UnicodeXID.html @@ -0,0 +1,16 @@ +unicode_xid::UnicodeXID - Rust

[][src]Trait unicode_xid::UnicodeXID

pub trait UnicodeXID {
+    fn is_xid_start(self) -> bool;
+
fn is_xid_continue(self) -> bool; +}

Methods for determining if a character is a valid identifier character.

+

Required methods

fn is_xid_start(self) -> bool[src]

Returns whether the specified character satisfies the 'XID_Start' +Unicode property.

+

'XID_Start' is a Unicode Derived Property specified in +UAX #31, +mostly similar to ID_Start but modified for closure under NFKx.

+

fn is_xid_continue(self) -> bool[src]

Returns whether the specified char satisfies the 'XID_Continue' +Unicode property.

+

'XID_Continue' is a Unicode Derived Property specified in +UAX #31, +mostly similar to 'ID_Continue' but modified for closure under NFKx.

+
Loading content...

Implementors

impl UnicodeXID for char[src]

Loading content...
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.2/wheel.svg b/api-docs/m_captcha/0.1.2/wheel.svg new file mode 100644 index 0000000..01da3b2 --- /dev/null +++ b/api-docs/m_captcha/0.1.2/wheel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/COPYRIGHT.txt b/api-docs/m_captcha/0.1.3/COPYRIGHT.txt new file mode 100644 index 0000000..af77776 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/COPYRIGHT.txt @@ -0,0 +1,45 @@ +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif Pro (SourceSerifPro-Regular.ttf.woff, + SourceSerifPro-Bold.ttf.woff, SourceSerifPro-It.ttf.woff): + + Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with + Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of + Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerifPro-LICENSE.txt. + +This copyright file is intended to be distributed with rustdoc output. diff --git a/api-docs/m_captcha/0.1.3/FiraSans-LICENSE.txt b/api-docs/m_captcha/0.1.3/FiraSans-LICENSE.txt new file mode 100644 index 0000000..d444ea9 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/FiraSans-LICENSE.txt @@ -0,0 +1,94 @@ +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/m_captcha/0.1.3/FiraSans-Medium.woff b/api-docs/m_captcha/0.1.3/FiraSans-Medium.woff new file mode 100644 index 0000000..7d742c5 Binary files /dev/null and b/api-docs/m_captcha/0.1.3/FiraSans-Medium.woff differ diff --git a/api-docs/m_captcha/0.1.3/FiraSans-Regular.woff b/api-docs/m_captcha/0.1.3/FiraSans-Regular.woff new file mode 100644 index 0000000..d8e0363 Binary files /dev/null and b/api-docs/m_captcha/0.1.3/FiraSans-Regular.woff differ diff --git a/api-docs/m_captcha/0.1.3/LICENSE-APACHE.txt b/api-docs/m_captcha/0.1.3/LICENSE-APACHE.txt new file mode 100644 index 0000000..16fe87b --- /dev/null +++ b/api-docs/m_captcha/0.1.3/LICENSE-APACHE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/api-docs/m_captcha/0.1.3/LICENSE-MIT.txt b/api-docs/m_captcha/0.1.3/LICENSE-MIT.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/LICENSE-MIT.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/api-docs/m_captcha/0.1.3/SourceCodePro-LICENSE.txt b/api-docs/m_captcha/0.1.3/SourceCodePro-LICENSE.txt new file mode 100644 index 0000000..0754257 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/SourceCodePro-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/m_captcha/0.1.3/SourceCodePro-Regular.woff b/api-docs/m_captcha/0.1.3/SourceCodePro-Regular.woff new file mode 100644 index 0000000..5576670 Binary files /dev/null and b/api-docs/m_captcha/0.1.3/SourceCodePro-Regular.woff differ diff --git a/api-docs/m_captcha/0.1.3/SourceCodePro-Semibold.woff b/api-docs/m_captcha/0.1.3/SourceCodePro-Semibold.woff new file mode 100644 index 0000000..ca972a1 Binary files /dev/null and b/api-docs/m_captcha/0.1.3/SourceCodePro-Semibold.woff differ diff --git a/api-docs/m_captcha/0.1.3/SourceSerifPro-Bold.ttf.woff b/api-docs/m_captcha/0.1.3/SourceSerifPro-Bold.ttf.woff new file mode 100644 index 0000000..ca25431 Binary files /dev/null and b/api-docs/m_captcha/0.1.3/SourceSerifPro-Bold.ttf.woff differ diff --git a/api-docs/m_captcha/0.1.3/SourceSerifPro-It.ttf.woff b/api-docs/m_captcha/0.1.3/SourceSerifPro-It.ttf.woff new file mode 100644 index 0000000..a287bbe Binary files /dev/null and b/api-docs/m_captcha/0.1.3/SourceSerifPro-It.ttf.woff differ diff --git a/api-docs/m_captcha/0.1.3/SourceSerifPro-LICENSE.md b/api-docs/m_captcha/0.1.3/SourceSerifPro-LICENSE.md new file mode 100644 index 0000000..22cb755 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/SourceSerifPro-LICENSE.md @@ -0,0 +1,93 @@ +Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/m_captcha/0.1.3/SourceSerifPro-Regular.ttf.woff b/api-docs/m_captcha/0.1.3/SourceSerifPro-Regular.ttf.woff new file mode 100644 index 0000000..a3d55cf Binary files /dev/null and b/api-docs/m_captcha/0.1.3/SourceSerifPro-Regular.ttf.woff differ diff --git a/api-docs/m_captcha/0.1.3/ayu.css b/api-docs/m_captcha/0.1.3/ayu.css new file mode 100644 index 0000000..096f6f3 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/ayu.css @@ -0,0 +1 @@ + body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod){border-bottom-color:#5c6773;}h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}code{color:#ffb454;}h3>code,h4>code,h5>code{color:#e6e1cf;}pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#5c6773;}.docblock table,.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.content .highlighted{color:#000 !important;background-color:#c6afb3;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted{background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a span.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}.collapse-toggle{color:#999;}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-focus:disabled{color:#929292;}.module-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background-color:transparent;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help>div>span{border-bottom-color:#5c6773;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.content .highlighted.mod,.content .highlighted.externcrate{}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content .highlighted.trait{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content .highlighted.traitalias{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}.content .highlighted.foreigntype{}pre.rust .lifetime{}.content .highlighted.primitive{}.content .highlighted.constant,.content .highlighted.static{}.stab.unstable{}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content .highlighted.enum{}.content .highlighted.struct{}.content .highlighted.keyword{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{}.stab.portability{}.content .highlighted.union{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}.content .highlighted.type{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results td span.alias{color:#c5c5c5;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/brush.svg b/api-docs/m_captcha/0.1.3/brush.svg new file mode 100644 index 0000000..ea266e8 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/brush.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/cfg_if/all.html b/api-docs/m_captcha/0.1.3/cfg_if/all.html new file mode 100644 index 0000000..fb218fa --- /dev/null +++ b/api-docs/m_captcha/0.1.3/cfg_if/all.html @@ -0,0 +1,6 @@ +List of all items in this crate + +

[] + + List of all items

Macros

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/cfg_if/index.html b/api-docs/m_captcha/0.1.3/cfg_if/index.html new file mode 100644 index 0000000..3ec7309 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/cfg_if/index.html @@ -0,0 +1,25 @@ +cfg_if - Rust + +

[][src]Crate cfg_if

A macro for defining #[cfg] if-else statements.

+

The macro provided by this crate, cfg_if, is similar to the if/elif C +preprocessor macro by allowing definition of a cascade of #[cfg] cases, +emitting the implementation which matches first.

+

This allows you to conveniently provide a long list #[cfg]'d blocks of code +without having to rewrite each clause multiple times.

+

Example

+
+cfg_if::cfg_if! {
+    if #[cfg(unix)] {
+        fn foo() { /* unix specific functionality */ }
+    } else if #[cfg(target_pointer_width = "32")] {
+        fn foo() { /* non-unix, 32-bit functionality */ }
+    } else {
+        fn foo() { /* fallback implementation */ }
+    }
+}
+
+

Macros

+
cfg_if

The main macro provided by this crate. See crate documentation for more +information.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/cfg_if/macro.cfg_if!.html b/api-docs/m_captcha/0.1.3/cfg_if/macro.cfg_if!.html new file mode 100644 index 0000000..36f9a6d --- /dev/null +++ b/api-docs/m_captcha/0.1.3/cfg_if/macro.cfg_if!.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to macro.cfg_if.html...

+ + + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/cfg_if/macro.cfg_if.html b/api-docs/m_captcha/0.1.3/cfg_if/macro.cfg_if.html new file mode 100644 index 0000000..cbde7d5 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/cfg_if/macro.cfg_if.html @@ -0,0 +1,23 @@ +cfg_if::cfg_if - Rust + +

[][src]Macro cfg_if::cfg_if

+macro_rules! cfg_if {
+    ($(
+        if #[cfg($meta:meta)] { $($tokens:tt)* }
+    ) else * else {
+        $($tokens2:tt)*
+    }) => { ... };
+    (
+        if #[cfg($i_met:meta)] { $($i_tokens:tt)* }
+        $(
+            else if #[cfg($e_met:meta)] { $($e_tokens:tt)* }
+        )*
+    ) => { ... };
+    (@__items ($($not:meta,)*) ; ) => { ... };
+    (@__items ($($not:meta,)*) ; ( ($($m:meta),*) ($($tokens:tt)*) ), $($rest:tt)*) => { ... };
+    (@__identity $($tokens:tt)*) => { ... };
+}
+

The main macro provided by this crate. See crate documentation for more +information.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/cfg_if/sidebar-items.js b/api-docs/m_captcha/0.1.3/cfg_if/sidebar-items.js new file mode 100644 index 0000000..dbc0f91 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/cfg_if/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"macro":[["cfg_if","The main macro provided by this crate. See crate documentation for more information."]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/dark.css b/api-docs/m_captcha/0.1.3/dark.css new file mode 100644 index 0000000..57e76d0 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/dark.css @@ -0,0 +1 @@ +body{background-color:#353535;color:#ddd;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.content .highlighted{color:#eee !important;background-color:#616161;}.content .highlighted a,.content .highlighted span{color:#eee !important;}.content .highlighted.trait{background-color:#013191;}.content .highlighted.traitalias{background-color:#013191;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.mod{background-color:#803a1b;}.content .highlighted.externcrate{background-color:#396bac;}.content .highlighted.enum{background-color:#5b4e68;}.content .highlighted.struct{background-color:#194e9f;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#4950ed;}.content .highlighted.type{background-color:#38902c;}.content .highlighted.foreigntype{background-color:#b200d6;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#217d1c;}.content .highlighted.constant,.content .highlighted.static{background-color:#0063cc;}.content .highlighted.primitive{background-color:#00708a;}.content .highlighted.keyword{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}.collapse-toggle{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-focus:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;color:#2f2f2f;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;color:#2f2f2f;}.stab.portability>code{color:#ddd;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#ffb900;}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results td span.alias{color:#fff;}.search-results td span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/down-arrow.svg b/api-docs/m_captcha/0.1.3/down-arrow.svg new file mode 100644 index 0000000..35437e7 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/down-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/favicon-16x16.png b/api-docs/m_captcha/0.1.3/favicon-16x16.png new file mode 100644 index 0000000..7cfe6c1 Binary files /dev/null and b/api-docs/m_captcha/0.1.3/favicon-16x16.png differ diff --git a/api-docs/m_captcha/0.1.3/favicon-32x32.png b/api-docs/m_captcha/0.1.3/favicon-32x32.png new file mode 100644 index 0000000..5109c1d Binary files /dev/null and b/api-docs/m_captcha/0.1.3/favicon-32x32.png differ diff --git a/api-docs/m_captcha/0.1.3/favicon.svg b/api-docs/m_captcha/0.1.3/favicon.svg new file mode 100644 index 0000000..8b34b51 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/favicon.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/api-docs/m_captcha/0.1.3/implementors/actix/actor/trait.Actor.js b/api-docs/m_captcha/0.1.3/implementors/actix/actor/trait.Actor.js new file mode 100644 index 0000000..39d1874 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/actix/actor/trait.Actor.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Actor for Master","synthetic":false,"types":["m_captcha::master::Master"]},{"text":"impl Actor for MCaptcha","synthetic":false,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl Actor for HashCache","synthetic":false,"types":["m_captcha::cache::hashcache::HashCache"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/actix/handler/trait.Handler.js b/api-docs/m_captcha/0.1.3/implementors/actix/handler/trait.Handler.js new file mode 100644 index 0000000..311681f --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/actix/handler/trait.Handler.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Handler<GetSite> for Master","synthetic":false,"types":["m_captcha::master::Master"]},{"text":"impl Handler<CleanUp> for Master","synthetic":false,"types":["m_captcha::master::Master"]},{"text":"impl Handler<RemoveSite> for Master","synthetic":false,"types":["m_captcha::master::Master"]},{"text":"impl Handler<AddSite> for Master","synthetic":false,"types":["m_captcha::master::Master"]},{"text":"impl Handler<AddVisitor> for MCaptcha","synthetic":false,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl Handler<GetCurrentVisitorCount> for MCaptcha","synthetic":false,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl Handler<Stop> for MCaptcha","synthetic":false,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl Handler<CachePoW> for HashCache","synthetic":false,"types":["m_captcha::cache::hashcache::HashCache"]},{"text":"impl Handler<DeletePoW> for HashCache","synthetic":false,"types":["m_captcha::cache::hashcache::HashCache"]},{"text":"impl Handler<RetrivePoW> for HashCache","synthetic":false,"types":["m_captcha::cache::hashcache::HashCache"]},{"text":"impl Handler<CacheResult> for HashCache","synthetic":false,"types":["m_captcha::cache::hashcache::HashCache"]},{"text":"impl Handler<DeleteCaptchaResult> for HashCache","synthetic":false,"types":["m_captcha::cache::hashcache::HashCache"]},{"text":"impl Handler<VerifyCaptchaResult> for HashCache","synthetic":false,"types":["m_captcha::cache::hashcache::HashCache"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/actix/handler/trait.Message.js b/api-docs/m_captcha/0.1.3/implementors/actix/handler/trait.Message.js new file mode 100644 index 0000000..d247d0e --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/actix/handler/trait.Message.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Message for GetSite","synthetic":false,"types":["m_captcha::master::GetSite"]},{"text":"impl Message for CleanUp","synthetic":false,"types":["m_captcha::master::CleanUp"]},{"text":"impl Message for RemoveSite","synthetic":false,"types":["m_captcha::master::RemoveSite"]},{"text":"impl Message for AddSite","synthetic":false,"types":["m_captcha::master::AddSite"]},{"text":"impl Message for AddVisitor","synthetic":false,"types":["m_captcha::mcaptcha::AddVisitor"]},{"text":"impl Message for GetCurrentVisitorCount","synthetic":false,"types":["m_captcha::mcaptcha::GetCurrentVisitorCount"]},{"text":"impl Message for Stop","synthetic":false,"types":["m_captcha::mcaptcha::Stop"]},{"text":"impl Message for CachePoW","synthetic":false,"types":["m_captcha::cache::messages::CachePoW"]},{"text":"impl Message for RetrivePoW","synthetic":false,"types":["m_captcha::cache::messages::RetrivePoW"]},{"text":"impl Message for DeletePoW","synthetic":false,"types":["m_captcha::cache::messages::DeletePoW"]},{"text":"impl Message for CacheResult","synthetic":false,"types":["m_captcha::cache::messages::CacheResult"]},{"text":"impl Message for VerifyCaptchaResult","synthetic":false,"types":["m_captcha::cache::messages::VerifyCaptchaResult"]},{"text":"impl Message for DeleteCaptchaResult","synthetic":false,"types":["m_captcha::cache::messages::DeleteCaptchaResult"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/core/clone/trait.Clone.js b/api-docs/m_captcha/0.1.3/implementors/core/clone/trait.Clone.js new file mode 100644 index 0000000..8f489ce --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Clone for Level","synthetic":false,"types":["m_captcha::defense::Level"]},{"text":"impl Clone for LevelBuilder","synthetic":false,"types":["m_captcha::defense::LevelBuilder"]},{"text":"impl Clone for Defense","synthetic":false,"types":["m_captcha::defense::Defense"]},{"text":"impl Clone for DefenseBuilder","synthetic":false,"types":["m_captcha::defense::DefenseBuilder"]},{"text":"impl Clone for CaptchaError","synthetic":false,"types":["m_captcha::errors::CaptchaError"]},{"text":"impl Clone for Master","synthetic":false,"types":["m_captcha::master::Master"]},{"text":"impl Clone for AddSiteBuilder","synthetic":false,"types":["m_captcha::master::AddSiteBuilder"]},{"text":"impl Clone for MCaptchaBuilder","synthetic":false,"types":["m_captcha::mcaptcha::MCaptchaBuilder"]},{"text":"impl Clone for MCaptcha","synthetic":false,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl Clone for AddVisitorResult","synthetic":false,"types":["m_captcha::mcaptcha::AddVisitorResult"]},{"text":"impl Clone for HashCache","synthetic":false,"types":["m_captcha::cache::hashcache::HashCache"]},{"text":"impl Clone for CachePoWBuilder","synthetic":false,"types":["m_captcha::cache::messages::CachePoWBuilder"]},{"text":"impl Clone for CachePoW","synthetic":false,"types":["m_captcha::cache::messages::CachePoW"]},{"text":"impl Clone for CachedPoWConfig","synthetic":false,"types":["m_captcha::cache::messages::CachedPoWConfig"]},{"text":"impl Clone for CacheResultBuilder","synthetic":false,"types":["m_captcha::cache::messages::CacheResultBuilder"]},{"text":"impl Clone for VerifyCaptchaResult","synthetic":false,"types":["m_captcha::cache::messages::VerifyCaptchaResult"]},{"text":"impl Clone for PoWConfig","synthetic":false,"types":["m_captcha::pow::PoWConfig"]},{"text":"impl Clone for Work","synthetic":false,"types":["m_captcha::pow::Work"]},{"text":"impl<T: Clone + Save> Clone for System<T>","synthetic":false,"types":["m_captcha::system::System"]},{"text":"impl<T: Clone + Save> Clone for SystemBuilder<T>","synthetic":false,"types":["m_captcha::system::SystemBuilder"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/core/cmp/trait.PartialEq.js b/api-docs/m_captcha/0.1.3/implementors/core/cmp/trait.PartialEq.js new file mode 100644 index 0000000..8ed68e4 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl PartialEq<Level> for Level","synthetic":false,"types":["m_captcha::defense::Level"]},{"text":"impl PartialEq<LevelBuilder> for LevelBuilder","synthetic":false,"types":["m_captcha::defense::LevelBuilder"]},{"text":"impl PartialEq<Defense> for Defense","synthetic":false,"types":["m_captcha::defense::Defense"]},{"text":"impl PartialEq<DefenseBuilder> for DefenseBuilder","synthetic":false,"types":["m_captcha::defense::DefenseBuilder"]},{"text":"impl PartialEq<CaptchaError> for CaptchaError","synthetic":false,"types":["m_captcha::errors::CaptchaError"]},{"text":"impl PartialEq<CachedPoWConfig> for CachedPoWConfig","synthetic":false,"types":["m_captcha::cache::messages::CachedPoWConfig"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/core/convert/trait.From.js b/api-docs/m_captcha/0.1.3/implementors/core/convert/trait.From.js new file mode 100644 index 0000000..c660e2b --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/core/convert/trait.From.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl From<CachedPoWConfig> for CacheResult","synthetic":false,"types":["m_captcha::cache::messages::CacheResult"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/core/default/trait.Default.js b/api-docs/m_captcha/0.1.3/implementors/core/default/trait.Default.js new file mode 100644 index 0000000..22824e8 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/core/default/trait.Default.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Default for LevelBuilder","synthetic":false,"types":["m_captcha::defense::LevelBuilder"]},{"text":"impl Default for DefenseBuilder","synthetic":false,"types":["m_captcha::defense::DefenseBuilder"]},{"text":"impl Default for AddSiteBuilder","synthetic":false,"types":["m_captcha::master::AddSiteBuilder"]},{"text":"impl Default for MCaptchaBuilder","synthetic":false,"types":["m_captcha::mcaptcha::MCaptchaBuilder"]},{"text":"impl Default for HashCache","synthetic":false,"types":["m_captcha::cache::hashcache::HashCache"]},{"text":"impl Default for CachePoWBuilder","synthetic":false,"types":["m_captcha::cache::messages::CachePoWBuilder"]},{"text":"impl Default for CachedPoWConfig","synthetic":false,"types":["m_captcha::cache::messages::CachedPoWConfig"]},{"text":"impl Default for CacheResultBuilder","synthetic":false,"types":["m_captcha::cache::messages::CacheResultBuilder"]},{"text":"impl<T: Default + Save> Default for SystemBuilder<T>","synthetic":false,"types":["m_captcha::system::SystemBuilder"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/core/fmt/trait.Debug.js b/api-docs/m_captcha/0.1.3/implementors/core/fmt/trait.Debug.js new file mode 100644 index 0000000..2aa51e5 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Debug for Level","synthetic":false,"types":["m_captcha::defense::Level"]},{"text":"impl Debug for LevelBuilder","synthetic":false,"types":["m_captcha::defense::LevelBuilder"]},{"text":"impl Debug for Defense","synthetic":false,"types":["m_captcha::defense::Defense"]},{"text":"impl Debug for DefenseBuilder","synthetic":false,"types":["m_captcha::defense::DefenseBuilder"]},{"text":"impl Debug for CaptchaError","synthetic":false,"types":["m_captcha::errors::CaptchaError"]},{"text":"impl Debug for MCaptchaBuilder","synthetic":false,"types":["m_captcha::mcaptcha::MCaptchaBuilder"]},{"text":"impl Debug for MCaptcha","synthetic":false,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl Debug for AddVisitorResult","synthetic":false,"types":["m_captcha::mcaptcha::AddVisitorResult"]},{"text":"impl Debug for CachedPoWConfig","synthetic":false,"types":["m_captcha::cache::messages::CachedPoWConfig"]},{"text":"impl Debug for PoWConfig","synthetic":false,"types":["m_captcha::pow::PoWConfig"]},{"text":"impl Debug for Work","synthetic":false,"types":["m_captcha::pow::Work"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/core/fmt/trait.Display.js b/api-docs/m_captcha/0.1.3/implementors/core/fmt/trait.Display.js new file mode 100644 index 0000000..a156118 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/core/fmt/trait.Display.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Display for CaptchaError","synthetic":false,"types":["m_captcha::errors::CaptchaError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Copy.js b/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Copy.js new file mode 100644 index 0000000..993199a --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Copy.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Copy for Level","synthetic":false,"types":["m_captcha::defense::Level"]},{"text":"impl Copy for LevelBuilder","synthetic":false,"types":["m_captcha::defense::LevelBuilder"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Freeze.js b/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Freeze.js new file mode 100644 index 0000000..857b5dc --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Freeze for Level","synthetic":true,"types":["m_captcha::defense::Level"]},{"text":"impl Freeze for LevelBuilder","synthetic":true,"types":["m_captcha::defense::LevelBuilder"]},{"text":"impl Freeze for Defense","synthetic":true,"types":["m_captcha::defense::Defense"]},{"text":"impl Freeze for DefenseBuilder","synthetic":true,"types":["m_captcha::defense::DefenseBuilder"]},{"text":"impl Freeze for CaptchaError","synthetic":true,"types":["m_captcha::errors::CaptchaError"]},{"text":"impl Freeze for Master","synthetic":true,"types":["m_captcha::master::Master"]},{"text":"impl Freeze for GetSite","synthetic":true,"types":["m_captcha::master::GetSite"]},{"text":"impl Freeze for CleanUp","synthetic":true,"types":["m_captcha::master::CleanUp"]},{"text":"impl Freeze for RemoveSite","synthetic":true,"types":["m_captcha::master::RemoveSite"]},{"text":"impl Freeze for AddSite","synthetic":true,"types":["m_captcha::master::AddSite"]},{"text":"impl Freeze for AddSiteBuilder","synthetic":true,"types":["m_captcha::master::AddSiteBuilder"]},{"text":"impl Freeze for MCaptchaBuilder","synthetic":true,"types":["m_captcha::mcaptcha::MCaptchaBuilder"]},{"text":"impl Freeze for MCaptcha","synthetic":true,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl Freeze for AddVisitor","synthetic":true,"types":["m_captcha::mcaptcha::AddVisitor"]},{"text":"impl Freeze for AddVisitorResult","synthetic":true,"types":["m_captcha::mcaptcha::AddVisitorResult"]},{"text":"impl Freeze for GetCurrentVisitorCount","synthetic":true,"types":["m_captcha::mcaptcha::GetCurrentVisitorCount"]},{"text":"impl Freeze for Stop","synthetic":true,"types":["m_captcha::mcaptcha::Stop"]},{"text":"impl Freeze for HashCache","synthetic":true,"types":["m_captcha::cache::hashcache::HashCache"]},{"text":"impl Freeze for CachePoW","synthetic":true,"types":["m_captcha::cache::messages::CachePoW"]},{"text":"impl Freeze for CachePoWBuilder","synthetic":true,"types":["m_captcha::cache::messages::CachePoWBuilder"]},{"text":"impl Freeze for RetrivePoW","synthetic":true,"types":["m_captcha::cache::messages::RetrivePoW"]},{"text":"impl Freeze for CachedPoWConfig","synthetic":true,"types":["m_captcha::cache::messages::CachedPoWConfig"]},{"text":"impl Freeze for DeletePoW","synthetic":true,"types":["m_captcha::cache::messages::DeletePoW"]},{"text":"impl Freeze for CacheResult","synthetic":true,"types":["m_captcha::cache::messages::CacheResult"]},{"text":"impl Freeze for CacheResultBuilder","synthetic":true,"types":["m_captcha::cache::messages::CacheResultBuilder"]},{"text":"impl Freeze for VerifyCaptchaResult","synthetic":true,"types":["m_captcha::cache::messages::VerifyCaptchaResult"]},{"text":"impl Freeze for DeleteCaptchaResult","synthetic":true,"types":["m_captcha::cache::messages::DeleteCaptchaResult"]},{"text":"impl Freeze for PoWConfig","synthetic":true,"types":["m_captcha::pow::PoWConfig"]},{"text":"impl Freeze for Work","synthetic":true,"types":["m_captcha::pow::Work"]},{"text":"impl<T> Freeze for System<T>","synthetic":true,"types":["m_captcha::system::System"]},{"text":"impl<T> Freeze for SystemBuilder<T>","synthetic":true,"types":["m_captcha::system::SystemBuilder"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Send.js b/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Send.js new file mode 100644 index 0000000..47b040b --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Send for Level","synthetic":true,"types":["m_captcha::defense::Level"]},{"text":"impl Send for LevelBuilder","synthetic":true,"types":["m_captcha::defense::LevelBuilder"]},{"text":"impl Send for Defense","synthetic":true,"types":["m_captcha::defense::Defense"]},{"text":"impl Send for DefenseBuilder","synthetic":true,"types":["m_captcha::defense::DefenseBuilder"]},{"text":"impl Send for CaptchaError","synthetic":true,"types":["m_captcha::errors::CaptchaError"]},{"text":"impl Send for Master","synthetic":true,"types":["m_captcha::master::Master"]},{"text":"impl Send for GetSite","synthetic":true,"types":["m_captcha::master::GetSite"]},{"text":"impl Send for CleanUp","synthetic":true,"types":["m_captcha::master::CleanUp"]},{"text":"impl Send for RemoveSite","synthetic":true,"types":["m_captcha::master::RemoveSite"]},{"text":"impl Send for AddSite","synthetic":true,"types":["m_captcha::master::AddSite"]},{"text":"impl Send for AddSiteBuilder","synthetic":true,"types":["m_captcha::master::AddSiteBuilder"]},{"text":"impl Send for MCaptchaBuilder","synthetic":true,"types":["m_captcha::mcaptcha::MCaptchaBuilder"]},{"text":"impl Send for MCaptcha","synthetic":true,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl Send for AddVisitor","synthetic":true,"types":["m_captcha::mcaptcha::AddVisitor"]},{"text":"impl Send for AddVisitorResult","synthetic":true,"types":["m_captcha::mcaptcha::AddVisitorResult"]},{"text":"impl Send for GetCurrentVisitorCount","synthetic":true,"types":["m_captcha::mcaptcha::GetCurrentVisitorCount"]},{"text":"impl Send for Stop","synthetic":true,"types":["m_captcha::mcaptcha::Stop"]},{"text":"impl Send for HashCache","synthetic":true,"types":["m_captcha::cache::hashcache::HashCache"]},{"text":"impl Send for CachePoW","synthetic":true,"types":["m_captcha::cache::messages::CachePoW"]},{"text":"impl Send for CachePoWBuilder","synthetic":true,"types":["m_captcha::cache::messages::CachePoWBuilder"]},{"text":"impl Send for RetrivePoW","synthetic":true,"types":["m_captcha::cache::messages::RetrivePoW"]},{"text":"impl Send for CachedPoWConfig","synthetic":true,"types":["m_captcha::cache::messages::CachedPoWConfig"]},{"text":"impl Send for DeletePoW","synthetic":true,"types":["m_captcha::cache::messages::DeletePoW"]},{"text":"impl Send for CacheResult","synthetic":true,"types":["m_captcha::cache::messages::CacheResult"]},{"text":"impl Send for CacheResultBuilder","synthetic":true,"types":["m_captcha::cache::messages::CacheResultBuilder"]},{"text":"impl Send for VerifyCaptchaResult","synthetic":true,"types":["m_captcha::cache::messages::VerifyCaptchaResult"]},{"text":"impl Send for DeleteCaptchaResult","synthetic":true,"types":["m_captcha::cache::messages::DeleteCaptchaResult"]},{"text":"impl Send for PoWConfig","synthetic":true,"types":["m_captcha::pow::PoWConfig"]},{"text":"impl Send for Work","synthetic":true,"types":["m_captcha::pow::Work"]},{"text":"impl<T> Send for System<T>","synthetic":true,"types":["m_captcha::system::System"]},{"text":"impl<T> Send for SystemBuilder<T>","synthetic":true,"types":["m_captcha::system::SystemBuilder"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.StructuralPartialEq.js b/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 0000000..71fd44e --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl StructuralPartialEq for Level","synthetic":false,"types":["m_captcha::defense::Level"]},{"text":"impl StructuralPartialEq for LevelBuilder","synthetic":false,"types":["m_captcha::defense::LevelBuilder"]},{"text":"impl StructuralPartialEq for Defense","synthetic":false,"types":["m_captcha::defense::Defense"]},{"text":"impl StructuralPartialEq for DefenseBuilder","synthetic":false,"types":["m_captcha::defense::DefenseBuilder"]},{"text":"impl StructuralPartialEq for CaptchaError","synthetic":false,"types":["m_captcha::errors::CaptchaError"]},{"text":"impl StructuralPartialEq for CachedPoWConfig","synthetic":false,"types":["m_captcha::cache::messages::CachedPoWConfig"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Sync.js b/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Sync.js new file mode 100644 index 0000000..1d65c03 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Sync for Level","synthetic":true,"types":["m_captcha::defense::Level"]},{"text":"impl Sync for LevelBuilder","synthetic":true,"types":["m_captcha::defense::LevelBuilder"]},{"text":"impl Sync for Defense","synthetic":true,"types":["m_captcha::defense::Defense"]},{"text":"impl Sync for DefenseBuilder","synthetic":true,"types":["m_captcha::defense::DefenseBuilder"]},{"text":"impl Sync for CaptchaError","synthetic":true,"types":["m_captcha::errors::CaptchaError"]},{"text":"impl Sync for Master","synthetic":true,"types":["m_captcha::master::Master"]},{"text":"impl Sync for GetSite","synthetic":true,"types":["m_captcha::master::GetSite"]},{"text":"impl Sync for CleanUp","synthetic":true,"types":["m_captcha::master::CleanUp"]},{"text":"impl Sync for RemoveSite","synthetic":true,"types":["m_captcha::master::RemoveSite"]},{"text":"impl Sync for AddSite","synthetic":true,"types":["m_captcha::master::AddSite"]},{"text":"impl Sync for AddSiteBuilder","synthetic":true,"types":["m_captcha::master::AddSiteBuilder"]},{"text":"impl Sync for MCaptchaBuilder","synthetic":true,"types":["m_captcha::mcaptcha::MCaptchaBuilder"]},{"text":"impl Sync for MCaptcha","synthetic":true,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl Sync for AddVisitor","synthetic":true,"types":["m_captcha::mcaptcha::AddVisitor"]},{"text":"impl Sync for AddVisitorResult","synthetic":true,"types":["m_captcha::mcaptcha::AddVisitorResult"]},{"text":"impl Sync for GetCurrentVisitorCount","synthetic":true,"types":["m_captcha::mcaptcha::GetCurrentVisitorCount"]},{"text":"impl Sync for Stop","synthetic":true,"types":["m_captcha::mcaptcha::Stop"]},{"text":"impl Sync for HashCache","synthetic":true,"types":["m_captcha::cache::hashcache::HashCache"]},{"text":"impl Sync for CachePoW","synthetic":true,"types":["m_captcha::cache::messages::CachePoW"]},{"text":"impl Sync for CachePoWBuilder","synthetic":true,"types":["m_captcha::cache::messages::CachePoWBuilder"]},{"text":"impl Sync for RetrivePoW","synthetic":true,"types":["m_captcha::cache::messages::RetrivePoW"]},{"text":"impl Sync for CachedPoWConfig","synthetic":true,"types":["m_captcha::cache::messages::CachedPoWConfig"]},{"text":"impl Sync for DeletePoW","synthetic":true,"types":["m_captcha::cache::messages::DeletePoW"]},{"text":"impl Sync for CacheResult","synthetic":true,"types":["m_captcha::cache::messages::CacheResult"]},{"text":"impl Sync for CacheResultBuilder","synthetic":true,"types":["m_captcha::cache::messages::CacheResultBuilder"]},{"text":"impl Sync for VerifyCaptchaResult","synthetic":true,"types":["m_captcha::cache::messages::VerifyCaptchaResult"]},{"text":"impl Sync for DeleteCaptchaResult","synthetic":true,"types":["m_captcha::cache::messages::DeleteCaptchaResult"]},{"text":"impl Sync for PoWConfig","synthetic":true,"types":["m_captcha::pow::PoWConfig"]},{"text":"impl Sync for Work","synthetic":true,"types":["m_captcha::pow::Work"]},{"text":"impl<T> Sync for System<T>","synthetic":true,"types":["m_captcha::system::System"]},{"text":"impl<T> Sync for SystemBuilder<T>","synthetic":true,"types":["m_captcha::system::SystemBuilder"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Unpin.js b/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Unpin.js new file mode 100644 index 0000000..1be6fd0 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Unpin for Level","synthetic":true,"types":["m_captcha::defense::Level"]},{"text":"impl Unpin for LevelBuilder","synthetic":true,"types":["m_captcha::defense::LevelBuilder"]},{"text":"impl Unpin for Defense","synthetic":true,"types":["m_captcha::defense::Defense"]},{"text":"impl Unpin for DefenseBuilder","synthetic":true,"types":["m_captcha::defense::DefenseBuilder"]},{"text":"impl Unpin for CaptchaError","synthetic":true,"types":["m_captcha::errors::CaptchaError"]},{"text":"impl Unpin for Master","synthetic":true,"types":["m_captcha::master::Master"]},{"text":"impl Unpin for GetSite","synthetic":true,"types":["m_captcha::master::GetSite"]},{"text":"impl Unpin for CleanUp","synthetic":true,"types":["m_captcha::master::CleanUp"]},{"text":"impl Unpin for RemoveSite","synthetic":true,"types":["m_captcha::master::RemoveSite"]},{"text":"impl Unpin for AddSite","synthetic":true,"types":["m_captcha::master::AddSite"]},{"text":"impl Unpin for AddSiteBuilder","synthetic":true,"types":["m_captcha::master::AddSiteBuilder"]},{"text":"impl Unpin for MCaptchaBuilder","synthetic":true,"types":["m_captcha::mcaptcha::MCaptchaBuilder"]},{"text":"impl Unpin for MCaptcha","synthetic":true,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl Unpin for AddVisitor","synthetic":true,"types":["m_captcha::mcaptcha::AddVisitor"]},{"text":"impl Unpin for AddVisitorResult","synthetic":true,"types":["m_captcha::mcaptcha::AddVisitorResult"]},{"text":"impl Unpin for GetCurrentVisitorCount","synthetic":true,"types":["m_captcha::mcaptcha::GetCurrentVisitorCount"]},{"text":"impl Unpin for Stop","synthetic":true,"types":["m_captcha::mcaptcha::Stop"]},{"text":"impl Unpin for HashCache","synthetic":true,"types":["m_captcha::cache::hashcache::HashCache"]},{"text":"impl Unpin for CachePoW","synthetic":true,"types":["m_captcha::cache::messages::CachePoW"]},{"text":"impl Unpin for CachePoWBuilder","synthetic":true,"types":["m_captcha::cache::messages::CachePoWBuilder"]},{"text":"impl Unpin for RetrivePoW","synthetic":true,"types":["m_captcha::cache::messages::RetrivePoW"]},{"text":"impl Unpin for CachedPoWConfig","synthetic":true,"types":["m_captcha::cache::messages::CachedPoWConfig"]},{"text":"impl Unpin for DeletePoW","synthetic":true,"types":["m_captcha::cache::messages::DeletePoW"]},{"text":"impl Unpin for CacheResult","synthetic":true,"types":["m_captcha::cache::messages::CacheResult"]},{"text":"impl Unpin for CacheResultBuilder","synthetic":true,"types":["m_captcha::cache::messages::CacheResultBuilder"]},{"text":"impl Unpin for VerifyCaptchaResult","synthetic":true,"types":["m_captcha::cache::messages::VerifyCaptchaResult"]},{"text":"impl Unpin for DeleteCaptchaResult","synthetic":true,"types":["m_captcha::cache::messages::DeleteCaptchaResult"]},{"text":"impl Unpin for PoWConfig","synthetic":true,"types":["m_captcha::pow::PoWConfig"]},{"text":"impl Unpin for Work","synthetic":true,"types":["m_captcha::pow::Work"]},{"text":"impl<T> Unpin for System<T>","synthetic":true,"types":["m_captcha::system::System"]},{"text":"impl<T> Unpin for SystemBuilder<T>","synthetic":true,"types":["m_captcha::system::SystemBuilder"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/m_captcha/cache/trait.Save.js b/api-docs/m_captcha/0.1.3/implementors/m_captcha/cache/trait.Save.js new file mode 100644 index 0000000..218677b --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/m_captcha/cache/trait.Save.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/serde/de/trait.Deserialize.js b/api-docs/m_captcha/0.1.3/implementors/serde/de/trait.Deserialize.js new file mode 100644 index 0000000..891bf8c --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/serde/de/trait.Deserialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl<'de> Deserialize<'de> for Level","synthetic":false,"types":["m_captcha::defense::Level"]},{"text":"impl<'de> Deserialize<'de> for Defense","synthetic":false,"types":["m_captcha::defense::Defense"]},{"text":"impl<'de> Deserialize<'de> for MCaptchaBuilder","synthetic":false,"types":["m_captcha::mcaptcha::MCaptchaBuilder"]},{"text":"impl<'de> Deserialize<'de> for MCaptcha","synthetic":false,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl<'de> Deserialize<'de> for AddVisitorResult","synthetic":false,"types":["m_captcha::mcaptcha::AddVisitorResult"]},{"text":"impl<'de> Deserialize<'de> for CachePoW","synthetic":false,"types":["m_captcha::cache::messages::CachePoW"]},{"text":"impl<'de> Deserialize<'de> for CachedPoWConfig","synthetic":false,"types":["m_captcha::cache::messages::CachedPoWConfig"]},{"text":"impl<'de> Deserialize<'de> for CacheResult","synthetic":false,"types":["m_captcha::cache::messages::CacheResult"]},{"text":"impl<'de> Deserialize<'de> for VerifyCaptchaResult","synthetic":false,"types":["m_captcha::cache::messages::VerifyCaptchaResult"]},{"text":"impl<'de> Deserialize<'de> for PoWConfig","synthetic":false,"types":["m_captcha::pow::PoWConfig"]},{"text":"impl<'de> Deserialize<'de> for Work","synthetic":false,"types":["m_captcha::pow::Work"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/serde/ser/trait.Serialize.js b/api-docs/m_captcha/0.1.3/implementors/serde/ser/trait.Serialize.js new file mode 100644 index 0000000..1c8d72e --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/serde/ser/trait.Serialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Serialize for Level","synthetic":false,"types":["m_captcha::defense::Level"]},{"text":"impl Serialize for Defense","synthetic":false,"types":["m_captcha::defense::Defense"]},{"text":"impl Serialize for MCaptchaBuilder","synthetic":false,"types":["m_captcha::mcaptcha::MCaptchaBuilder"]},{"text":"impl Serialize for MCaptcha","synthetic":false,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl Serialize for AddVisitorResult","synthetic":false,"types":["m_captcha::mcaptcha::AddVisitorResult"]},{"text":"impl Serialize for CachePoW","synthetic":false,"types":["m_captcha::cache::messages::CachePoW"]},{"text":"impl Serialize for CachedPoWConfig","synthetic":false,"types":["m_captcha::cache::messages::CachedPoWConfig"]},{"text":"impl Serialize for CacheResult","synthetic":false,"types":["m_captcha::cache::messages::CacheResult"]},{"text":"impl Serialize for VerifyCaptchaResult","synthetic":false,"types":["m_captcha::cache::messages::VerifyCaptchaResult"]},{"text":"impl Serialize for PoWConfig","synthetic":false,"types":["m_captcha::pow::PoWConfig"]},{"text":"impl Serialize for Work","synthetic":false,"types":["m_captcha::pow::Work"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/std/error/trait.Error.js b/api-docs/m_captcha/0.1.3/implementors/std/error/trait.Error.js new file mode 100644 index 0000000..f631b0e --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/std/error/trait.Error.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl Error for CaptchaError","synthetic":false,"types":["m_captcha::errors::CaptchaError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/std/panic/trait.RefUnwindSafe.js b/api-docs/m_captcha/0.1.3/implementors/std/panic/trait.RefUnwindSafe.js new file mode 100644 index 0000000..2b0683e --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/std/panic/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl RefUnwindSafe for Level","synthetic":true,"types":["m_captcha::defense::Level"]},{"text":"impl RefUnwindSafe for LevelBuilder","synthetic":true,"types":["m_captcha::defense::LevelBuilder"]},{"text":"impl RefUnwindSafe for Defense","synthetic":true,"types":["m_captcha::defense::Defense"]},{"text":"impl RefUnwindSafe for DefenseBuilder","synthetic":true,"types":["m_captcha::defense::DefenseBuilder"]},{"text":"impl RefUnwindSafe for CaptchaError","synthetic":true,"types":["m_captcha::errors::CaptchaError"]},{"text":"impl !RefUnwindSafe for Master","synthetic":true,"types":["m_captcha::master::Master"]},{"text":"impl RefUnwindSafe for GetSite","synthetic":true,"types":["m_captcha::master::GetSite"]},{"text":"impl RefUnwindSafe for CleanUp","synthetic":true,"types":["m_captcha::master::CleanUp"]},{"text":"impl RefUnwindSafe for RemoveSite","synthetic":true,"types":["m_captcha::master::RemoveSite"]},{"text":"impl !RefUnwindSafe for AddSite","synthetic":true,"types":["m_captcha::master::AddSite"]},{"text":"impl !RefUnwindSafe for AddSiteBuilder","synthetic":true,"types":["m_captcha::master::AddSiteBuilder"]},{"text":"impl RefUnwindSafe for MCaptchaBuilder","synthetic":true,"types":["m_captcha::mcaptcha::MCaptchaBuilder"]},{"text":"impl RefUnwindSafe for MCaptcha","synthetic":true,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl RefUnwindSafe for AddVisitor","synthetic":true,"types":["m_captcha::mcaptcha::AddVisitor"]},{"text":"impl RefUnwindSafe for AddVisitorResult","synthetic":true,"types":["m_captcha::mcaptcha::AddVisitorResult"]},{"text":"impl RefUnwindSafe for GetCurrentVisitorCount","synthetic":true,"types":["m_captcha::mcaptcha::GetCurrentVisitorCount"]},{"text":"impl RefUnwindSafe for Stop","synthetic":true,"types":["m_captcha::mcaptcha::Stop"]},{"text":"impl RefUnwindSafe for HashCache","synthetic":true,"types":["m_captcha::cache::hashcache::HashCache"]},{"text":"impl RefUnwindSafe for CachePoW","synthetic":true,"types":["m_captcha::cache::messages::CachePoW"]},{"text":"impl RefUnwindSafe for CachePoWBuilder","synthetic":true,"types":["m_captcha::cache::messages::CachePoWBuilder"]},{"text":"impl RefUnwindSafe for RetrivePoW","synthetic":true,"types":["m_captcha::cache::messages::RetrivePoW"]},{"text":"impl RefUnwindSafe for CachedPoWConfig","synthetic":true,"types":["m_captcha::cache::messages::CachedPoWConfig"]},{"text":"impl RefUnwindSafe for DeletePoW","synthetic":true,"types":["m_captcha::cache::messages::DeletePoW"]},{"text":"impl RefUnwindSafe for CacheResult","synthetic":true,"types":["m_captcha::cache::messages::CacheResult"]},{"text":"impl RefUnwindSafe for CacheResultBuilder","synthetic":true,"types":["m_captcha::cache::messages::CacheResultBuilder"]},{"text":"impl RefUnwindSafe for VerifyCaptchaResult","synthetic":true,"types":["m_captcha::cache::messages::VerifyCaptchaResult"]},{"text":"impl RefUnwindSafe for DeleteCaptchaResult","synthetic":true,"types":["m_captcha::cache::messages::DeleteCaptchaResult"]},{"text":"impl RefUnwindSafe for PoWConfig","synthetic":true,"types":["m_captcha::pow::PoWConfig"]},{"text":"impl RefUnwindSafe for Work","synthetic":true,"types":["m_captcha::pow::Work"]},{"text":"impl<T> !RefUnwindSafe for System<T>","synthetic":true,"types":["m_captcha::system::System"]},{"text":"impl<T> !RefUnwindSafe for SystemBuilder<T>","synthetic":true,"types":["m_captcha::system::SystemBuilder"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/std/panic/trait.UnwindSafe.js b/api-docs/m_captcha/0.1.3/implementors/std/panic/trait.UnwindSafe.js new file mode 100644 index 0000000..686b679 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/std/panic/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["m_captcha"] = [{"text":"impl UnwindSafe for Level","synthetic":true,"types":["m_captcha::defense::Level"]},{"text":"impl UnwindSafe for LevelBuilder","synthetic":true,"types":["m_captcha::defense::LevelBuilder"]},{"text":"impl UnwindSafe for Defense","synthetic":true,"types":["m_captcha::defense::Defense"]},{"text":"impl UnwindSafe for DefenseBuilder","synthetic":true,"types":["m_captcha::defense::DefenseBuilder"]},{"text":"impl UnwindSafe for CaptchaError","synthetic":true,"types":["m_captcha::errors::CaptchaError"]},{"text":"impl !UnwindSafe for Master","synthetic":true,"types":["m_captcha::master::Master"]},{"text":"impl UnwindSafe for GetSite","synthetic":true,"types":["m_captcha::master::GetSite"]},{"text":"impl UnwindSafe for CleanUp","synthetic":true,"types":["m_captcha::master::CleanUp"]},{"text":"impl UnwindSafe for RemoveSite","synthetic":true,"types":["m_captcha::master::RemoveSite"]},{"text":"impl !UnwindSafe for AddSite","synthetic":true,"types":["m_captcha::master::AddSite"]},{"text":"impl !UnwindSafe for AddSiteBuilder","synthetic":true,"types":["m_captcha::master::AddSiteBuilder"]},{"text":"impl UnwindSafe for MCaptchaBuilder","synthetic":true,"types":["m_captcha::mcaptcha::MCaptchaBuilder"]},{"text":"impl UnwindSafe for MCaptcha","synthetic":true,"types":["m_captcha::mcaptcha::MCaptcha"]},{"text":"impl UnwindSafe for AddVisitor","synthetic":true,"types":["m_captcha::mcaptcha::AddVisitor"]},{"text":"impl UnwindSafe for AddVisitorResult","synthetic":true,"types":["m_captcha::mcaptcha::AddVisitorResult"]},{"text":"impl UnwindSafe for GetCurrentVisitorCount","synthetic":true,"types":["m_captcha::mcaptcha::GetCurrentVisitorCount"]},{"text":"impl UnwindSafe for Stop","synthetic":true,"types":["m_captcha::mcaptcha::Stop"]},{"text":"impl UnwindSafe for HashCache","synthetic":true,"types":["m_captcha::cache::hashcache::HashCache"]},{"text":"impl UnwindSafe for CachePoW","synthetic":true,"types":["m_captcha::cache::messages::CachePoW"]},{"text":"impl UnwindSafe for CachePoWBuilder","synthetic":true,"types":["m_captcha::cache::messages::CachePoWBuilder"]},{"text":"impl UnwindSafe for RetrivePoW","synthetic":true,"types":["m_captcha::cache::messages::RetrivePoW"]},{"text":"impl UnwindSafe for CachedPoWConfig","synthetic":true,"types":["m_captcha::cache::messages::CachedPoWConfig"]},{"text":"impl UnwindSafe for DeletePoW","synthetic":true,"types":["m_captcha::cache::messages::DeletePoW"]},{"text":"impl UnwindSafe for CacheResult","synthetic":true,"types":["m_captcha::cache::messages::CacheResult"]},{"text":"impl UnwindSafe for CacheResultBuilder","synthetic":true,"types":["m_captcha::cache::messages::CacheResultBuilder"]},{"text":"impl UnwindSafe for VerifyCaptchaResult","synthetic":true,"types":["m_captcha::cache::messages::VerifyCaptchaResult"]},{"text":"impl UnwindSafe for DeleteCaptchaResult","synthetic":true,"types":["m_captcha::cache::messages::DeleteCaptchaResult"]},{"text":"impl UnwindSafe for PoWConfig","synthetic":true,"types":["m_captcha::pow::PoWConfig"]},{"text":"impl UnwindSafe for Work","synthetic":true,"types":["m_captcha::pow::Work"]},{"text":"impl<T> !UnwindSafe for System<T>","synthetic":true,"types":["m_captcha::system::System"]},{"text":"impl<T> !UnwindSafe for SystemBuilder<T>","synthetic":true,"types":["m_captcha::system::SystemBuilder"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/implementors/unicode_xid/trait.UnicodeXID.js b/api-docs/m_captcha/0.1.3/implementors/unicode_xid/trait.UnicodeXID.js new file mode 100644 index 0000000..bde1c01 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/implementors/unicode_xid/trait.UnicodeXID.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["unicode_xid"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/light.css b/api-docs/m_captcha/0.1.3/light.css new file mode 100644 index 0000000..fa73fe2 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/light.css @@ -0,0 +1 @@ + body{background-color:white;color:black;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.content .highlighted{color:#000 !important;background-color:#ccc;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted.trait{background-color:#c7b6ff;}.content .highlighted.traitalias{background-color:#c7b6ff;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.enum{background-color:#b4d1b9;}.content .highlighted.struct{background-color:#e7b1a0;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#c6afb3;}.content .highlighted.type{background-color:#ffc891;}.content .highlighted.foreigntype{background-color:#f5c4ff;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#8ce488;}.content .highlighted.constant,.content .highlighted.static{background-color:#c3e0ff;}.content .highlighted.primitive{background-color:#9aecff;}.content .highlighted.keyword{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}.collapse-toggle{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-focus:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;}.stab.portability>code{color:#000;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:#FDFFD3;border-right:3px solid #ffb44c;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#717171;}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results td span.alias{color:#000;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/all.html b/api-docs/m_captcha/0.1.3/m_captcha/all.html new file mode 100644 index 0000000..548c82a --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/all.html @@ -0,0 +1,7 @@ +List of all items in this crate + +

List of all items[] + +

Structs

Enums

Traits

Typedefs

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/hashcache/index.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/hashcache/index.html new file mode 100644 index 0000000..f0b13e2 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/hashcache/index.html @@ -0,0 +1,8 @@ +m_captcha::cache::hashcache - Rust + +

Module m_captcha::cache::hashcache[][src]

In-memory cache implementation that uses HashMap

+

Structs

+
HashCache

cache datastructure implementing Save

+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/hashcache/sidebar-items.js b/api-docs/m_captcha/0.1.3/m_captcha/cache/hashcache/sidebar-items.js new file mode 100644 index 0000000..5dadaea --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/hashcache/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["HashCache","cache datastructure implementing [Save]"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/hashcache/struct.HashCache.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/hashcache/struct.HashCache.html new file mode 100644 index 0000000..16a992a --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/hashcache/struct.HashCache.html @@ -0,0 +1,50 @@ +m_captcha::cache::hashcache::HashCache - Rust + +

Struct m_captcha::cache::hashcache::HashCache[][src]

pub struct HashCache { /* fields omitted */ }

cache datastructure implementing Save

+

Trait Implementations

impl Actor for HashCache[src]

type Context = Context<Self>

Actor execution context type

+

impl Clone for HashCache[src]

impl Default for HashCache[src]

impl Handler<CachePoW> for HashCache[src]

cache a PoWConfig

+

type Result = MessageResult<CachePoW>

The type of value that this handler will return. Read more

+

impl Handler<CacheResult> for HashCache[src]

cache PoW result

+

type Result = MessageResult<CacheResult>

The type of value that this handler will return. Read more

+

impl Handler<DeleteCaptchaResult> for HashCache[src]

Delte a PoWConfig

+

type Result = MessageResult<DeleteCaptchaResult>

The type of value that this handler will return. Read more

+

impl Handler<DeletePoW> for HashCache[src]

Delte a PoWConfig

+

type Result = MessageResult<DeletePoW>

The type of value that this handler will return. Read more

+

impl Handler<RetrivePoW> for HashCache[src]

Retrive PoW difficulty_factor for a PoW string

+

type Result = MessageResult<RetrivePoW>

The type of value that this handler will return. Read more

+

impl Handler<VerifyCaptchaResult> for HashCache[src]

Retrive PoW difficulty_factor for a PoW string

+

type Result = MessageResult<VerifyCaptchaResult>

The type of value that this handler will return. Read more

+

impl Save for HashCache[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/index.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/index.html new file mode 100644 index 0000000..e917a97 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/index.html @@ -0,0 +1,14 @@ +m_captcha::cache - Rust + +

Module m_captcha::cache[][src]

message datatypes to interact with MCaptcha actor +Cache is used to save proofof work details and nonces to prevent replay attacks +and rainbow/dictionary attacks

+

Re-exports

+
pub use hashcache::HashCache;

Modules

+
hashcache

In-memory cache implementation that uses HashMap

+
messages

Messages that can be sent to cache data structures implementing Save

+

Traits

+
Save

Describes actor handler trait impls that are required by a cache implementation

+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/index.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/index.html new file mode 100644 index 0000000..fadc1cc --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/index.html @@ -0,0 +1,19 @@ +m_captcha::cache::messages - Rust + +

Module m_captcha::cache::messages[][src]

Messages that can be sent to cache data structures implementing Save

+

Structs

+
CachePoW

Message to cache PoW difficulty factor and string

+
CachePoWBuilder

Builder for CachePoW.

+
CacheResult

Message to cache captcha result and the captcha key for which +it was generated

+
CacheResultBuilder

Builder for CacheResult.

+
CachedPoWConfig
DeleteCaptchaResult

Message to delete cached capthca result when it expires

+
DeletePoW

Message to delete cached PoW difficulty factor and string +when they expire

+
RetrivePoW

Message to retrive the the difficulty factor for the specified +string from the cache

+
VerifyCaptchaResult

Message to verify captcha result against +the stored captcha key

+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/sidebar-items.js b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/sidebar-items.js new file mode 100644 index 0000000..0612eac --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["CachePoW","Message to cache PoW difficulty factor and string"],["CachePoWBuilder","Builder for `CachePoW`."],["CacheResult","Message to cache captcha result and the captcha key for which it was generated"],["CacheResultBuilder","Builder for `CacheResult`."],["CachedPoWConfig",""],["DeleteCaptchaResult","Message to delete cached capthca result when it expires"],["DeletePoW","Message to delete cached PoW difficulty factor and string when they expire"],["RetrivePoW","Message to retrive the the difficulty factor for the specified string from the cache"],["VerifyCaptchaResult","Message to verify captcha result against the stored captcha key"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.Cache.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.Cache.html new file mode 100644 index 0000000..057caf1 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.Cache.html @@ -0,0 +1,27 @@ +m_captcha::cache::messages::Cache - Rust + +

[][src]Struct m_captcha::cache::messages::Cache

pub struct Cache {
+    pub string: String,
+    pub difficulty_factor: u32,
+    pub duration: u64,
+}

Message to cache PoW difficulty factor and string

+

+ Fields

string: Stringdifficulty_factor: u32duration: u64

Implementations

impl Cache[src]

pub fn new(p: &PoWConfig, v: &AddVisitorResult) -> Self[src]

Trait Implementations

impl<'de> Deserialize<'de> for Cache[src]

impl Handler<Cache> for HashCache[src]

cache a PoWConfig

+

type Result = MessageResult<Cache>

The type of value that this handler will return. Read more

+

impl Message for Cache[src]

type Result = CaptchaResult<()>

The type of value that this message will resolved with if it is +successful. Read more

+

impl Serialize for Cache[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CacheBuilder.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CacheBuilder.html new file mode 100644 index 0000000..2361a21 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CacheBuilder.html @@ -0,0 +1,25 @@ +m_captcha::cache::messages::CacheBuilder - Rust + +

[][src]Struct m_captcha::cache::messages::CacheBuilder

pub struct CacheBuilder { /* fields omitted */ }

Builder for Cache.

+

Implementations

impl CacheBuilder[src]

pub fn string(&mut self, value: String) -> &mut Self[src]

pub fn difficulty_factor(&mut self, value: u32) -> &mut Self[src]

pub fn duration(&mut self, value: u64) -> &mut Self[src]

pub fn build(&self) -> Result<Cache, String>[src]

Builds a new Cache.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for CacheBuilder[src]

impl Default for CacheBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CachePoW.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CachePoW.html new file mode 100644 index 0000000..8c7475f --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CachePoW.html @@ -0,0 +1,35 @@ +m_captcha::cache::messages::CachePoW - Rust + +

Struct m_captcha::cache::messages::CachePoW[][src]

pub struct CachePoW {
+    pub string: String,
+    pub difficulty_factor: u32,
+    pub duration: u64,
+    pub key: String,
+}

Message to cache PoW difficulty factor and string

+

+ Fields

string: Stringdifficulty_factor: u32duration: u64key: String

Trait Implementations

impl Clone for CachePoW[src]

impl<'de> Deserialize<'de> for CachePoW[src]

impl Handler<CachePoW> for HashCache[src]

cache a PoWConfig

+

type Result = MessageResult<CachePoW>

The type of value that this handler will return. Read more

+

impl Message for CachePoW[src]

type Result = CaptchaResult<()>

The type of value that this message will resolved with if it is +successful. Read more

+

impl Serialize for CachePoW[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CachePoWBuilder.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CachePoWBuilder.html new file mode 100644 index 0000000..f7543a5 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CachePoWBuilder.html @@ -0,0 +1,26 @@ +m_captcha::cache::messages::CachePoWBuilder - Rust + +

Struct m_captcha::cache::messages::CachePoWBuilder[][src]

pub struct CachePoWBuilder { /* fields omitted */ }

Builder for CachePoW.

+

Implementations

impl CachePoWBuilder[src]

pub fn string(&mut self, value: String) -> &mut Self[src]

pub fn difficulty_factor(&mut self, value: u32) -> &mut Self[src]

pub fn duration(&mut self, value: u64) -> &mut Self[src]

pub fn key(&mut self, value: String) -> &mut Self[src]

pub fn build(&self) -> Result<CachePoW, String>[src]

Builds a new CachePoW.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for CachePoWBuilder[src]

impl Default for CachePoWBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CacheResult.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CacheResult.html new file mode 100644 index 0000000..b1b3de9 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CacheResult.html @@ -0,0 +1,30 @@ +m_captcha::cache::messages::CacheResult - Rust + +

Struct m_captcha::cache::messages::CacheResult[][src]

pub struct CacheResult {
+    pub token: String,
+    pub key: String,
+    pub duration: u64,
+}

Message to cache captcha result and the captcha key for which +it was generated

+

+ Fields

token: Stringkey: Stringduration: u64

Trait Implementations

impl<'de> Deserialize<'de> for CacheResult[src]

impl From<CachedPoWConfig> for CacheResult[src]

impl Handler<CacheResult> for HashCache[src]

cache PoW result

+

type Result = MessageResult<CacheResult>

The type of value that this handler will return. Read more

+

impl Message for CacheResult[src]

type Result = CaptchaResult<()>

The type of value that this message will resolved with if it is +successful. Read more

+

impl Serialize for CacheResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CacheResultBuilder.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CacheResultBuilder.html new file mode 100644 index 0000000..7ab8e67 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CacheResultBuilder.html @@ -0,0 +1,26 @@ +m_captcha::cache::messages::CacheResultBuilder - Rust + +

Struct m_captcha::cache::messages::CacheResultBuilder[][src]

pub struct CacheResultBuilder { /* fields omitted */ }

Builder for CacheResult.

+

Implementations

impl CacheResultBuilder[src]

pub fn token(&mut self, value: String) -> &mut Self[src]

pub fn key(&mut self, value: String) -> &mut Self[src]

pub fn duration(&mut self, value: u64) -> &mut Self[src]

pub fn build(&self) -> Result<CacheResult, String>[src]

Builds a new CacheResult.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for CacheResultBuilder[src]

impl Default for CacheResultBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CachedPoWConfig.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CachedPoWConfig.html new file mode 100644 index 0000000..c4331f0 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.CachedPoWConfig.html @@ -0,0 +1,34 @@ +m_captcha::cache::messages::CachedPoWConfig - Rust + +

Struct m_captcha::cache::messages::CachedPoWConfig[][src]

pub struct CachedPoWConfig {
+    pub key: String,
+    pub difficulty_factor: u32,
+    pub duration: u64,
+}

+ Fields

key: Stringdifficulty_factor: u32duration: u64

Trait Implementations

impl Clone for CachedPoWConfig[src]

impl Debug for CachedPoWConfig[src]

impl Default for CachedPoWConfig[src]

impl<'de> Deserialize<'de> for CachedPoWConfig[src]

impl From<CachedPoWConfig> for CacheResult[src]

impl PartialEq<CachedPoWConfig> for CachedPoWConfig[src]

impl Serialize for CachedPoWConfig[src]

impl StructuralPartialEq for CachedPoWConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.DeleteCaptchaResult.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.DeleteCaptchaResult.html new file mode 100644 index 0000000..515370d --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.DeleteCaptchaResult.html @@ -0,0 +1,24 @@ +m_captcha::cache::messages::DeleteCaptchaResult - Rust + +

Struct m_captcha::cache::messages::DeleteCaptchaResult[][src]

pub struct DeleteCaptchaResult {
+    pub token: String,
+}

Message to delete cached capthca result when it expires

+

+ Fields

token: String

Trait Implementations

impl Handler<DeleteCaptchaResult> for HashCache[src]

Delte a PoWConfig

+

type Result = MessageResult<DeleteCaptchaResult>

The type of value that this handler will return. Read more

+

impl Message for DeleteCaptchaResult[src]

type Result = CaptchaResult<()>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.DeletePoW.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.DeletePoW.html new file mode 100644 index 0000000..bfb0129 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.DeletePoW.html @@ -0,0 +1,22 @@ +m_captcha::cache::messages::DeletePoW - Rust + +

Struct m_captcha::cache::messages::DeletePoW[][src]

pub struct DeletePoW(pub String);

Message to delete cached PoW difficulty factor and string +when they expire

+

Trait Implementations

impl Handler<DeletePoW> for HashCache[src]

Delte a PoWConfig

+

type Result = MessageResult<DeletePoW>

The type of value that this handler will return. Read more

+

impl Message for DeletePoW[src]

type Result = CaptchaResult<()>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.DeleteString.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.DeleteString.html new file mode 100644 index 0000000..a1e2c08 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.DeleteString.html @@ -0,0 +1,21 @@ +m_captcha::cache::messages::DeleteString - Rust + +

[][src]Struct m_captcha::cache::messages::DeleteString

pub struct DeleteString(pub String);

Message to delete cached PoW difficulty factor and string +when they expire

+

Trait Implementations

impl Handler<DeleteString> for HashCache[src]

Delte a PoWConfig

+

type Result = MessageResult<DeleteString>

The type of value that this handler will return. Read more

+

impl Message for DeleteString[src]

type Result = CaptchaResult<()>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.Retrive.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.Retrive.html new file mode 100644 index 0000000..2a0ae09 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.Retrive.html @@ -0,0 +1,21 @@ +m_captcha::cache::messages::Retrive - Rust + +

[][src]Struct m_captcha::cache::messages::Retrive

pub struct Retrive(pub String);

Message to retrive the the difficulty factor for the specified +string from the cache

+

Trait Implementations

impl Handler<Retrive> for HashCache[src]

Retrive PoW difficulty_factor for a PoW string

+

type Result = MessageResult<Retrive>

The type of value that this handler will return. Read more

+

impl Message for Retrive[src]

type Result = CaptchaResult<Option<u32>>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.RetrivePoW.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.RetrivePoW.html new file mode 100644 index 0000000..a8850da --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.RetrivePoW.html @@ -0,0 +1,22 @@ +m_captcha::cache::messages::RetrivePoW - Rust + +

Struct m_captcha::cache::messages::RetrivePoW[][src]

pub struct RetrivePoW(pub String);

Message to retrive the the difficulty factor for the specified +string from the cache

+

Trait Implementations

impl Handler<RetrivePoW> for HashCache[src]

Retrive PoW difficulty_factor for a PoW string

+

type Result = MessageResult<RetrivePoW>

The type of value that this handler will return. Read more

+

impl Message for RetrivePoW[src]

type Result = CaptchaResult<Option<CachedPoWConfig>>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.VerifyCaptchaResult.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.VerifyCaptchaResult.html new file mode 100644 index 0000000..84c13ce --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/messages/struct.VerifyCaptchaResult.html @@ -0,0 +1,34 @@ +m_captcha::cache::messages::VerifyCaptchaResult - Rust + +

Struct m_captcha::cache::messages::VerifyCaptchaResult[][src]

pub struct VerifyCaptchaResult {
+    pub token: String,
+    pub key: String,
+}

Message to verify captcha result against +the stored captcha key

+

+ Fields

token: Stringkey: String

Trait Implementations

impl Clone for VerifyCaptchaResult[src]

impl<'de> Deserialize<'de> for VerifyCaptchaResult[src]

impl Handler<VerifyCaptchaResult> for HashCache[src]

Retrive PoW difficulty_factor for a PoW string

+

type Result = MessageResult<VerifyCaptchaResult>

The type of value that this handler will return. Read more

+

impl Message for VerifyCaptchaResult[src]

type Result = CaptchaResult<bool>

The type of value that this message will resolved with if it is +successful. Read more

+

impl Serialize for VerifyCaptchaResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/sidebar-items.js b/api-docs/m_captcha/0.1.3/m_captcha/cache/sidebar-items.js new file mode 100644 index 0000000..d2c721a --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["hashcache","In-memory cache implementation that uses [HashMap]"],["messages","Messages that can be sent to cache data structures implementing [Save][super::Save]"]],"trait":[["Save","Describes actor handler trait impls that are required by a cache implementation"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/cache/trait.Save.html b/api-docs/m_captcha/0.1.3/m_captcha/cache/trait.Save.html new file mode 100644 index 0000000..319d3c0 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/cache/trait.Save.html @@ -0,0 +1,6 @@ +m_captcha::cache::Save - Rust + +

Trait m_captcha::cache::Save[][src]

pub trait Save: Actor + Handler<RetrivePoW> + Handler<CachePoW> + Handler<DeletePoW> + Handler<CacheResult> + Handler<VerifyCaptchaResult> + Handler<DeleteCaptchaResult> { }

Describes actor handler trait impls that are required by a cache implementation

+

Implementors

impl Save for HashCache[src]

Loading content...
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/defense/index.html b/api-docs/m_captcha/0.1.3/m_captcha/defense/index.html new file mode 100644 index 0000000..5e7bf9b --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/defense/index.html @@ -0,0 +1,35 @@ +m_captcha::defense - Rust + +

Module m_captcha::defense[][src]

Defense datatypes

+ +
+use m_captcha::{LevelBuilder, DefenseBuilder};
+DefenseBuilder::default()
+       .add_level(
+           LevelBuilder::default()
+               .visitor_threshold(50)
+               .difficulty_factor(50)
+               .unwrap()
+               .build()
+               .unwrap(),
+       )
+       .unwrap()
+       .add_level(
+           LevelBuilder::default()
+               .visitor_threshold(500)
+               .difficulty_factor(500)
+               .unwrap()
+               .build()
+               .unwrap(),
+       )
+       .unwrap()
+       .build()
+       .unwrap();
+

Structs

+
Defense

struct describes all the different Levels at which an mCaptcha system operates

+
DefenseBuilder

Builder struct for Defense

+
Level

Level struct that describes threshold-difficulty factor mapping

+
LevelBuilder

Bulder struct for Level to describe threshold-difficulty factor mapping

+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/defense/sidebar-items.js b/api-docs/m_captcha/0.1.3/m_captcha/defense/sidebar-items.js new file mode 100644 index 0000000..49f37fb --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/defense/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Defense","struct describes all the different [Level]s at which an mCaptcha system operates"],["DefenseBuilder","Builder struct for [Defense]"],["Level","Level struct that describes threshold-difficulty factor mapping"],["LevelBuilder","Bulder struct for [Level] to describe threshold-difficulty factor mapping"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/defense/struct.Defense.html b/api-docs/m_captcha/0.1.3/m_captcha/defense/struct.Defense.html new file mode 100644 index 0000000..2536aae --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/defense/struct.Defense.html @@ -0,0 +1,39 @@ +m_captcha::defense::Defense - Rust + +

Struct m_captcha::defense::Defense[][src]

pub struct Defense { /* fields omitted */ }

struct describes all the different Levels at which an mCaptcha system operates

+

Implementations

impl Defense[src]

pub fn get_difficulty(&self) -> u32[src]

! Difficulty is calculated as: +! rust ! let difficulty = u128::max_value() - u128::max_value() / difficulty_factor; ! +! The higher the difficulty_factor, the higher the difficulty. +Get difficulty factor of current level of defense

+

pub fn tighten_up(&mut self)[src]

tighten up defense. Increases defense level by a factor of one. +When defense is at max level, calling this method will have no effect

+

pub fn loosen_up(&mut self)[src]

Loosen up defense. Decreases defense level by a factor of one. +When defense is at the lowest level, calling this method will have no effect.

+

pub fn max_defense(&mut self)[src]

Set defense to maximum level

+

pub fn min_defense(&mut self)[src]

Set defense to minimum level

+

pub fn visitor_threshold(&self) -> u32[src]

Get current level's visitor threshold

+

Trait Implementations

impl Clone for Defense[src]

impl Debug for Defense[src]

impl<'de> Deserialize<'de> for Defense[src]

impl PartialEq<Defense> for Defense[src]

impl Serialize for Defense[src]

impl StructuralPartialEq for Defense[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/defense/struct.DefenseBuilder.html b/api-docs/m_captcha/0.1.3/m_captcha/defense/struct.DefenseBuilder.html new file mode 100644 index 0000000..66d5fd8 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/defense/struct.DefenseBuilder.html @@ -0,0 +1,29 @@ +m_captcha::defense::DefenseBuilder - Rust + +

Struct m_captcha::defense::DefenseBuilder[][src]

pub struct DefenseBuilder { /* fields omitted */ }

Builder struct for Defense

+

Implementations

impl DefenseBuilder[src]

pub fn add_level(&mut self, level: Level) -> CaptchaResult<&mut Self>[src]

add a level to Defense

+

pub fn build(&mut self) -> CaptchaResult<Defense>[src]

Build Defense

+

Trait Implementations

impl Clone for DefenseBuilder[src]

impl Debug for DefenseBuilder[src]

impl Default for DefenseBuilder[src]

impl PartialEq<DefenseBuilder> for DefenseBuilder[src]

impl StructuralPartialEq for DefenseBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/defense/struct.Level.html b/api-docs/m_captcha/0.1.3/m_captcha/defense/struct.Level.html new file mode 100644 index 0000000..3d2e32b --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/defense/struct.Level.html @@ -0,0 +1,32 @@ +m_captcha::defense::Level - Rust + +

Struct m_captcha::defense::Level[][src]

pub struct Level {
+    pub visitor_threshold: u32,
+    pub difficulty_factor: u32,
+}

Level struct that describes threshold-difficulty factor mapping

+

+ Fields

visitor_threshold: u32difficulty_factor: u32

Trait Implementations

impl Clone for Level[src]

impl Copy for Level[src]

impl Debug for Level[src]

impl<'de> Deserialize<'de> for Level[src]

impl PartialEq<Level> for Level[src]

impl Serialize for Level[src]

impl StructuralPartialEq for Level[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/defense/struct.LevelBuilder.html b/api-docs/m_captcha/0.1.3/m_captcha/defense/struct.LevelBuilder.html new file mode 100644 index 0000000..192eebf --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/defense/struct.LevelBuilder.html @@ -0,0 +1,36 @@ +m_captcha::defense::LevelBuilder - Rust + +

Struct m_captcha::defense::LevelBuilder[][src]

pub struct LevelBuilder { /* fields omitted */ }

Bulder struct for Level to describe threshold-difficulty factor mapping

+

Implementations

impl LevelBuilder[src]

pub fn visitor_threshold(&mut self, visitor_threshold: u32) -> &mut Self[src]

set visitor count for level

+

pub fn difficulty_factor(
    &mut self,
    difficulty_factor: u32
) -> CaptchaResult<&mut Self>
[src]

set difficulty factor for level. difficulty_factor can't be zero because +Difficulty is calculated as:

+ +
+let difficulty_factor = 500;
+let difficulty = u128::max_value() - u128::max_value() / difficulty_factor;
+

the higher the difficulty_factor, the higher the difficulty.

+

pub fn build(&mut self) -> CaptchaResult<Level>[src]

build Level struct

+

Trait Implementations

impl Clone for LevelBuilder[src]

impl Copy for LevelBuilder[src]

impl Debug for LevelBuilder[src]

impl Default for LevelBuilder[src]

impl PartialEq<LevelBuilder> for LevelBuilder[src]

impl StructuralPartialEq for LevelBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/errors/enum.CaptchaError.html b/api-docs/m_captcha/0.1.3/m_captcha/errors/enum.CaptchaError.html new file mode 100644 index 0000000..1afc0d1 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/errors/enum.CaptchaError.html @@ -0,0 +1,67 @@ +m_captcha::errors::CaptchaError - Rust + +

Enum m_captcha::errors::CaptchaError[][src]

pub enum CaptchaError {
+    LevelEmpty,
+    DifficultyFactorZero,
+    CaptchaDurationZero,
+    SetDifficultyFactor,
+    SetVisitorThreshold,
+    DuplicateVisitorCount,
+    DecreaseingDifficultyFactor,
+    MailboxError,
+    InsuffiencientDifficulty,
+    StringNotFound,
+    MCaptchaKeyValidationFail,
+    InvalidPoW,
+    PleaseSetValue(String),
+}

Error datatype

+

+ Variants

+
LevelEmpty

When configuring m_captcha, DefenseBuilder +must be passed atleast one LevelConfig if not this error will arise

+
DifficultyFactorZero

Visitor count must be a whole number(zero and above). +When configuring m_captcha, LevelBuilder. +difficulty_factor must be set to greater than zero.

+
CaptchaDurationZero

captcha cooldown duration must be greater than 0

+
SetDifficultyFactor

Difficulty factor must be set

+
SetVisitorThreshold

Visitor threshold must be set

+
DuplicateVisitorCount

Visitor count must be Unique

+
DecreaseingDifficultyFactor

Difficulty factor should increase with level

+
MailboxError

Difficulty factor should increase with level

+
InsuffiencientDifficulty

Happens when submitted work doesn't satisfy the required +difficulty factor

+
StringNotFound

Happens when submitted work is computed over string that +isn't in cache

+
MCaptchaKeyValidationFail

Happens when submitted work is computed over configuration intended for +a different mCAptcha sitekey

+
InvalidPoW

Submitted PoW is invalid

+
PleaseSetValue(String)

Used in builder structs when a value is not set

+

Trait Implementations

impl Clone for CaptchaError[src]

impl Debug for CaptchaError[src]

impl Display for CaptchaError[src]

impl Error for CaptchaError[src]

impl PartialEq<CaptchaError> for CaptchaError[src]

impl StructuralPartialEq for CaptchaError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/errors/index.html b/api-docs/m_captcha/0.1.3/m_captcha/errors/index.html new file mode 100644 index 0000000..7640a90 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/errors/index.html @@ -0,0 +1,10 @@ +m_captcha::errors - Rust + +

Module m_captcha::errors[][src]

Errors and Result module

+

Enums

+
CaptchaError

Error datatype

+

Type Definitions

+
CaptchaResult

Result datatype for m_captcha

+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/errors/sidebar-items.js b/api-docs/m_captcha/0.1.3/m_captcha/errors/sidebar-items.js new file mode 100644 index 0000000..ddfbf69 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/errors/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["CaptchaError","Error datatype"]],"type":[["CaptchaResult","[Result] datatype for m_captcha"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/errors/type.CaptchaResult.html b/api-docs/m_captcha/0.1.3/m_captcha/errors/type.CaptchaResult.html new file mode 100644 index 0000000..1300051 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/errors/type.CaptchaResult.html @@ -0,0 +1,6 @@ +m_captcha::errors::CaptchaResult - Rust + +

Type Definition m_captcha::errors::CaptchaResult[][src]

type CaptchaResult<V> = Result<V, CaptchaError>;

Result datatype for m_captcha

+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/index.html b/api-docs/m_captcha/0.1.3/m_captcha/index.html new file mode 100644 index 0000000..adaf84c --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/index.html @@ -0,0 +1,179 @@ +m_captcha - Rust + +

Crate m_captcha[][src]

mCaptcha is a proof of work based Denaial-of-Service attack protection system. +This is is a server library that you can embed in your services to protect your +servers.

+

A commercial managed solution is in the works but I'd much rather prefer +folks host their own instances as it will make the more decentralized and free.

+

In mCaptcha, defense is adjusted in discrete levels that depend on the +ammount of traffic that a service is experiencing. So users of this library are +requested to benchmark their target machines before configuring their mCaptcha +component.

+

Terminology:

+
    +
  • Difficulty(Factor): Minimum ammount of work that a client must do to make a valid +request.
  • +
  • Defense: A datatype that various visitor-difficulty mappigns
  • +
  • Visitor: Smallest unit of traffic, usually a single request. The more you have, the busier +your service is. Determines mCaptcha defense defense
  • +
  • Visitor threshold: The threshold at which MCaptcha will adjust defense defense
  • +
  • Cache : A datatype that implements Save. Used to store +PoW requirements to defend against replay attacks and dictionary attacks.
  • +
  • Master: A datatype that manages +MCaptcha actors. Works like a DNS for +AddVisitor messages.
  • +
  • System: mCaptcha system that manages cache, master and provides +useful abstractions. An mCaptcha system/instance can have only a single +System
  • +
+

Example:

+
+use m_captcha::{
+    cache::{messages::VerifyCaptchaResult, HashCache},
+    master::{AddSiteBuilder, Master},
+    pow::{ConfigBuilder, Work},
+    system::SystemBuilder,
+    DefenseBuilder, LevelBuilder, MCaptchaBuilder,
+};
+// traits from actix needs to be in scope for starting actor
+use actix::prelude::*;
+
+#[actix_rt::main]
+async fn main() -> std::io::Result<()> {
+    // start cahce actor
+    // cache is used to store PoW requirements that are sent to clients
+    // This way, it can be verified that the client computed work over a config
+    // that _we_ sent. Offers protection against rainbow tables powered dictionary attacks
+    let cache = HashCache::default().start();
+
+    // create PoW config with unique salt. Salt has to be safely guarded.
+    // salts protect us from replay attacks
+    let pow = ConfigBuilder::default()
+        .salt("myrandomsaltisnotlongenoug".into())
+        .build()
+        .unwrap();
+
+    // start master actor. Master actor is responsible for managing MCaptcha actors
+    // each mCaptcha system should have only one master
+    let master = Master::new(5).start();
+
+    // Create system. System encapsulates master and cache and provides useful abstraction
+    // each mCaptcha system should have only one system
+    let system = SystemBuilder::default()
+        .master(master)
+        .cache(cache)
+        .pow(pow.clone())
+        .build()
+        .unwrap();
+
+    // configure defense. This is a per site configuration. A site can have several levels
+    // of defenses configured
+    let defense = DefenseBuilder::default()
+        // add as many defense as you see fit
+        .add_level(
+            LevelBuilder::default()
+                // visitor_threshold is the threshold/limit at which
+                // mCaptcha will adjust difficulty defense
+                // it is advisable to set small values for the first
+                // defense visitor_threshold and difficulty_factor
+                // as this will be the work that clients will be
+                // computing when there's no load
+                .visitor_threshold(50)
+                .difficulty_factor(500)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .add_level(
+            LevelBuilder::default()
+                .visitor_threshold(5000)
+                .difficulty_factor(50000)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .build()
+        .unwrap();
+
+    // create and start MCaptcha actor that uses the above defense configuration
+    // This is what manages the difficulty factor of sites that an mCaptcha protects
+    let mcaptcha = MCaptchaBuilder::default()
+        .defense(defense)
+        // leaky bucket algorithm's emission interval
+        .duration(30)
+        //   .cache(cache)
+        .build()
+        .unwrap()
+        .start();
+
+    // unique value identifying an MCaptcha actor
+    let mcaptcha_name = "batsense.net";
+
+    // add MCaptcha to Master
+    let msg = AddSiteBuilder::default()
+        .id(mcaptcha_name.into())
+        .addr(mcaptcha.clone())
+        .build()
+        .unwrap();
+    system.master.send(msg).await.unwrap();
+
+    // Get PoW config. Should be called everytime there's a visitor for a
+    // managed site(here mcaptcha_name)
+    let work_req = system.get_pow(mcaptcha_name.into()).await.unwrap();
+
+    // the following computation should be done on the client but for the purpose
+    // of this illustration, we are going to do it on the server it self
+    let work = pow
+        .prove_work(&work_req.string, work_req.difficulty_factor)
+        .unwrap();
+
+    // the payload that the client sends to the server
+    let payload = Work {
+        string: work_req.string,
+        result: work.result,
+        nonce: work.nonce,
+        key: mcaptcha_name.into(),
+    };
+
+    // Server evaluates client's work. Returns true if everything
+    // checksout and Err() if something fishy is happening
+    let res = system.verify_pow(payload.clone()).await;
+    assert!(res.is_ok());
+
+   // The client should submit the token to the mCaptcha protected service
+   // The service should validate the token received from the client
+   // with the mCaptcha server before processing client's
+   // request
+
+   // mcaptcha protected service sends the following paylaod to mCaptcha
+   // server:
+   let verify_msg = VerifyCaptchaResult {
+       token: res.unwrap(),
+       key: mcaptcha_name.into(),
+   };
+
+   // on mCaptcha server:
+   let res = system.validate_verification_tokens(verify_msg).await;
+   // mCaptcha will return true if token is valid and false if
+   // token is invalid
+   assert!(res.is_ok());
+   assert!(res.unwrap());
+
+   Ok(())
+}
+

Re-exports

+
pub use crate::cache::hashcache::HashCache;
pub use defense::Defense;
pub use defense::DefenseBuilder;
pub use defense::LevelBuilder;
pub use mcaptcha::MCaptcha;
pub use mcaptcha::MCaptchaBuilder;

Modules

+
cache

message datatypes to interact with MCaptcha actor +Cache is used to save proofof work details and nonces to prevent replay attacks +and rainbow/dictionary attacks

+
defense

Defense datatypes

+
errors

Errors and Result module

+
master

Master actor module that manages MCaptcha actors

+
mcaptcha

MCaptcha actor module that manages defense levels

+
pow

PoW datatypes used in client-server interaction

+
system

module describing mCaptcha system

+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/master/index.html b/api-docs/m_captcha/0.1.3/m_captcha/master/index.html new file mode 100644 index 0000000..9e3d685 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/master/index.html @@ -0,0 +1,16 @@ +m_captcha::master - Rust + +

Module m_captcha::master[][src]

Master actor module that manages MCaptcha actors

+

Structs

+
AddSite

Message to add an MCaptcha actor to Master

+
AddSiteBuilder

Builder for AddSite.

+
CleanUp

Message to clean up master of MCaptcha actors with zero visitor count

+
GetSite

Message to get an MCaptcha actor from master

+
Master

This Actor manages the MCaptcha actors. +A service can have several MCaptcha actors with +varying Defense configurations +so a "master" actor is needed to manage them all

+
RemoveSite

Message to delete MCaptcha actor

+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/master/sidebar-items.js b/api-docs/m_captcha/0.1.3/m_captcha/master/sidebar-items.js new file mode 100644 index 0000000..c5ff518 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/master/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["AddSite","Message to add an [MCaptcha] actor to [Master]"],["AddSiteBuilder","Builder for `AddSite`."],["CleanUp","Message to clean up master of [MCaptcha] actors with zero visitor count"],["GetSite","Message to get an [MCaptcha] actor from master"],["Master","This Actor manages the [MCaptcha] actors. A service can have several [MCaptcha] actors with varying [Defense][crate::defense::Defense] configurations so a \"master\" actor is needed to manage them all"],["RemoveSite","Message to delete [MCaptcha] actor"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/master/struct.AddSite.html b/api-docs/m_captcha/0.1.3/m_captcha/master/struct.AddSite.html new file mode 100644 index 0000000..0103086 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/master/struct.AddSite.html @@ -0,0 +1,24 @@ +m_captcha::master::AddSite - Rust + +

Struct m_captcha::master::AddSite[][src]

pub struct AddSite {
+    pub id: String,
+    pub addr: Addr<MCaptcha>,
+}

Message to add an MCaptcha actor to Master

+

+ Fields

id: Stringaddr: Addr<MCaptcha>

Trait Implementations

impl Handler<AddSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Message for AddSite[src]

type Result = ()

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/master/struct.AddSiteBuilder.html b/api-docs/m_captcha/0.1.3/m_captcha/master/struct.AddSiteBuilder.html new file mode 100644 index 0000000..a625a07 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/master/struct.AddSiteBuilder.html @@ -0,0 +1,26 @@ +m_captcha::master::AddSiteBuilder - Rust + +

Struct m_captcha::master::AddSiteBuilder[][src]

pub struct AddSiteBuilder { /* fields omitted */ }

Builder for AddSite.

+

Implementations

impl AddSiteBuilder[src]

pub fn id(&mut self, value: String) -> &mut Self[src]

pub fn addr(&mut self, value: Addr<MCaptcha>) -> &mut Self[src]

pub fn build(&self) -> Result<AddSite, String>[src]

Builds a new AddSite.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for AddSiteBuilder[src]

impl Default for AddSiteBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/master/struct.CleanUp.html b/api-docs/m_captcha/0.1.3/m_captcha/master/struct.CleanUp.html new file mode 100644 index 0000000..274df9f --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/master/struct.CleanUp.html @@ -0,0 +1,20 @@ +m_captcha::master::CleanUp - Rust + +

Struct m_captcha::master::CleanUp[][src]

pub struct CleanUp;

Message to clean up master of MCaptcha actors with zero visitor count

+

Trait Implementations

impl Handler<CleanUp> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Message for CleanUp[src]

type Result = ()

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/master/struct.GetSite.html b/api-docs/m_captcha/0.1.3/m_captcha/master/struct.GetSite.html new file mode 100644 index 0000000..3441e33 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/master/struct.GetSite.html @@ -0,0 +1,20 @@ +m_captcha::master::GetSite - Rust + +

Struct m_captcha::master::GetSite[][src]

pub struct GetSite(pub String);

Message to get an MCaptcha actor from master

+

Trait Implementations

impl Handler<GetSite> for Master[src]

type Result = MessageResult<GetSite>

The type of value that this handler will return. Read more

+

impl Message for GetSite[src]

type Result = Option<Addr<MCaptcha>>

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/master/struct.Master.html b/api-docs/m_captcha/0.1.3/m_captcha/master/struct.Master.html new file mode 100644 index 0000000..aafcf86 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/master/struct.Master.html @@ -0,0 +1,47 @@ +m_captcha::master::Master - Rust + +

Struct m_captcha::master::Master[][src]

pub struct Master { /* fields omitted */ }

This Actor manages the MCaptcha actors. +A service can have several MCaptcha actors with +varying Defense configurations +so a "master" actor is needed to manage them all

+

Implementations

impl Master[src]

pub fn add_site(&mut self, details: AddSite)[src]

add MCaptcha actor to Master

+

pub fn new(gc: u64) -> Self[src]

create new master +accepts a u64 to configure garbage collection period

+

pub fn get_site<'a, 'b>(&'a mut self, id: &'b str) -> Option<Addr<MCaptcha>>[src]

get MCaptcha actor from Master

+

pub fn rm_site(&mut self, id: &str)[src]

remvoes MCaptcha actor from Master

+

Trait Implementations

impl Actor for Master[src]

type Context = Context<Self>

Actor execution context type

+

impl Clone for Master[src]

impl Handler<AddSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Handler<CleanUp> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Handler<GetSite> for Master[src]

type Result = MessageResult<GetSite>

The type of value that this handler will return. Read more

+

impl Handler<RemoveSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/master/struct.RemoveSite.html b/api-docs/m_captcha/0.1.3/m_captcha/master/struct.RemoveSite.html new file mode 100644 index 0000000..05f2f9e --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/master/struct.RemoveSite.html @@ -0,0 +1,20 @@ +m_captcha::master::RemoveSite - Rust + +

Struct m_captcha::master::RemoveSite[][src]

pub struct RemoveSite(pub String);

Message to delete MCaptcha actor

+

Trait Implementations

impl Handler<RemoveSite> for Master[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Message for RemoveSite[src]

type Result = ()

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/index.html b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/index.html new file mode 100644 index 0000000..fd70cba --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/index.html @@ -0,0 +1,70 @@ +m_captcha::mcaptcha - Rust + +

Module m_captcha::mcaptcha[][src]

MCaptcha actor module that manages defense levels

+

Usage:

+
+use m_captcha::{mcaptcha::AddVisitor, MCaptchaBuilder, cache::HashCache, LevelBuilder, DefenseBuilder};
+// traits from actix needs to be in scope for starting actor
+use actix::prelude::*;
+
+#[actix_rt::main]
+async fn main() -> std::io::Result<()> {
+    // configure defense
+    let defense = DefenseBuilder::default()
+        // add as many levels as you see fit
+        .add_level(
+            LevelBuilder::default()
+                // visitor_threshold is the threshold/limit at which
+                // mCaptcha will adjust difficulty levels
+                // it is advisable to set small values for the first
+                // levels visitor_threshold and difficulty_factor
+                // as this will be the work that clients will be
+                // computing when there's no load
+                .visitor_threshold(50)
+                .difficulty_factor(500)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .add_level(
+            LevelBuilder::default()
+                .visitor_threshold(5000)
+                .difficulty_factor(50000)
+                .unwrap()
+                .build()
+                .unwrap(),
+        )
+        .unwrap()
+        .build()
+        .unwrap();
+
+    // create and start MCaptcha actor
+    //let cache = HashCache::default().start();
+    let mcaptcha = MCaptchaBuilder::default()
+        .defense(defense)
+        // leaky bucket algorithm's emission interval
+        .duration(30)
+        .build()
+        .unwrap()
+        .start();
+
+    // increment count when user visits protected routes
+    mcaptcha.send(AddVisitor).await.unwrap();
+
+    Ok(())
+}
+

Structs

+
AddVisitor

Message to increment the visitor count +returns difficulty factor and lifetime

+
AddVisitorResult

Struct representing the return datatime of +AddVisitor message. Contains MCaptcha lifetime +and difficulty factor

+
GetCurrentVisitorCount

Message to get the visitor count

+
MCaptcha

This struct represents the mCaptcha state and is used +to configure leaky-bucket lifetime and manage defense

+
MCaptchaBuilder

Builder for MCaptcha

+
Stop

Message to stop MCaptcha

+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/sidebar-items.js b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/sidebar-items.js new file mode 100644 index 0000000..a4685eb --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["AddVisitor","Message to increment the visitor count returns difficulty factor and lifetime"],["AddVisitorResult","Struct representing the return datatime of [AddVisitor] message. Contains MCaptcha lifetime and difficulty factor"],["GetCurrentVisitorCount","Message to get the visitor count"],["MCaptcha","This struct represents the mCaptcha state and is used to configure leaky-bucket lifetime and manage defense"],["MCaptchaBuilder","Builder for [MCaptcha]"],["Stop","Message to stop [MCaptcha]"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.AddVisitor.html b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.AddVisitor.html new file mode 100644 index 0000000..bde261e --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.AddVisitor.html @@ -0,0 +1,21 @@ +m_captcha::mcaptcha::AddVisitor - Rust + +

Struct m_captcha::mcaptcha::AddVisitor[][src]

pub struct AddVisitor;

Message to increment the visitor count +returns difficulty factor and lifetime

+

Trait Implementations

impl Handler<AddVisitor> for MCaptcha[src]

type Result = MessageResult<AddVisitor>

The type of value that this handler will return. Read more

+

impl Message for AddVisitor[src]

type Result = AddVisitorResult

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.AddVisitorResult.html b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.AddVisitorResult.html new file mode 100644 index 0000000..06ac2e0 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.AddVisitorResult.html @@ -0,0 +1,31 @@ +m_captcha::mcaptcha::AddVisitorResult - Rust + +

Struct m_captcha::mcaptcha::AddVisitorResult[][src]

pub struct AddVisitorResult {
+    pub duration: u64,
+    pub difficulty_factor: u32,
+}

Struct representing the return datatime of +AddVisitor message. Contains MCaptcha lifetime +and difficulty factor

+

+ Fields

duration: u64difficulty_factor: u32

Trait Implementations

impl Clone for AddVisitorResult[src]

impl Debug for AddVisitorResult[src]

impl<'de> Deserialize<'de> for AddVisitorResult[src]

impl Serialize for AddVisitorResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.GetCurrentVisitorCount.html b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.GetCurrentVisitorCount.html new file mode 100644 index 0000000..5eb81a8 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.GetCurrentVisitorCount.html @@ -0,0 +1,20 @@ +m_captcha::mcaptcha::GetCurrentVisitorCount - Rust + +

Struct m_captcha::mcaptcha::GetCurrentVisitorCount[][src]

pub struct GetCurrentVisitorCount;

Message to get the visitor count

+

Trait Implementations

impl Handler<GetCurrentVisitorCount> for MCaptcha[src]

type Result = MessageResult<GetCurrentVisitorCount>

The type of value that this handler will return. Read more

+

impl Message for GetCurrentVisitorCount[src]

type Result = u32

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.MCaptcha.html b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.MCaptcha.html new file mode 100644 index 0000000..0e19b36 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.MCaptcha.html @@ -0,0 +1,45 @@ +m_captcha::mcaptcha::MCaptcha - Rust + +

Struct m_captcha::mcaptcha::MCaptcha[][src]

pub struct MCaptcha { /* fields omitted */ }

This struct represents the mCaptcha state and is used +to configure leaky-bucket lifetime and manage defense

+

Implementations

impl MCaptcha[src]

pub fn add_visitor(&mut self)[src]

increments the visitor count by one

+

pub fn decrement_visitor(&mut self)[src]

decrements the visitor count by one

+

pub fn get_difficulty(&self) -> u32[src]

get current difficulty factor

+

pub fn get_duration(&self) -> u64[src]

get MCaptcha's lifetime

+

Trait Implementations

impl Actor for MCaptcha[src]

type Context = Context<Self>

Actor execution context type

+

impl Clone for MCaptcha[src]

impl Debug for MCaptcha[src]

impl<'de> Deserialize<'de> for MCaptcha[src]

impl Handler<AddVisitor> for MCaptcha[src]

type Result = MessageResult<AddVisitor>

The type of value that this handler will return. Read more

+

impl Handler<GetCurrentVisitorCount> for MCaptcha[src]

type Result = MessageResult<GetCurrentVisitorCount>

The type of value that this handler will return. Read more

+

impl Handler<Stop> for MCaptcha[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Serialize for MCaptcha[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.MCaptchaBuilder.html b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.MCaptchaBuilder.html new file mode 100644 index 0000000..ef8f280 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.MCaptchaBuilder.html @@ -0,0 +1,29 @@ +m_captcha::mcaptcha::MCaptchaBuilder - Rust + +

Struct m_captcha::mcaptcha::MCaptchaBuilder[][src]

pub struct MCaptchaBuilder { /* fields omitted */ }

Builder for MCaptcha

+

Implementations

impl MCaptchaBuilder[src]

pub fn defense(&mut self, d: Defense) -> &mut Self[src]

set defense

+

pub fn duration(&mut self, d: u64) -> &mut Self[src]

set duration

+

pub fn build(&mut self) -> CaptchaResult<MCaptcha>[src]

Builds new MCaptcha

+

Trait Implementations

impl Clone for MCaptchaBuilder[src]

impl Debug for MCaptchaBuilder[src]

impl Default for MCaptchaBuilder[src]

impl<'de> Deserialize<'de> for MCaptchaBuilder[src]

impl Serialize for MCaptchaBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.Stop.html b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.Stop.html new file mode 100644 index 0000000..524f3d7 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.Stop.html @@ -0,0 +1,20 @@ +m_captcha::mcaptcha::Stop - Rust + +

Struct m_captcha::mcaptcha::Stop[][src]

pub struct Stop;

Message to stop MCaptcha

+

Trait Implementations

impl Handler<Stop> for MCaptcha[src]

type Result = ()

The type of value that this handler will return. Read more

+

impl Message for Stop[src]

type Result = ()

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.Visitor.html b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.Visitor.html new file mode 100644 index 0000000..fa6516e --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.Visitor.html @@ -0,0 +1,20 @@ +m_captcha::mcaptcha::Visitor - Rust + +

[][src]Struct m_captcha::mcaptcha::Visitor

pub struct Visitor;

Message to increment the visitor count +returns difficulty factor and lifetime

+

Trait Implementations

impl Handler<Visitor> for MCaptcha[src]

type Result = MessageResult<Visitor>

The type of value that this handler will return. Read more

+

impl Message for Visitor[src]

type Result = VisitorResult

The type of value that this message will resolved with if it is +successful. Read more

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.VisitorResult.html b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.VisitorResult.html new file mode 100644 index 0000000..8dc6f93 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/mcaptcha/struct.VisitorResult.html @@ -0,0 +1,21 @@ +m_captcha::mcaptcha::VisitorResult - Rust + +

[][src]Struct m_captcha::mcaptcha::VisitorResult

pub struct VisitorResult {
+    pub duration: u64,
+    pub difficulty_factor: u32,
+}

Struct representing the return datatime of +Visitor message. Contains MCaptcha lifetime +and difficulty factor

+

+ Fields

duration: u64difficulty_factor: u32

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/pow/index.html b/api-docs/m_captcha/0.1.3/m_captcha/pow/index.html new file mode 100644 index 0000000..77d7583 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/pow/index.html @@ -0,0 +1,10 @@ +m_captcha::pow - Rust + +

Module m_captcha::pow[][src]

PoW datatypes used in client-server interaction

+

Structs

+
ConfigBuilder

Builder for Config.

+
PoWConfig

PoW requirement datatype that is be sent to clients for generating PoW

+
Work

PoW datatype that clients send to server

+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/pow/sidebar-items.js b/api-docs/m_captcha/0.1.3/m_captcha/pow/sidebar-items.js new file mode 100644 index 0000000..66a8cb8 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/pow/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["ConfigBuilder","Builder for `Config`."],["PoWConfig","PoW requirement datatype that is be sent to clients for generating PoW"],["Work","PoW datatype that clients send to server"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/pow/struct.ConfigBuilder.html b/api-docs/m_captcha/0.1.3/m_captcha/pow/struct.ConfigBuilder.html new file mode 100644 index 0000000..c47314f --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/pow/struct.ConfigBuilder.html @@ -0,0 +1,26 @@ +m_captcha::pow::ConfigBuilder - Rust + +

Struct m_captcha::pow::ConfigBuilder[]

pub struct ConfigBuilder { /* fields omitted */ }

Builder for Config.

+

Implementations

impl ConfigBuilder

pub fn salt(&mut self, value: String) -> &mut ConfigBuilder

pub fn build(&self) -> Result<Config, ConfigBuilderError>

Builds a new Config.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for ConfigBuilder

impl Default for ConfigBuilder

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/pow/struct.PoWConfig.html b/api-docs/m_captcha/0.1.3/m_captcha/pow/struct.PoWConfig.html new file mode 100644 index 0000000..5958252 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/pow/struct.PoWConfig.html @@ -0,0 +1,30 @@ +m_captcha::pow::PoWConfig - Rust + +

Struct m_captcha::pow::PoWConfig[][src]

pub struct PoWConfig {
+    pub string: String,
+    pub difficulty_factor: u32,
+}

PoW requirement datatype that is be sent to clients for generating PoW

+

+ Fields

string: Stringdifficulty_factor: u32

Implementations

impl PoWConfig[src]

pub fn new(m: u32) -> Self[src]

create new instance of PoWConfig

+

Trait Implementations

impl Clone for PoWConfig[src]

impl Debug for PoWConfig[src]

impl<'de> Deserialize<'de> for PoWConfig[src]

impl Serialize for PoWConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/pow/struct.Work.html b/api-docs/m_captcha/0.1.3/m_captcha/pow/struct.Work.html new file mode 100644 index 0000000..ab232c9 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/pow/struct.Work.html @@ -0,0 +1,31 @@ +m_captcha::pow::Work - Rust + +

Struct m_captcha::pow::Work[][src]

pub struct Work {
+    pub string: String,
+    pub result: String,
+    pub nonce: u64,
+    pub key: String,
+}

PoW datatype that clients send to server

+

+ Fields

string: Stringresult: Stringnonce: u64key: String

Trait Implementations

impl Clone for Work[src]

impl Debug for Work[src]

impl<'de> Deserialize<'de> for Work[src]

impl Serialize for Work[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/sidebar-items.js b/api-docs/m_captcha/0.1.3/m_captcha/sidebar-items.js new file mode 100644 index 0000000..454ab30 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["cache","message datatypes to interact with [MCaptcha] actor Cache is used to save proofof work details and nonces to prevent replay attacks and rainbow/dictionary attacks"],["defense","Defense datatypes"],["errors","Errors and Result module"],["master","[Master] actor module that manages [MCaptcha] actors"],["mcaptcha","MCaptcha actor module that manages defense levels"],["pow","PoW datatypes used in client-server interaction"],["system","module describing mCaptcha system"]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/system/index.html b/api-docs/m_captcha/0.1.3/m_captcha/system/index.html new file mode 100644 index 0000000..ca0e4cd --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/system/index.html @@ -0,0 +1,9 @@ +m_captcha::system - Rust + +

Module m_captcha::system[][src]

module describing mCaptcha system

+

Structs

+
System

struct describing various bits of data required for an mCaptcha system

+
SystemBuilder

Builder for System.

+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/system/sidebar-items.js b/api-docs/m_captcha/0.1.3/m_captcha/system/sidebar-items.js new file mode 100644 index 0000000..61ff7ad --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/system/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["System","struct describing various bits of data required for an mCaptcha system"],["SystemBuilder","Builder for `System`."]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/system/struct.System.html b/api-docs/m_captcha/0.1.3/m_captcha/system/struct.System.html new file mode 100644 index 0000000..26fa524 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/system/struct.System.html @@ -0,0 +1,29 @@ +m_captcha::system::System - Rust + +

Struct m_captcha::system::System[][src]

pub struct System<T: Save> {
+    pub master: Addr<Master>,
+    // some fields omitted
+}

struct describing various bits of data required for an mCaptcha system

+

+ Fields

master: Addr<Master>

Implementations

impl<T> System<T> where
    T: Save,
    <T as Actor>::Context: ToEnvelope<T, CachePoW> + ToEnvelope<T, RetrivePoW> + ToEnvelope<T, CacheResult> + ToEnvelope<T, VerifyCaptchaResult>, 
[src]

pub async fn get_pow(&self, id: String) -> Option<PoWConfig>[src]

utility function to get difficulty factor of site id and cache it

+

pub async fn verify_pow(&self, work: Work) -> CaptchaResult<String>[src]

utility function to verify Work

+

pub async fn validate_verification_tokens(
    &self,
    msg: VerifyCaptchaResult
) -> CaptchaResult<bool>
[src]

utility function to validate verification tokens

+

Trait Implementations

impl<T: Clone + Save> Clone for System<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for System<T>[src]

impl<T> Send for System<T>[src]

impl<T> Sync for System<T>[src]

impl<T> Unpin for System<T>[src]

impl<T> !UnwindSafe for System<T>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/m_captcha/system/struct.SystemBuilder.html b/api-docs/m_captcha/0.1.3/m_captcha/system/struct.SystemBuilder.html new file mode 100644 index 0000000..14c53a6 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/m_captcha/system/struct.SystemBuilder.html @@ -0,0 +1,26 @@ +m_captcha::system::SystemBuilder - Rust + +

Struct m_captcha::system::SystemBuilder[][src]

pub struct SystemBuilder<T: Save> { /* fields omitted */ }

Builder for System.

+

Implementations

impl<T: Save + Clone> SystemBuilder<T>[src]

pub fn master(&mut self, value: Addr<Master>) -> &mut Self[src]

pub fn cache(&mut self, value: Addr<T>) -> &mut Self[src]

pub fn pow(&mut self, value: Config) -> &mut Self[src]

pub fn build(&self) -> Result<System<T>, String>[src]

Builds a new System.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl<T: Clone + Save> Clone for SystemBuilder<T>[src]

impl<T: Default + Save> Default for SystemBuilder<T>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/main.js b/api-docs/m_captcha/0.1.3/main.js new file mode 100644 index 0000000..7217fe8 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/main.js @@ -0,0 +1,8 @@ +if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}(function(){var rustdocVars=document.getElementById("rustdoc-vars");if(rustdocVars){window.rootPath=rustdocVars.attributes["data-root-path"].value;window.currentCrate=rustdocVars.attributes["data-current-crate"].value}var sidebarVars=document.getElementById("sidebar-vars");if(sidebarVars){window.sidebarCurrent={name:sidebarVars.attributes["data-name"].value,ty:sidebarVars.attributes["data-ty"].value,relpath:sidebarVars.attributes["data-relpath"].value,}}}());function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}function getSearchInput(){return document.getElementsByClassName("search-input")[0]}function getSearchElement(){return document.getElementById("search")}function getThemesElement(){return document.getElementById("theme-choices")}function getThemePickerElement(){return document.getElementById("theme-picker")}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function focusSearchBar(){getSearchInput().focus()}function defocusSearchBar(){getSearchInput().blur()}(function(){"use strict";var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var disableShortcuts=getSettingValue("disable-shortcuts")==="true";var search_input=getSearchInput();var searchTimeout=null;var toggleAllDocsId="toggle-all-docs";var currentTab=0;var mouseMovedAfterSearch=true;var titleBeforeSearch=document.title;var searchTitle=null;function clearInputTimeout(){if(searchTimeout!==null){clearTimeout(searchTimeout);searchTimeout=null}}function getPageId(){if(window.location.hash){var tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}function showSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(main,"hidden");removeClass(search,"hidden");mouseMovedAfterSearch=false;document.title=searchTitle}function hideSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=titleBeforeSearch}var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function getQueryStringParams(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function isHidden(elem){return elem.offsetHeight===0}var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=getSearchElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){hideSearchResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(hash,"",getNakedUrl()+window.location.search+"#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}elem=document.getElementById(savedHash.slice(1));if(!elem||!isHidden(elem)){return}var parent=elem.parentNode;if(parent&&hasClass(parent,"impl-items")){onEachLazy(parent.getElementsByClassName("collapsed"),function(e){if(e.parentNode===parent){e.click();return true}});if(isHidden(elem)){if(hasClass(parent.lastElementChild,"collapse-toggle")){parent.lastElementChild.click()}}}}}function highlightSourceLines(match,ev){if(typeof match==="undefined"){hideSidebar();match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to0){collapseDocs(collapses[0],"show")}}}}function getHelpElement(){buildHelperPopup();return document.getElementById("help")}function displayHelp(display,ev,help){help=help?help:getHelpElement();if(display===true){if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else if(hasClass(help,"hidden")===false){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}function handleEscape(ev){var help=getHelpElement();var search=getSearchElement();if(hasClass(help,"hidden")===false){displayHelp(false,ev,help)}else if(hasClass(search,"hidden")===false){clearInputTimeout();ev.preventDefault();hideSearchResults(search)}defocusSearchBar();hideThemeButtonState()}function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts===true){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();focusSearchBar();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:var themePicker=getThemePickerElement();if(themePicker.parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!=="theme-picker"){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!=="theme-picker"){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id==="theme-picker"&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}function findParentElement(elem,tagName){do{if(elem&&elem.tagName===tagName){return elem}elem=elem.parentNode}while(elem);return null}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);document.addEventListener("mousemove",function(){mouseMovedAfterSearch=true});var handleSourceHighlight=(function(){var prev_line_id=0;var set_fragment=function(name){var x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return function(ev){var cur_line_id=parseInt(ev.target.id,10);ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());document.addEventListener("click",function(ev){if(hasClass(ev.target,"help-button")){displayHelp(true,ev)}else if(hasClass(ev.target,"collapse-toggle")){collapseDocs(ev.target,"toggle")}else if(hasClass(ev.target.parentNode,"collapse-toggle")){collapseDocs(ev.target.parentNode,"toggle")}else if(ev.target.tagName==="SPAN"&&hasClass(ev.target.parentNode,"line-numbers")){handleSourceHighlight(ev)}else if(hasClass(getHelpElement(),"hidden")===false){var help=getHelpElement();var is_inside_help_popup=ev.target!==help&&help.contains(ev.target);if(is_inside_help_popup===false){addClass(help,"hidden");removeClass(document.body,"blur")}}else{var a=findParentElement(ev.target,"A");if(a&&a.hash){expandSection(a.hash.replace(/^#/,""))}}});(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=window.rootPath.match(/\.\.\//g).length+1;for(i=0;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;if(isType!==true||obj.type){var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnProperty(results,entry)){ar.push(results[entry])}}results=ar;var i,len,result;for(i=0,len=results.length;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});for(i=0,len=results.length;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function getObjectFromId(id){if(typeof id==="number"){return searchIndex[id]}return{'name':id}}function checkGenerics(obj,val){var lev_distance=MAX_LEV_DISTANCE+1;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var total=0;var done=0;var vlength=val.generics.length;for(var y=0;yGENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var allFound=true;len=val.generics.length;for(y=0;allFound===true&&yGENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch===true){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){return obj[GENERICS_DATA].some(function(name){return name===val.name})}return false}lev_distance=Math.min(levenshtein(obj[NAME],val.name),lev_distance);if(lev_distance<=MAX_LEV_DISTANCE){lev_distance=Math.ceil((checkGenerics(obj,val)+lev_distance)/2)}else if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0,len=ret.length;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(aborted===false){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function generateId(ty){if(ty.parent&&ty.parent.name){return itemTypes[ty.ty]+ty.path+ty.parent.name+ty.name}return itemTypes[ty.ty]+ty.path+ty.name}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){var query_aliases=ALIASES[filterCrates][query.search];var len=query_aliases.length;for(var i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i,it;var ty;var fullId;var returned;var in_args;var len;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0,len=inputs.length;i1?paths.length-1:1);var lev;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=generateId(ty);if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||searchWords[j].replace(/_/g,"").indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=searchWords[j].replace(/_/g,"").indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){lev=MAX_LEV_DISTANCE+1}else{lev+=1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0,len=keys.length;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function initSearchNav(){var hoverTimeout;var click_func=function(e){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}var dst=e.target.getElementsByTagName("a");if(dst.length<1){return}dst=dst[0];if(window.location.pathname===dst.pathname){hideSearchResults();document.location.href=dst.href}};var mouseover_func=function(e){if(mouseMovedAfterSearch){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}clearTimeout(hoverTimeout);hoverTimeout=setTimeout(function(){onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){removeClass(i_e,"highlighted")})});addClass(el,"highlighted")},20)}};onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){i_e.onclick=click_func;i_e.onmouseover=mouseover_func})});search_input.onkeydown=function(e){var actives=[[],[],[]];var current=0;onEachLazy(document.getElementById("results").childNodes,function(e){onEachLazy(e.getElementsByClassName("highlighted"),function(h_e){actives[current].push(h_e)});current+=1});if(e.which===38){if(e.ctrlKey){printTab(currentTab>0?currentTab-1:2)}else{if(!actives[currentTab].length||!actives[currentTab][0].previousElementSibling){return}addClass(actives[currentTab][0].previousElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===40){if(e.ctrlKey){printTab(currentTab>1?0:currentTab+1)}else if(!actives[currentTab].length){var results=document.getElementById("results").childNodes;if(results.length>0){var res=results[currentTab].getElementsByClassName("result");if(res.length>0){addClass(res[0],"highlighted")}}}else if(actives[currentTab][0].nextElementSibling){addClass(actives[currentTab][0].nextElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===13){if(actives[currentTab].length){document.location.href=actives[currentTab][0].getElementsByTagName("a")[0].href}}else if(e.which===16){}else if(actives[currentTab].length>0){removeClass(actives[currentTab][0],"highlighted")}}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=window.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=window.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=window.rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var splitPath=item.path.split("::");var enumName=splitPath.pop();path=splitPath.join("::");displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=window.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=window.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraStyle="";if(display===false){extraStyle=" style=\"display: none;\""}var output="";var duplicates={};var length=0;if(array.length>0){output="";array.forEach(function(item){var name,type;name=item.name;type=itemTypes[item.ty];if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}length+=1;output+=""});output+="
"+""+(item.is_alias===true?(""+item.alias+"  - see "):"")+item.displayPath+""+name+""+""+""+item.desc+" 
"}else{output="
No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:
"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(currentTab===tabNb){return""}return""}function showResults(results){var search=getSearchElement();if(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==getSearchLoadingText())){var elem=document.createElement("a");elem.href=results.others[0].href;elem.style.display="none";document.body.appendChild(elem);elem.click();return}var query=getQuery(search_input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}var output="

Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"+ret_others[0]+ret_in_args[0]+ret_returned[0]+"
";search.innerHTML=output;showSearchResults(search);initSearchNav();var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0,len=positions.length;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0,arrays_len=arrays.length;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0,len=queries.length;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnProperty(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=getQueryStringParams();var query=getQuery(search_input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(forced!==true&&query.id===currentResults){if(query.query.length>0){putBackSearch(search_input)}return}searchTitle="Results for "+query.query+" - Rust";if(browserSupportsHistoryApi()){var newURL=getNakedUrl()+"?search="+encodeURIComponent(query.raw)+window.location.hash;if(!history.state&&!params.search){history.pushState(query,"",newURL)}else{history.replaceState(query,"",newURL)}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates))}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i;var currentIndex=0;for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);searchIndex.push({crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,type:null,});currentIndex+=1;var items=rawSearchIndex[crate].i;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i0){search_input.value=params.search;search(e)}else{search_input.value="";hideSearchResults()}})}search()}index=buildIndex(rawSearchIndex);startSearch();if(window.rootPath==="../"||window.rootPath==="./"){var sidebar=document.getElementsByClassName("sidebar-elems")[0];if(sidebar){var div=document.createElement("div");div.className="block crate";div.innerHTML="

Crates

";var ul=document.createElement("ul");div.appendChild(ul);var crates=[];for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}crates.push(crate)}crates.sort();for(var i=0;i','`').replace('','`');return x.innerText}window.initSidebarItems=function(items){var sidebar=document.getElementsByClassName("sidebar-elems")[0];var current=window.sidebarCurrent;function block(shortty,longty){var filtered=items[shortty];if(!filtered){return}var div=document.createElement("div");div.className="block "+shortty;var h3=document.createElement("h3");h3.textContent=longty;div.appendChild(h3);var ul=document.createElement("ul");for(var i=0,len=filtered.length;i"+""+"
"+code.outerHTML+"
";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function onEveryMatchingChild(elem,className,func){if(elem&&className&&func){var length=elem.childNodes.length;var nodes=elem.childNodes;for(var i=0;i"+labelForToggleButton(sectionIsCollapsed)+"
]";return toggle}function createToggle(toggle,otherMessage,fontSize,extraClass,show){var span=document.createElement("span");span.className="toggle-label";if(show){span.style.display="none"}if(!otherMessage){span.innerHTML=" Expand description"}else{span.innerHTML=otherMessage}if(fontSize){span.style.fontSize=fontSize}var mainToggle=toggle.cloneNode(true);mainToggle.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper";if(!show){addClass(wrapper,"collapsed");var inner=mainToggle.getElementsByClassName("inner");if(inner&&inner.length>0){inner[0].innerHTML="+"}}if(extraClass){addClass(wrapper,extraClass)}wrapper.appendChild(mainToggle);return wrapper}(function(){var toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}var toggle=createSimpleToggle(false);var hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";var hideImplementors=getSettingValue("auto-collapse-implementors")!=="false";var func=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(!next){return}if(hasClass(next,"docblock")){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideMethodDocs===true&&hasClass(e,"method")===true){collapseDocs(newToggle,"hide")}}};var funcImpl=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(next&&hasClass(next,"docblock")){next=next.nextElementSibling}if(!next){return}if(hasClass(e,"impl")&&(next.getElementsByClassName("method").length>0||next.getElementsByClassName("associatedconstant").length>0)){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideImplementors===true&&e.parentNode.id==="implementors-list"){collapseDocs(newToggle,"hide")}}};onEachLazy(document.getElementsByClassName("method"),func);onEachLazy(document.getElementsByClassName("associatedconstant"),func);onEachLazy(document.getElementsByClassName("impl"),funcImpl);var impl_call=function(){};if(hideMethodDocs===true){impl_call=function(e,newToggle){if(e.id.match(/^impl(?:-\d+)?$/)===null){if(hasClass(e,"impl")===true){collapseDocs(newToggle,"hide")}}}}var newToggle=document.createElement("a");newToggle.href="javascript:void(0)";newToggle.className="collapse-toggle hidden-default collapsed";newToggle.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items";function toggleClicked(){if(hasClass(this,"collapsed")){removeClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("hidden"),function(x){if(hasClass(x,"content")===false){removeClass(x,"hidden");addClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(false)+"] Hide undocumented items"}else{addClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("x"),function(x){if(hasClass(x,"content")===false){addClass(x,"hidden");removeClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items"}}onEachLazy(document.getElementsByClassName("impl-items"),function(e){onEachLazy(e.getElementsByClassName("associatedconstant"),func);var hiddenElems=Array.prototype.slice.call(e.getElementsByClassName("hidden"));var needToggle=hiddenElems.some(function(hiddenElem){return hasClass(hiddenElem,"content")===false&&hasClass(hiddenElem,"docblock")===false});if(needToggle===true){var inner_toggle=newToggle.cloneNode(true);inner_toggle.onclick=toggleClicked;e.insertBefore(inner_toggle,e.firstChild);impl_call(e.previousSibling,inner_toggle)}});var currentType=document.getElementsByClassName("type-decl")[0];var className=null;if(currentType){currentType=currentType.getElementsByClassName("rust")[0];if(currentType){currentType.classList.forEach(function(item){if(item!=="main"){className=item;return true}})}}var showItemDeclarations=getSettingValue("auto-hide-"+className);if(showItemDeclarations===null){if(className==="enum"||className==="macro"){showItemDeclarations="false"}else if(className==="struct"||className==="union"||className==="trait"){showItemDeclarations="true"}else{showItemDeclarations=getSettingValue("auto-hide-declarations")}}showItemDeclarations=showItemDeclarations==="false";function buildToggleWrapper(e){if(hasClass(e,"autohide")){var wrap=e.previousElementSibling;if(wrap&&hasClass(wrap,"toggle-wrapper")){var inner_toggle=wrap.childNodes[0];var extra=e.childNodes[0].tagName==="H3";e.style.display="none";addClass(wrap,"collapsed");onEachLazy(inner_toggle.getElementsByClassName("inner"),function(e){e.innerHTML=labelForToggleButton(true)});onEachLazy(inner_toggle.getElementsByClassName("toggle-label"),function(e){e.style.display="inline-block";if(extra===true){e.innerHTML=" Show "+e.childNodes[0].innerHTML}})}}if(e.parentNode.id==="main"){var otherMessage="";var fontSize;var extraClass;if(hasClass(e,"type-decl")){fontSize="20px";otherMessage=" Show declaration";if(showItemDeclarations===false){extraClass="collapsed"}}else if(hasClass(e,"sub-variant")){otherMessage=" Show fields"}else if(hasClass(e,"non-exhaustive")){otherMessage=" This ";if(hasClass(e,"non-exhaustive-struct")){otherMessage+="struct"}else if(hasClass(e,"non-exhaustive-enum")){otherMessage+="enum"}else if(hasClass(e,"non-exhaustive-variant")){otherMessage+="enum variant"}else if(hasClass(e,"non-exhaustive-type")){otherMessage+="type"}otherMessage+=" is marked as non-exhaustive"}else if(hasClass(e.childNodes[0],"impl-items")){extraClass="marg-left"}e.parentNode.insertBefore(createToggle(toggle,otherMessage,fontSize,extraClass,hasClass(e,"type-decl")===false||showItemDeclarations===true),e);if(hasClass(e,"type-decl")===true&&showItemDeclarations===true){collapseDocs(e.previousSibling.childNodes[0],"toggle")}if(hasClass(e,"non-exhaustive")===true){collapseDocs(e.previousSibling.childNodes[0],"toggle")}}}onEachLazy(document.getElementsByClassName("docblock"),buildToggleWrapper);onEachLazy(document.getElementsByClassName("sub-variant"),buildToggleWrapper);autoCollapse(getSettingValue("collapse")==="true");var pageId=getPageId();if(pageId!==null){expandSection(pageId)}}());function createToggleWrapper(tog){var span=document.createElement("span");span.className="toggle-label";span.style.display="none";span.innerHTML=" Expand attributes";tog.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper toggle-attributes";wrapper.appendChild(tog);return wrapper}(function(){var itemAttributesFunc=function(){};if(getSettingValue("auto-hide-attributes")!=="false"){itemAttributesFunc=function(x){collapseDocs(x.previousSibling.childNodes[0],"toggle")}}var attributesToggle=createToggleWrapper(createSimpleToggle(false));onEachLazy(main.getElementsByClassName("attributes"),function(i_e){var attr_tog=attributesToggle.cloneNode(true);if(hasClass(i_e,"top-attr")===true){addClass(attr_tog,"top-attr")}i_e.parentNode.insertBefore(attr_tog,i_e);itemAttributesFunc(i_e)})}());(function(){var lineNumbersFunc=function(){};if(getSettingValue("line-numbers")==="true"){lineNumbersFunc=function(x){var count=x.textContent.split("\n").length;var elems=[];for(var i=0;i"+getSearchLoadingText()+"";showSearchResults(search)}var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")===true){hideSidebar()}else{showSidebar()}}}if(main){onEachLazy(main.getElementsByClassName("loading-content"),function(e){e.remove()});onEachLazy(main.childNodes,function(e){if(e.tagName==="H2"||e.tagName==="H3"){var nextTagName=e.nextElementSibling.tagName;if(nextTagName=="H2"||nextTagName=="H3"){e.nextElementSibling.style.display="flex"}else{e.nextElementSibling.style.display="block"}}})}function enableSearchInput(){if(search_input){search_input.removeAttribute('disabled')}}window.addSearchOptions=function(crates){var elem=document.getElementById("crate-search");if(!elem){enableSearchInput();return}var crates_text=[];if(Object.keys(crates).length>1){for(var crate in crates){if(hasOwnProperty(crates,crate)){crates_text.push(crate)}}}crates_text.sort(function(a,b){var lower_a=a.toLowerCase();var lower_b=b.toLowerCase();if(lower_alower_b){return 1}return 0});var savedCrate=getSettingValue("saved-filter-crate");for(var i=0,len=crates_text.length;ithe rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["ctrl + ↑ / ↓","Switch result tab"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>(index&1)===0?""+y+"":" "+y+" ").join("")+"
"+x[1]+"
").join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";var infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + * -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ + str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);popup.appendChild(container);insertAfter(popup,getSearchElement());buildHelperPopup=function(){}}onHashChange(null);window.onhashchange=onHashChange}());window.onunload=function(){} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/normalize.css b/api-docs/m_captcha/0.1.3/normalize.css new file mode 100644 index 0000000..6d692b5 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/normalize.css @@ -0,0 +1,2 @@ + /*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/noscript.css b/api-docs/m_captcha/0.1.3/noscript.css new file mode 100644 index 0000000..5cbcb90 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/noscript.css @@ -0,0 +1 @@ + #main>h2+div,#main>h2+h3,#main>h3+div{display:block;}.loading-content{display:none;}#main>h2+div,#main>h3+div{display:block;}#main>h2+h3{display:flex;}#main .impl-items .hidden{display:block !important;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/rust-logo.png b/api-docs/m_captcha/0.1.3/rust-logo.png new file mode 100644 index 0000000..74b4bd6 Binary files /dev/null and b/api-docs/m_captcha/0.1.3/rust-logo.png differ diff --git a/api-docs/m_captcha/0.1.3/rustdoc.css b/api-docs/m_captcha/0.1.3/rustdoc.css new file mode 100644 index 0000000..ecb81ce --- /dev/null +++ b/api-docs/m_captcha/0.1.3/rustdoc.css @@ -0,0 +1 @@ + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff") format('woff');}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:400;src:local('Source Serif Pro'),url("SourceSerifPro-Regular.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:italic;font-weight:400;src:local('Source Serif Pro Italic'),url("SourceSerifPro-It.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:700;src:local('Source Serif Pro Bold'),url("SourceSerifPro-Bold.ttf.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.woff") format('woff');}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif Pro",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.notable),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{border-bottom:1px dashed;margin-top:0;}h1.fqn>.in-band>a:hover{text-decoration:underline;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border-bottom:1px solid;}h3.impl,h3.method,h4.method,h3.type,h4.type,h4.associatedconstant{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}h3.impl,h3.method,h3.type{padding-left:15px;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.content table td:first-child>a,.collapse-toggle,div.item-list .out-of-band,#source-sidebar,#sidebar-toggle,#main>ul.docblock>li>a{font-family:"Fira Sans",sans-serif;}.content ul.crate a.crate{font:16px/1.6 "Fira Sans";}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}code,pre,a.test-arrow{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code,.docblock code.spotlight{padding:0;padding-right:1ex;}.docblock code.spotlight :last-child{padding-bottom:0.6em;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;min-width:70em;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-child{font-weight:500;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{margin-top:0;margin-bottom:8px;text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc:not(.source) .example-wrap{display:inline-flex;margin-bottom:10px;position:relative;}.example-wrap{width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;border-top-left-radius:5px;border-bottom-left-radius:5px;padding:13px 8px;text-align:right;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results{position:absolute;right:0;left:0;overflow:auto;}#results>table{width:100%;table-layout:fixed;margin-bottom:40px;}.content pre.line-numbers{float:left;border:none;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock-short code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}#main>.docblock h1{font-size:1.3em;}#main>.docblock h2{font-size:1.15em;}#main>.docblock h3,#main>.docblock h4,#main>.docblock h5{font-size:1em;}#main>h2+div,#main>h2+h3,#main>h3+div{display:none;flex-wrap:wrap;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{float:right;font-size:23px;margin:0px;padding:0px;font-weight:normal;}h3.impl>.out-of-band{font-size:21px;}h4.method>.out-of-band{font-size:19px;}h4>code,h3>code,.invisible>code{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{margin:0px;padding:0px;}.in-band>code{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content .method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items>h4{border-bottom:0;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.toggle-wrapper.marg-left>.collapse-toggle{left:-24px;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;margin-top:-13px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:-6px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,h4>code+.srclink,h3>code+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results .desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results a{display:block;}.content .search-results td:first-child{padding-right:0;width:50%;}.content .search-results td:first-child a{padding-right:10px;}.content .search-results td:first-child a:after{clear:both;content:"";display:block;}.content .search-results td:first-child a span{float:left;}tr.result span.primitive::after{content:' (primitive type)';font-style:italic;}tr.result span.keyword::after{content:' (keyword)';font-style:italic;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help>div>span{text-align:center;display:block;margin:10px 0;font-size:18px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.module-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since,.methods .since{flex-grow:0;padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code,.methods code{flex-grow:1;}.impl-items h4,h4.impl,h3.impl,.methods h3{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.collapse-toggle{font-weight:300;position:absolute;left:-23px;top:0;}h3>.collapse-toggle,h4>.collapse-toggle{font-size:0.8em;top:5px;}.toggle-wrapper>.collapse-toggle{left:-24px;margin-top:0px;}.toggle-wrapper{position:relative;margin-top:0;}.toggle-wrapper.collapsed{height:25px;transition:height .2s;margin-bottom:.6em;}.collapse-toggle>.inner{display:inline-block;width:1.2ch;text-align:center;}.collapse-toggle.hidden-default{position:relative;margin-left:20px;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.toggle-wrapper>.collapse-toggle{left:0;}.variant+.toggle-wrapper+.docblock>p{margin-top:5px;}.sub-variant,.sub-variant>h3{margin-top:1px !important;}#main>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.enum>.toggle-wrapper+.docblock,.struct>.toggle-wrapper+.docblock{margin-left:30px;margin-bottom:20px;margin-top:5px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}.enum>.collapsed,.struct>.collapsed{margin-bottom:25px;}#main>.variant,#main>.structfield{display:block;}.attributes{display:block;margin-top:0px !important;margin-right:0px;margin-bottom:0px !important;margin-left:30px;}.toggle-attributes.collapsed{margin-bottom:0;}.impl-items>.toggle-attributes{margin-left:20px;}.impl-items .attributes{font-weight:500;}:target>code{opacity:1;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}h4>.notable-traits{position:absolute;left:-44px;top:2px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,.help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}.help-button{right:30px;font-family:"Fira Sans",sans-serif;text-align:center;font-size:17px;}#theme-picker,#settings-menu,.help-button{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}@media (min-width:701px){.information:first-child>.tooltip{margin-top:16px;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;left:0;top:45px;bottom:0;overflow-y:auto;border-right:1px solid;display:none;}.sidebar>.block.version{border-bottom:none;margin-top:12px;margin-bottom:0;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main,#search{margin-top:45px;padding:0;}.content .in-band{width:100%;}.content h4>.out-of-band{position:inherit;}.toggle-wrapper>.collapse-toggle{left:0px;}.toggle-wrapper{height:1.5em;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{display:flex;}.anchor{display:none !important;}h1.fqn{overflow:initial;}.theme-picker{left:10px;top:54px;z-index:1;}h4>.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar.mobile>div.version{overflow:hidden;max-height:33px;}.sidebar{width:calc(100% + 30px);}.show-it{display:block;width:246px;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}.collapse-toggle{left:-20px;}.impl>.collapse-toggle{left:-10px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}.help-button{display:none;}.search-container>div{width:calc(100% - 32px);}}@media print{nav.sub,.content .out-of-band,.collapse-toggle{display:none;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main,#search{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}.docblock{margin-left:12px;}}h3.notable{margin:0;margin-bottom:13px;font-size:19px;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}.type-decl>pre>.toggle-wrapper.toggle-attributes.top-attr{margin-left:0 !important;}.type-decl>pre>.docblock.attributes.top-attr{margin-left:1.8em !important;}.type-decl>pre>.toggle-attributes{margin-left:2.2em;}.type-decl>pre>.docblock.attributes{margin-left:4em;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/search-index.js b/api-docs/m_captcha/0.1.3/search-index.js new file mode 100644 index 0000000..41d5447 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/search-index.js @@ -0,0 +1,6 @@ +var searchIndex = JSON.parse('{\ +"cfg_if":{"doc":"A macro for defining #[cfg] if-else statements.","i":[[14,"cfg_if","cfg_if","The main macro provided by this crate. See crate …",null,null]],"p":[]},\ +"m_captcha":{"doc":"mCaptcha is a proof of work based Denaial-of-Service …","i":[[0,"defense","m_captcha","Defense datatypes",null,null],[3,"Level","m_captcha::defense","Level struct that describes threshold-difficulty factor …",null,null],[12,"visitor_threshold","","",0,null],[12,"difficulty_factor","","",0,null],[3,"LevelBuilder","","Bulder struct for [Level] to describe …",null,null],[11,"visitor_threshold","","set visitor count for level",1,[[["u32",15]]]],[11,"difficulty_factor","","set difficulty factor for level. difficulty_factor can\'t …",1,[[["u32",15]],["captcharesult",6]]],[11,"build","","build Level struct",1,[[],[["level",3],["captcharesult",6]]]],[3,"Defense","","struct describes all the different [Level]s at which an …",null,null],[3,"DefenseBuilder","","Builder struct for [Defense]",null,null],[11,"add_level","","add a level to [Defense]",2,[[["level",3]],["captcharesult",6]]],[11,"build","","Build [Defense]",2,[[],[["defense",3],["captcharesult",6]]]],[11,"get_difficulty","","! Difficulty is calculated as: ! …",3,[[],["u32",15]]],[11,"tighten_up","","tighten up defense. Increases defense level by a factor …",3,[[]]],[11,"loosen_up","","Loosen up defense. Decreases defense level by a factor of …",3,[[]]],[11,"max_defense","","Set defense to maximum level",3,[[]]],[11,"min_defense","","Set defense to minimum level",3,[[]]],[11,"visitor_threshold","","Get current level\'s visitor threshold",3,[[],["u32",15]]],[0,"errors","m_captcha","Errors and Result module",null,null],[4,"CaptchaError","m_captcha::errors","Error datatype",null,null],[13,"LevelEmpty","","When configuring m_captcha, [DefenseBuilder][…",4,null],[13,"DifficultyFactorZero","","Visitor count must be a whole number(zero and above). …",4,null],[13,"CaptchaDurationZero","","captcha cooldown duration must be greater than 0",4,null],[13,"SetDifficultyFactor","","Difficulty factor must be set",4,null],[13,"SetVisitorThreshold","","Visitor threshold must be set",4,null],[13,"DuplicateVisitorCount","","Visitor count must be Unique",4,null],[13,"DecreaseingDifficultyFactor","","Difficulty factor should increase with level",4,null],[13,"MailboxError","","Difficulty factor should increase with level",4,null],[13,"InsuffiencientDifficulty","","Happens when submitted work doesn\'t satisfy the required …",4,null],[13,"StringNotFound","","Happens when submitted work is computed over string that …",4,null],[13,"MCaptchaKeyValidationFail","","Happens when submitted work is computed over …",4,null],[13,"InvalidPoW","","Submitted PoW is invalid",4,null],[13,"PleaseSetValue","","Used in builder structs when a value is not set",4,null],[6,"CaptchaResult","","[Result] datatype for m_captcha",null,null],[0,"master","m_captcha","[Master] actor module that manages [MCaptcha] actors",null,null],[3,"Master","m_captcha::master","This Actor manages the [MCaptcha] actors. A service can …",null,null],[11,"add_site","","add [MCaptcha] actor to [Master]",5,[[["addsite",3]]]],[11,"new","","create new master accepts a u64 to configure garbage …",5,[[["u64",15]]]],[11,"get_site","","get [MCaptcha] actor from [Master]",5,[[["str",15]],[["option",4],["addr",3]]]],[11,"rm_site","","remvoes [MCaptcha] actor from [Master]",5,[[["str",15]]]],[3,"GetSite","","Message to get an [MCaptcha] actor from master",null,null],[12,"0","","",6,null],[3,"CleanUp","","Message to clean up master of [MCaptcha] actors with zero …",null,null],[3,"RemoveSite","","Message to delete [MCaptcha] actor",null,null],[12,"0","","",7,null],[3,"AddSite","","Message to add an [MCaptcha] actor to [Master]",null,null],[12,"id","","",8,null],[12,"addr","","",8,null],[3,"AddSiteBuilder","","Builder for AddSite.",null,null],[11,"id","","",9,[[["string",3]]]],[11,"addr","","",9,[[["addr",3],["mcaptcha",3]]]],[11,"build","","Builds a new AddSite.",9,[[],[["addsite",3],["string",3],["result",4]]]],[0,"mcaptcha","m_captcha","MCaptcha actor module that manages defense levels",null,null],[3,"MCaptchaBuilder","m_captcha::mcaptcha","Builder for [MCaptcha]",null,null],[3,"MCaptcha","","This struct represents the mCaptcha state and is used to …",null,null],[11,"defense","","set defense",10,[[["defense",3]]]],[11,"duration","","set duration",10,[[["u64",15]]]],[11,"build","","Builds new [MCaptcha]",10,[[],[["captcharesult",6],["mcaptcha",3]]]],[11,"add_visitor","","increments the visitor count by one",11,[[]]],[11,"decrement_visitor","","decrements the visitor count by one",11,[[]]],[11,"get_difficulty","","get current difficulty factor",11,[[],["u32",15]]],[11,"get_duration","","get [MCaptcha]\'s lifetime",11,[[],["u64",15]]],[3,"AddVisitor","","Message to increment the visitor count returns difficulty …",null,null],[3,"AddVisitorResult","","Struct representing the return datatime of [AddVisitor] …",null,null],[12,"duration","","",12,null],[12,"difficulty_factor","","",12,null],[3,"GetCurrentVisitorCount","","Message to get the visitor count",null,null],[3,"Stop","","Message to stop [MCaptcha]",null,null],[0,"cache","m_captcha","message datatypes to interact with [MCaptcha] actor Cache …",null,null],[0,"hashcache","m_captcha::cache","In-memory cache implementation that uses [HashMap]",null,null],[3,"HashCache","m_captcha::cache::hashcache","cache datastructure implementing [Save]",null,null],[0,"messages","m_captcha::cache","Messages that can be sent to cache data structures …",null,null],[3,"CachePoW","m_captcha::cache::messages","Message to cache PoW difficulty factor and string",null,null],[12,"string","","",13,null],[12,"difficulty_factor","","",13,null],[12,"duration","","",13,null],[12,"key","","",13,null],[3,"CachePoWBuilder","","Builder for CachePoW.",null,null],[11,"string","","",14,[[["string",3]]]],[11,"difficulty_factor","","",14,[[["u32",15]]]],[11,"duration","","",14,[[["u64",15]]]],[11,"key","","",14,[[["string",3]]]],[11,"build","","Builds a new CachePoW.",14,[[],[["result",4],["cachepow",3],["string",3]]]],[3,"RetrivePoW","","Message to retrive the the difficulty factor for the …",null,null],[12,"0","","",15,null],[3,"CachedPoWConfig","","",null,null],[12,"key","","",16,null],[12,"difficulty_factor","","",16,null],[12,"duration","","",16,null],[3,"DeletePoW","","Message to delete cached PoW difficulty factor and string …",null,null],[12,"0","","",17,null],[3,"CacheResult","","Message to cache captcha result and the captcha key for …",null,null],[12,"token","","",18,null],[12,"key","","",18,null],[12,"duration","","",18,null],[3,"CacheResultBuilder","","Builder for CacheResult.",null,null],[11,"token","","",19,[[["string",3]]]],[11,"key","","",19,[[["string",3]]]],[11,"duration","","",19,[[["u64",15]]]],[11,"build","","Builds a new CacheResult.",19,[[],[["result",4],["string",3],["cacheresult",3]]]],[3,"VerifyCaptchaResult","","Message to verify captcha result against the stored …",null,null],[12,"token","","",20,null],[12,"key","","",20,null],[3,"DeleteCaptchaResult","","Message to delete cached capthca result when it expires",null,null],[12,"token","","",21,null],[8,"Save","m_captcha::cache","Describes actor handler trait impls that are required by …",null,null],[0,"pow","m_captcha","PoW datatypes used in client-server interaction",null,null],[3,"ConfigBuilder","m_captcha::pow","Builder for Config.",null,null],[3,"PoWConfig","","PoW requirement datatype that is be sent to clients for …",null,null],[12,"string","","",22,null],[12,"difficulty_factor","","",22,null],[11,"new","","create new instance of [PoWConfig]",22,[[["u32",15]]]],[3,"Work","","PoW datatype that clients send to server",null,null],[12,"string","","",23,null],[12,"result","","",23,null],[12,"nonce","","",23,null],[12,"key","","",23,null],[0,"system","m_captcha","module describing mCaptcha system",null,null],[3,"System","m_captcha::system","struct describing various bits of data required for an …",null,null],[12,"master","","",24,null],[3,"SystemBuilder","","Builder for System.",null,null],[11,"master","","",25,[[["master",3],["addr",3]]]],[11,"cache","","",25,[[["addr",3]]]],[11,"pow","","",25,[[["config",3]]]],[11,"build","","Builds a new System.",25,[[],[["result",4],["system",3],["string",3]]]],[11,"get_pow","","utility function to get difficulty factor of site id and …",24,[[["string",3]]]],[11,"verify_pow","","utility function to verify [Work]",24,[[["work",3]]]],[11,"validate_verification_tokens","","utility function to validate verification tokens",24,[[["verifycaptcharesult",3]]]],[11,"from","m_captcha::defense","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"vzip","","",0,[[]]],[11,"from","","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_owned","","",1,[[]]],[11,"clone_into","","",1,[[]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"vzip","","",1,[[]]],[11,"from","","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"vzip","","",3,[[]]],[11,"from","","",2,[[]]],[11,"into","","",2,[[]]],[11,"to_owned","","",2,[[]]],[11,"clone_into","","",2,[[]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"vzip","","",2,[[]]],[11,"from","m_captcha::errors","",4,[[]]],[11,"into","","",4,[[]]],[11,"to_owned","","",4,[[]]],[11,"clone_into","","",4,[[]]],[11,"to_string","","",4,[[],["string",3]]],[11,"borrow","","",4,[[]]],[11,"borrow_mut","","",4,[[]]],[11,"try_from","","",4,[[],["result",4]]],[11,"try_into","","",4,[[],["result",4]]],[11,"type_id","","",4,[[],["typeid",3]]],[11,"vzip","","",4,[[]]],[11,"from","m_captcha::master","",5,[[]]],[11,"into","","",5,[[]]],[11,"to_owned","","",5,[[]]],[11,"clone_into","","",5,[[]]],[11,"borrow","","",5,[[]]],[11,"borrow_mut","","",5,[[]]],[11,"try_from","","",5,[[],["result",4]]],[11,"try_into","","",5,[[],["result",4]]],[11,"type_id","","",5,[[],["typeid",3]]],[11,"vzip","","",5,[[]]],[11,"from","","",6,[[]]],[11,"into","","",6,[[]]],[11,"borrow","","",6,[[]]],[11,"borrow_mut","","",6,[[]]],[11,"try_from","","",6,[[],["result",4]]],[11,"try_into","","",6,[[],["result",4]]],[11,"type_id","","",6,[[],["typeid",3]]],[11,"vzip","","",6,[[]]],[11,"from","","",26,[[]]],[11,"into","","",26,[[]]],[11,"borrow","","",26,[[]]],[11,"borrow_mut","","",26,[[]]],[11,"try_from","","",26,[[],["result",4]]],[11,"try_into","","",26,[[],["result",4]]],[11,"type_id","","",26,[[],["typeid",3]]],[11,"vzip","","",26,[[]]],[11,"from","","",7,[[]]],[11,"into","","",7,[[]]],[11,"borrow","","",7,[[]]],[11,"borrow_mut","","",7,[[]]],[11,"try_from","","",7,[[],["result",4]]],[11,"try_into","","",7,[[],["result",4]]],[11,"type_id","","",7,[[],["typeid",3]]],[11,"vzip","","",7,[[]]],[11,"from","","",8,[[]]],[11,"into","","",8,[[]]],[11,"borrow","","",8,[[]]],[11,"borrow_mut","","",8,[[]]],[11,"try_from","","",8,[[],["result",4]]],[11,"try_into","","",8,[[],["result",4]]],[11,"type_id","","",8,[[],["typeid",3]]],[11,"vzip","","",8,[[]]],[11,"from","","",9,[[]]],[11,"into","","",9,[[]]],[11,"to_owned","","",9,[[]]],[11,"clone_into","","",9,[[]]],[11,"borrow","","",9,[[]]],[11,"borrow_mut","","",9,[[]]],[11,"try_from","","",9,[[],["result",4]]],[11,"try_into","","",9,[[],["result",4]]],[11,"type_id","","",9,[[],["typeid",3]]],[11,"vzip","","",9,[[]]],[11,"from","m_captcha::mcaptcha","",10,[[]]],[11,"into","","",10,[[]]],[11,"to_owned","","",10,[[]]],[11,"clone_into","","",10,[[]]],[11,"borrow","","",10,[[]]],[11,"borrow_mut","","",10,[[]]],[11,"try_from","","",10,[[],["result",4]]],[11,"try_into","","",10,[[],["result",4]]],[11,"type_id","","",10,[[],["typeid",3]]],[11,"vzip","","",10,[[]]],[11,"from","","",11,[[]]],[11,"into","","",11,[[]]],[11,"to_owned","","",11,[[]]],[11,"clone_into","","",11,[[]]],[11,"borrow","","",11,[[]]],[11,"borrow_mut","","",11,[[]]],[11,"try_from","","",11,[[],["result",4]]],[11,"try_into","","",11,[[],["result",4]]],[11,"type_id","","",11,[[],["typeid",3]]],[11,"vzip","","",11,[[]]],[11,"from","","",27,[[]]],[11,"into","","",27,[[]]],[11,"borrow","","",27,[[]]],[11,"borrow_mut","","",27,[[]]],[11,"try_from","","",27,[[],["result",4]]],[11,"try_into","","",27,[[],["result",4]]],[11,"type_id","","",27,[[],["typeid",3]]],[11,"vzip","","",27,[[]]],[11,"from","","",12,[[]]],[11,"into","","",12,[[]]],[11,"to_owned","","",12,[[]]],[11,"clone_into","","",12,[[]]],[11,"borrow","","",12,[[]]],[11,"borrow_mut","","",12,[[]]],[11,"try_from","","",12,[[],["result",4]]],[11,"try_into","","",12,[[],["result",4]]],[11,"type_id","","",12,[[],["typeid",3]]],[11,"vzip","","",12,[[]]],[11,"from","","",28,[[]]],[11,"into","","",28,[[]]],[11,"borrow","","",28,[[]]],[11,"borrow_mut","","",28,[[]]],[11,"try_from","","",28,[[],["result",4]]],[11,"try_into","","",28,[[],["result",4]]],[11,"type_id","","",28,[[],["typeid",3]]],[11,"vzip","","",28,[[]]],[11,"from","","",29,[[]]],[11,"into","","",29,[[]]],[11,"borrow","","",29,[[]]],[11,"borrow_mut","","",29,[[]]],[11,"try_from","","",29,[[],["result",4]]],[11,"try_into","","",29,[[],["result",4]]],[11,"type_id","","",29,[[],["typeid",3]]],[11,"vzip","","",29,[[]]],[11,"from","m_captcha::cache::hashcache","",30,[[]]],[11,"into","","",30,[[]]],[11,"to_owned","","",30,[[]]],[11,"clone_into","","",30,[[]]],[11,"borrow","","",30,[[]]],[11,"borrow_mut","","",30,[[]]],[11,"try_from","","",30,[[],["result",4]]],[11,"try_into","","",30,[[],["result",4]]],[11,"type_id","","",30,[[],["typeid",3]]],[11,"vzip","","",30,[[]]],[11,"from","m_captcha::cache::messages","",13,[[]]],[11,"into","","",13,[[]]],[11,"to_owned","","",13,[[]]],[11,"clone_into","","",13,[[]]],[11,"borrow","","",13,[[]]],[11,"borrow_mut","","",13,[[]]],[11,"try_from","","",13,[[],["result",4]]],[11,"try_into","","",13,[[],["result",4]]],[11,"type_id","","",13,[[],["typeid",3]]],[11,"vzip","","",13,[[]]],[11,"from","","",14,[[]]],[11,"into","","",14,[[]]],[11,"to_owned","","",14,[[]]],[11,"clone_into","","",14,[[]]],[11,"borrow","","",14,[[]]],[11,"borrow_mut","","",14,[[]]],[11,"try_from","","",14,[[],["result",4]]],[11,"try_into","","",14,[[],["result",4]]],[11,"type_id","","",14,[[],["typeid",3]]],[11,"vzip","","",14,[[]]],[11,"from","","",15,[[]]],[11,"into","","",15,[[]]],[11,"borrow","","",15,[[]]],[11,"borrow_mut","","",15,[[]]],[11,"try_from","","",15,[[],["result",4]]],[11,"try_into","","",15,[[],["result",4]]],[11,"type_id","","",15,[[],["typeid",3]]],[11,"vzip","","",15,[[]]],[11,"from","","",16,[[]]],[11,"into","","",16,[[]]],[11,"to_owned","","",16,[[]]],[11,"clone_into","","",16,[[]]],[11,"borrow","","",16,[[]]],[11,"borrow_mut","","",16,[[]]],[11,"try_from","","",16,[[],["result",4]]],[11,"try_into","","",16,[[],["result",4]]],[11,"type_id","","",16,[[],["typeid",3]]],[11,"vzip","","",16,[[]]],[11,"from","","",17,[[]]],[11,"into","","",17,[[]]],[11,"borrow","","",17,[[]]],[11,"borrow_mut","","",17,[[]]],[11,"try_from","","",17,[[],["result",4]]],[11,"try_into","","",17,[[],["result",4]]],[11,"type_id","","",17,[[],["typeid",3]]],[11,"vzip","","",17,[[]]],[11,"from","","",18,[[]]],[11,"into","","",18,[[]]],[11,"borrow","","",18,[[]]],[11,"borrow_mut","","",18,[[]]],[11,"try_from","","",18,[[],["result",4]]],[11,"try_into","","",18,[[],["result",4]]],[11,"type_id","","",18,[[],["typeid",3]]],[11,"vzip","","",18,[[]]],[11,"from","","",19,[[]]],[11,"into","","",19,[[]]],[11,"to_owned","","",19,[[]]],[11,"clone_into","","",19,[[]]],[11,"borrow","","",19,[[]]],[11,"borrow_mut","","",19,[[]]],[11,"try_from","","",19,[[],["result",4]]],[11,"try_into","","",19,[[],["result",4]]],[11,"type_id","","",19,[[],["typeid",3]]],[11,"vzip","","",19,[[]]],[11,"from","","",20,[[]]],[11,"into","","",20,[[]]],[11,"to_owned","","",20,[[]]],[11,"clone_into","","",20,[[]]],[11,"borrow","","",20,[[]]],[11,"borrow_mut","","",20,[[]]],[11,"try_from","","",20,[[],["result",4]]],[11,"try_into","","",20,[[],["result",4]]],[11,"type_id","","",20,[[],["typeid",3]]],[11,"vzip","","",20,[[]]],[11,"from","","",21,[[]]],[11,"into","","",21,[[]]],[11,"borrow","","",21,[[]]],[11,"borrow_mut","","",21,[[]]],[11,"try_from","","",21,[[],["result",4]]],[11,"try_into","","",21,[[],["result",4]]],[11,"type_id","","",21,[[],["typeid",3]]],[11,"vzip","","",21,[[]]],[11,"from","m_captcha::pow","",31,[[]]],[11,"into","","",31,[[]]],[11,"to_owned","","",31,[[]]],[11,"clone_into","","",31,[[]]],[11,"borrow","","",31,[[]]],[11,"borrow_mut","","",31,[[]]],[11,"try_from","","",31,[[],["result",4]]],[11,"try_into","","",31,[[],["result",4]]],[11,"type_id","","",31,[[],["typeid",3]]],[11,"vzip","","",31,[[]]],[11,"from","","",22,[[]]],[11,"into","","",22,[[]]],[11,"to_owned","","",22,[[]]],[11,"clone_into","","",22,[[]]],[11,"borrow","","",22,[[]]],[11,"borrow_mut","","",22,[[]]],[11,"try_from","","",22,[[],["result",4]]],[11,"try_into","","",22,[[],["result",4]]],[11,"type_id","","",22,[[],["typeid",3]]],[11,"vzip","","",22,[[]]],[11,"from","","",23,[[]]],[11,"into","","",23,[[]]],[11,"to_owned","","",23,[[]]],[11,"clone_into","","",23,[[]]],[11,"borrow","","",23,[[]]],[11,"borrow_mut","","",23,[[]]],[11,"try_from","","",23,[[],["result",4]]],[11,"try_into","","",23,[[],["result",4]]],[11,"type_id","","",23,[[],["typeid",3]]],[11,"vzip","","",23,[[]]],[11,"from","m_captcha::system","",24,[[]]],[11,"into","","",24,[[]]],[11,"to_owned","","",24,[[]]],[11,"clone_into","","",24,[[]]],[11,"borrow","","",24,[[]]],[11,"borrow_mut","","",24,[[]]],[11,"try_from","","",24,[[],["result",4]]],[11,"try_into","","",24,[[],["result",4]]],[11,"type_id","","",24,[[],["typeid",3]]],[11,"vzip","","",24,[[]]],[11,"from","","",25,[[]]],[11,"into","","",25,[[]]],[11,"to_owned","","",25,[[]]],[11,"clone_into","","",25,[[]]],[11,"borrow","","",25,[[]]],[11,"borrow_mut","","",25,[[]]],[11,"try_from","","",25,[[],["result",4]]],[11,"try_into","","",25,[[],["result",4]]],[11,"type_id","","",25,[[],["typeid",3]]],[11,"vzip","","",25,[[]]],[11,"default","m_captcha::pow","",31,[[],["configbuilder",3]]],[11,"clone","","",31,[[],["configbuilder",3]]],[11,"from","m_captcha::cache::messages","",18,[[["cachedpowconfig",3]]]],[11,"clone","m_captcha::defense","",0,[[],["level",3]]],[11,"clone","","",1,[[],["levelbuilder",3]]],[11,"clone","","",3,[[],["defense",3]]],[11,"clone","","",2,[[],["defensebuilder",3]]],[11,"clone","m_captcha::errors","",4,[[],["captchaerror",4]]],[11,"clone","m_captcha::master","",5,[[],["master",3]]],[11,"clone","","",9,[[],["addsitebuilder",3]]],[11,"clone","m_captcha::mcaptcha","",10,[[],["mcaptchabuilder",3]]],[11,"clone","","",11,[[],["mcaptcha",3]]],[11,"clone","","",12,[[],["addvisitorresult",3]]],[11,"clone","m_captcha::cache::hashcache","",30,[[],["hashcache",3]]],[11,"clone","m_captcha::cache::messages","",14,[[],["cachepowbuilder",3]]],[11,"clone","","",13,[[],["cachepow",3]]],[11,"clone","","",16,[[],["cachedpowconfig",3]]],[11,"clone","","",19,[[],["cacheresultbuilder",3]]],[11,"clone","","",20,[[],["verifycaptcharesult",3]]],[11,"clone","m_captcha::pow","",22,[[],["powconfig",3]]],[11,"clone","","",23,[[],["work",3]]],[11,"clone","m_captcha::system","",24,[[],["system",3]]],[11,"clone","","",25,[[],["systembuilder",3]]],[11,"default","m_captcha::defense","",1,[[]]],[11,"default","","",2,[[]]],[11,"default","m_captcha::master","",9,[[],["addsitebuilder",3]]],[11,"default","m_captcha::mcaptcha","",10,[[]]],[11,"default","m_captcha::cache::hashcache","",30,[[],["hashcache",3]]],[11,"default","m_captcha::cache::messages","",14,[[],["cachepowbuilder",3]]],[11,"default","","",16,[[],["cachedpowconfig",3]]],[11,"default","","",19,[[],["cacheresultbuilder",3]]],[11,"default","m_captcha::system","",25,[[],["systembuilder",3]]],[11,"eq","m_captcha::defense","",0,[[["level",3]],["bool",15]]],[11,"ne","","",0,[[["level",3]],["bool",15]]],[11,"eq","","",1,[[["levelbuilder",3]],["bool",15]]],[11,"ne","","",1,[[["levelbuilder",3]],["bool",15]]],[11,"eq","","",3,[[["defense",3]],["bool",15]]],[11,"ne","","",3,[[["defense",3]],["bool",15]]],[11,"eq","","",2,[[["defensebuilder",3]],["bool",15]]],[11,"ne","","",2,[[["defensebuilder",3]],["bool",15]]],[11,"eq","m_captcha::errors","",4,[[["captchaerror",4]],["bool",15]]],[11,"ne","","",4,[[["captchaerror",4]],["bool",15]]],[11,"eq","m_captcha::cache::messages","",16,[[["cachedpowconfig",3]],["bool",15]]],[11,"ne","","",16,[[["cachedpowconfig",3]],["bool",15]]],[11,"fmt","m_captcha::defense","",0,[[["formatter",3]],["result",6]]],[11,"fmt","","",1,[[["formatter",3]],["result",6]]],[11,"fmt","","",3,[[["formatter",3]],["result",6]]],[11,"fmt","","",2,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::errors","",4,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::mcaptcha","",10,[[["formatter",3]],["result",6]]],[11,"fmt","","",11,[[["formatter",3]],["result",6]]],[11,"fmt","","",12,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::cache::messages","",16,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::pow","",22,[[["formatter",3]],["result",6]]],[11,"fmt","","",23,[[["formatter",3]],["result",6]]],[11,"fmt","m_captcha::errors","",4,[[["formatter",3]],["result",6]]],[11,"serialize","m_captcha::defense","",0,[[],["result",4]]],[11,"serialize","","",3,[[],["result",4]]],[11,"serialize","m_captcha::mcaptcha","",10,[[],["result",4]]],[11,"serialize","","",11,[[],["result",4]]],[11,"serialize","","",12,[[],["result",4]]],[11,"serialize","m_captcha::cache::messages","",13,[[],["result",4]]],[11,"serialize","","",16,[[],["result",4]]],[11,"serialize","","",18,[[],["result",4]]],[11,"serialize","","",20,[[],["result",4]]],[11,"serialize","m_captcha::pow","",22,[[],["result",4]]],[11,"serialize","","",23,[[],["result",4]]],[11,"deserialize","m_captcha::defense","",0,[[],["result",4]]],[11,"deserialize","","",3,[[],["result",4]]],[11,"deserialize","m_captcha::mcaptcha","",10,[[],["result",4]]],[11,"deserialize","","",11,[[],["result",4]]],[11,"deserialize","","",12,[[],["result",4]]],[11,"deserialize","m_captcha::cache::messages","",13,[[],["result",4]]],[11,"deserialize","","",16,[[],["result",4]]],[11,"deserialize","","",18,[[],["result",4]]],[11,"deserialize","","",20,[[],["result",4]]],[11,"deserialize","m_captcha::pow","",22,[[],["result",4]]],[11,"deserialize","","",23,[[],["result",4]]],[11,"started","m_captcha::master","",5,[[]]],[11,"handle","","",5,[[["getsite",3]]]],[11,"handle","","",5,[[["cleanup",3]]]],[11,"handle","","",5,[[["removesite",3]]]],[11,"handle","","",5,[[["addsite",3]]]],[11,"handle","m_captcha::mcaptcha","",11,[[["addvisitor",3]]]],[11,"handle","","",11,[[["getcurrentvisitorcount",3]]]],[11,"handle","","",11,[[["stop",3]]]],[11,"handle","m_captcha::cache::hashcache","",30,[[["cachepow",3]]]],[11,"handle","","",30,[[["deletepow",3]]]],[11,"handle","","",30,[[["retrivepow",3]]]],[11,"handle","","",30,[[["cacheresult",3]]]],[11,"handle","","",30,[[["deletecaptcharesult",3]]]],[11,"handle","","",30,[[["verifycaptcharesult",3]]]],[11,"salt","m_captcha::pow","",31,[[["string",3]],["configbuilder",3]]],[11,"build","","Builds a new Config.",31,[[],[["result",4],["config",3],["configbuildererror",4]]]]],"p":[[3,"Level"],[3,"LevelBuilder"],[3,"DefenseBuilder"],[3,"Defense"],[4,"CaptchaError"],[3,"Master"],[3,"GetSite"],[3,"RemoveSite"],[3,"AddSite"],[3,"AddSiteBuilder"],[3,"MCaptchaBuilder"],[3,"MCaptcha"],[3,"AddVisitorResult"],[3,"CachePoW"],[3,"CachePoWBuilder"],[3,"RetrivePoW"],[3,"CachedPoWConfig"],[3,"DeletePoW"],[3,"CacheResult"],[3,"CacheResultBuilder"],[3,"VerifyCaptchaResult"],[3,"DeleteCaptchaResult"],[3,"PoWConfig"],[3,"Work"],[3,"System"],[3,"SystemBuilder"],[3,"CleanUp"],[3,"AddVisitor"],[3,"GetCurrentVisitorCount"],[3,"Stop"],[3,"HashCache"],[3,"ConfigBuilder"]]},\ +"unicode_xid":{"doc":"Determine if a char is a valid identifier for a parser …","i":[[17,"UNICODE_VERSION","unicode_xid","The version of Unicode that this version of unicode-xid …",null,null],[8,"UnicodeXID","","Methods for determining if a character is a valid …",null,null],[10,"is_xid_start","","Returns whether the specified character satisfies the …",0,[[]]],[10,"is_xid_continue","","Returns whether the specified char satisfies the …",0,[[]]]],"p":[[8,"UnicodeXID"]]}\ +}'); +addSearchOptions(searchIndex);initSearch(searchIndex); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/settings.css b/api-docs/m_captcha/0.1.3/settings.css new file mode 100644 index 0000000..6709865 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/settings.css @@ -0,0 +1 @@ +.setting-line{padding:5px;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.select-wrapper{float:right;position:relative;height:27px;min-width:25%;}.select-wrapper select{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:2px solid #ccc;padding-right:28px;width:100%;}.select-wrapper img{pointer-events:none;position:absolute;right:0;bottom:0;background:#ccc;height:100%;width:28px;padding:0px 4px;}.select-wrapper select option{color:initial;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/settings.html b/api-docs/m_captcha/0.1.3/settings.html new file mode 100644 index 0000000..4a32679 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/settings.html @@ -0,0 +1,7 @@ +Rustdoc settings + +

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
+
Auto-hide item declarations
Auto-hide structs declaration
Auto-hide enums declaration
Auto-hide unions declaration
Auto-hide traits declaration
Auto-hide macros declaration
+
Auto-hide item attributes.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Auto-hide implementors of a trait
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/settings.js b/api-docs/m_captcha/0.1.3/settings.js new file mode 100644 index 0000000..b4d6fdc --- /dev/null +++ b/api-docs/m_captcha/0.1.3/settings.js @@ -0,0 +1 @@ +(function(){function changeSetting(settingName,value){updateLocalStorage("rustdoc-"+settingName,value);switch(settingName){case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function setEvents(){onEachLazy(document.getElementsByClassName("slider"),function(elem){var toggle=elem.previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(document.getElementsByClassName("select-wrapper"),function(elem){var select=elem.getElementsByTagName("select")[0];var settingId=select.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}})}window.addEventListener("DOMContentLoaded",setEvents)})() \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/source-files.js b/api-docs/m_captcha/0.1.3/source-files.js new file mode 100644 index 0000000..cebd474 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/source-files.js @@ -0,0 +1,5 @@ +var N = null;var sourcesIndex = {}; +sourcesIndex["cfg_if"] = {"name":"","files":["lib.rs"]}; +sourcesIndex["m_captcha"] = {"name":"","dirs":[{"name":"cache","files":["hashcache.rs","mod.rs"]}],"files":["defense.rs","errors.rs","lib.rs","master.rs","mcaptcha.rs","pow.rs","system.rs","utils.rs"]}; +sourcesIndex["unicode_xid"] = {"name":"","files":["lib.rs","tables.rs"]}; +createSourceSidebar(); diff --git a/api-docs/m_captcha/0.1.3/source-script.js b/api-docs/m_captcha/0.1.3/source-script.js new file mode 100644 index 0000000..67f62a1 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/source-script.js @@ -0,0 +1 @@ +function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0,len=rootPathParts.length;i"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(window.rootPath.endsWith("/")===false){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/src/cfg_if/lib.rs.html b/api-docs/m_captcha/0.1.3/src/cfg_if/lib.rs.html new file mode 100644 index 0000000..b28fa6b --- /dev/null +++ b/api-docs/m_captcha/0.1.3/src/cfg_if/lib.rs.html @@ -0,0 +1,358 @@ +lib.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+
+//! A macro for defining `#[cfg]` if-else statements.
+//!
+//! The macro provided by this crate, `cfg_if`, is similar to the `if/elif` C
+//! preprocessor macro by allowing definition of a cascade of `#[cfg]` cases,
+//! emitting the implementation which matches first.
+//!
+//! This allows you to conveniently provide a long list `#[cfg]`'d blocks of code
+//! without having to rewrite each clause multiple times.
+//!
+//! # Example
+//!
+//! ```
+//! cfg_if::cfg_if! {
+//!     if #[cfg(unix)] {
+//!         fn foo() { /* unix specific functionality */ }
+//!     } else if #[cfg(target_pointer_width = "32")] {
+//!         fn foo() { /* non-unix, 32-bit functionality */ }
+//!     } else {
+//!         fn foo() { /* fallback implementation */ }
+//!     }
+//! }
+//!
+//! # fn main() {}
+//! ```
+
+#![no_std]
+#![doc(html_root_url = "https://docs.rs/cfg-if")]
+#![deny(missing_docs)]
+#![cfg_attr(test, deny(warnings))]
+
+/// The main macro provided by this crate. See crate documentation for more
+/// information.
+#[macro_export]
+macro_rules! cfg_if {
+    // match if/else chains with a final `else`
+    ($(
+        if #[cfg($meta:meta)] { $($tokens:tt)* }
+    ) else * else {
+        $($tokens2:tt)*
+    }) => {
+        $crate::cfg_if! {
+            @__items
+            () ;
+            $( ( ($meta) ($($tokens)*) ), )*
+            ( () ($($tokens2)*) ),
+        }
+    };
+
+    // match if/else chains lacking a final `else`
+    (
+        if #[cfg($i_met:meta)] { $($i_tokens:tt)* }
+        $(
+            else if #[cfg($e_met:meta)] { $($e_tokens:tt)* }
+        )*
+    ) => {
+        $crate::cfg_if! {
+            @__items
+            () ;
+            ( ($i_met) ($($i_tokens)*) ),
+            $( ( ($e_met) ($($e_tokens)*) ), )*
+            ( () () ),
+        }
+    };
+
+    // Internal and recursive macro to emit all the items
+    //
+    // Collects all the negated cfgs in a list at the beginning and after the
+    // semicolon is all the remaining items
+    (@__items ($($not:meta,)*) ; ) => {};
+    (@__items ($($not:meta,)*) ; ( ($($m:meta),*) ($($tokens:tt)*) ), $($rest:tt)*) => {
+        // Emit all items within one block, applying an appropriate #[cfg]. The
+        // #[cfg] will require all `$m` matchers specified and must also negate
+        // all previous matchers.
+        #[cfg(all($($m,)* not(any($($not),*))))] $crate::cfg_if! { @__identity $($tokens)* }
+
+        // Recurse to emit all other items in `$rest`, and when we do so add all
+        // our `$m` matchers to the list of `$not` matchers as future emissions
+        // will have to negate everything we just matched as well.
+        $crate::cfg_if! { @__items ($($not,)* $($m,)*) ; $($rest)* }
+    };
+
+    // Internal macro to make __apply work out right for different match types,
+    // because of how macros matching/expand stuff.
+    (@__identity $($tokens:tt)*) => {
+        $($tokens)*
+    };
+}
+
+#[cfg(test)]
+mod tests {
+    cfg_if! {
+        if #[cfg(test)] {
+            use core::option::Option as Option2;
+            fn works1() -> Option2<u32> { Some(1) }
+        } else {
+            fn works1() -> Option<u32> { None }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(foo)] {
+            fn works2() -> bool { false }
+        } else if #[cfg(test)] {
+            fn works2() -> bool { true }
+        } else {
+            fn works2() -> bool { false }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(foo)] {
+            fn works3() -> bool { false }
+        } else {
+            fn works3() -> bool { true }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(test)] {
+            use core::option::Option as Option3;
+            fn works4() -> Option3<u32> { Some(1) }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(foo)] {
+            fn works5() -> bool { false }
+        } else if #[cfg(test)] {
+            fn works5() -> bool { true }
+        }
+    }
+
+    #[test]
+    fn it_works() {
+        assert!(works1().is_some());
+        assert!(works2());
+        assert!(works3());
+        assert!(works4().is_some());
+        assert!(works5());
+    }
+
+    #[test]
+    #[allow(clippy::assertions_on_constants)]
+    fn test_usage_within_a_function() {
+        cfg_if! {if #[cfg(debug_assertions)] {
+            // we want to put more than one thing here to make sure that they
+            // all get configured properly.
+            assert!(cfg!(debug_assertions));
+            assert_eq!(4, 2+2);
+        } else {
+            assert!(works1().is_some());
+            assert_eq!(10, 5+5);
+        }}
+    }
+
+    trait Trait {
+        fn blah(&self);
+    }
+
+    #[allow(dead_code)]
+    struct Struct;
+
+    impl Trait for Struct {
+        cfg_if! {
+            if #[cfg(feature = "blah")] {
+                fn blah(&self) {
+                    unimplemented!();
+                }
+            } else {
+                fn blah(&self) {
+                    unimplemented!();
+                }
+            }
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/src/m_captcha/cache/hashcache.rs.html b/api-docs/m_captcha/0.1.3/src/m_captcha/cache/hashcache.rs.html new file mode 100644 index 0000000..cea047f --- /dev/null +++ b/api-docs/m_captcha/0.1.3/src/m_captcha/cache/hashcache.rs.html @@ -0,0 +1,573 @@ +hashcache.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! In-memory cache implementation that uses [HashMap]
+use std::collections::HashMap;
+
+use actix::prelude::*;
+
+use super::messages::*;
+use super::Save;
+use crate::errors::*;
+
+#[derive(Clone, Default)]
+/// cache datastructure implementing [Save]
+pub struct HashCache {
+    difficulty_map: HashMap<String, CachedPoWConfig>,
+    result_map: HashMap<String, String>,
+}
+
+impl HashCache {
+    // save [PoWConfig] to cache
+    fn save_pow_config(&mut self, config: CachePoW) -> CaptchaResult<()> {
+        let challenge = config.string;
+        let config: CachedPoWConfig = CachedPoWConfig {
+            key: config.key,
+            difficulty_factor: config.difficulty_factor,
+            duration: config.duration,
+        };
+
+        self.difficulty_map.insert(challenge, config);
+        Ok(())
+    }
+
+    // retrive [PoWConfig] from cache. Deletes config post retrival
+    fn retrive_pow_config(&mut self, string: String) -> CaptchaResult<Option<CachedPoWConfig>> {
+        if let Some(difficulty_factor) = self.remove_pow_config(&string) {
+            Ok(Some(difficulty_factor.to_owned()))
+        } else {
+            Ok(None)
+        }
+    }
+
+    // delete [PoWConfig] from cache
+    fn remove_pow_config(&mut self, string: &str) -> Option<CachedPoWConfig> {
+        self.difficulty_map.remove(string)
+    }
+
+    // save captcha result
+    fn save_captcha_result(&mut self, res: CacheResult) -> CaptchaResult<()> {
+        self.result_map.insert(res.token, res.key);
+        Ok(())
+    }
+
+    // verify captcha result
+    fn verify_captcha_result(&mut self, challenge: VerifyCaptchaResult) -> CaptchaResult<bool> {
+        if let Some(captcha_id) = self.remove_cache_result(&challenge.token) {
+            if captcha_id == challenge.key {
+                return Ok(true);
+            } else {
+                return Ok(false);
+            }
+        } else {
+            Ok(false)
+        }
+    }
+
+    // delete cache result
+    fn remove_cache_result(&mut self, string: &str) -> Option<String> {
+        self.result_map.remove(string)
+    }
+}
+
+impl Save for HashCache {}
+
+impl Actor for HashCache {
+    type Context = Context<Self>;
+}
+
+/// cache a PoWConfig
+impl Handler<CachePoW> for HashCache {
+    type Result = MessageResult<CachePoW>;
+    fn handle(&mut self, msg: CachePoW, ctx: &mut Self::Context) -> Self::Result {
+        //use actix::clock::sleep;
+        use actix::clock::delay_for;
+        use std::time::Duration;
+
+        let addr = ctx.address();
+        let del_msg = DeletePoW(msg.string.clone());
+
+        let duration: Duration = Duration::new(msg.duration.clone(), 0);
+        let wait_for = async move {
+            //sleep(duration).await;
+            delay_for(duration).await;
+            addr.send(del_msg).await.unwrap().unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(wait_for);
+
+        MessageResult(self.save_pow_config(msg))
+    }
+}
+
+/// Delte a PoWConfig
+impl Handler<DeletePoW> for HashCache {
+    type Result = MessageResult<DeletePoW>;
+    fn handle(&mut self, msg: DeletePoW, _ctx: &mut Self::Context) -> Self::Result {
+        self.remove_pow_config(&msg.0);
+        MessageResult(Ok(()))
+    }
+}
+
+/// Retrive PoW difficulty_factor for a PoW string
+impl Handler<RetrivePoW> for HashCache {
+    type Result = MessageResult<RetrivePoW>;
+    fn handle(&mut self, msg: RetrivePoW, _ctx: &mut Self::Context) -> Self::Result {
+        MessageResult(self.retrive_pow_config(msg.0))
+    }
+}
+
+/// cache PoW result
+impl Handler<CacheResult> for HashCache {
+    type Result = MessageResult<CacheResult>;
+    fn handle(&mut self, msg: CacheResult, ctx: &mut Self::Context) -> Self::Result {
+        //use actix::clock::sleep;
+        use actix::clock::delay_for;
+        use std::time::Duration;
+
+        let addr = ctx.address();
+        let del_msg = DeleteCaptchaResult {
+            token: msg.token.clone(),
+        };
+
+        let duration: Duration = Duration::new(msg.duration.clone(), 0);
+        let wait_for = async move {
+            //sleep(duration).await;
+            delay_for(duration).await;
+            addr.send(del_msg).await.unwrap().unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(wait_for);
+
+        MessageResult(self.save_captcha_result(msg))
+    }
+}
+
+/// Delte a PoWConfig
+impl Handler<DeleteCaptchaResult> for HashCache {
+    type Result = MessageResult<DeleteCaptchaResult>;
+    fn handle(&mut self, msg: DeleteCaptchaResult, _ctx: &mut Self::Context) -> Self::Result {
+        self.remove_cache_result(&msg.token);
+        MessageResult(Ok(()))
+    }
+}
+
+/// Retrive PoW difficulty_factor for a PoW string
+impl Handler<VerifyCaptchaResult> for HashCache {
+    type Result = MessageResult<VerifyCaptchaResult>;
+    fn handle(&mut self, msg: VerifyCaptchaResult, _ctx: &mut Self::Context) -> Self::Result {
+        // MessageResult(self.retrive(msg.0))
+        MessageResult(self.verify_captcha_result(msg))
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::mcaptcha::AddVisitorResult;
+    use crate::pow::PoWConfig;
+
+    //   async fn sleep(time: u64) {
+    //       //use actix::clock::sleep;
+    //       use actix::clock::delay_for;
+    //       use std::time::Duration;
+
+    //       let duration: Duration = Duration::new(time, 0);
+    //       //sleep(duration).await;
+    //       delay_for(duration).await;
+    //   }
+
+    #[actix_rt::test]
+    async fn hashcache_pow_cache_works() {
+        use actix::clock::delay_for;
+        use actix::clock::Duration;
+
+        const DIFFICULTY_FACTOR: u32 = 54;
+        const DURATION: u64 = 5;
+        const KEY: &str = "mcaptchakey";
+        let addr = HashCache::default().start();
+        let pow: PoWConfig = PoWConfig::new(DIFFICULTY_FACTOR);
+        let visitor_result = AddVisitorResult {
+            difficulty_factor: DIFFICULTY_FACTOR,
+            duration: DURATION,
+        };
+        let string = pow.string.clone();
+
+        let msg = CachePoWBuilder::default()
+            .string(pow.string.clone())
+            .difficulty_factor(DIFFICULTY_FACTOR)
+            .duration(visitor_result.duration)
+            .key(KEY.into())
+            .build()
+            .unwrap();
+
+        addr.send(msg).await.unwrap().unwrap();
+
+        let cache_difficulty_factor = addr
+            .send(RetrivePoW(string.clone()))
+            .await
+            .unwrap()
+            .unwrap();
+        assert_eq!(
+            DIFFICULTY_FACTOR,
+            cache_difficulty_factor.unwrap().difficulty_factor
+        );
+
+        let duration: Duration = Duration::new(5, 0);
+        //sleep(DURATION + DURATION).await;
+        delay_for(duration + duration).await;
+
+        let expired_string = addr.send(RetrivePoW(string)).await.unwrap().unwrap();
+        assert_eq!(None, expired_string);
+    }
+
+    #[actix_rt::test]
+    async fn hashcache_result_cache_works() {
+        use actix::clock::delay_for;
+        use actix::clock::Duration;
+
+        const DURATION: u64 = 5;
+        const KEY: &str = "a";
+        const RES: &str = "b";
+        let addr = HashCache::default().start();
+        // send value to cache
+        // send another value to cache for auto delete
+        // verify_captcha_result
+        // delete
+        // wait for timeout and verify_captcha_result against second value
+
+        let add_cache = CacheResult {
+            key: KEY.into(),
+            token: RES.into(),
+            duration: DURATION,
+        };
+
+        addr.send(add_cache).await.unwrap().unwrap();
+
+        let verify_msg = VerifyCaptchaResult {
+            key: KEY.into(),
+            token: RES.into(),
+        };
+
+        assert!(addr.send(verify_msg).await.unwrap().unwrap());
+
+        let verify_msg = VerifyCaptchaResult {
+            key: "cz".into(),
+            token: RES.into(),
+        };
+        assert!(!addr.send(verify_msg).await.unwrap().unwrap());
+
+        let duration: Duration = Duration::new(5, 0);
+        delay_for(duration + duration).await;
+
+        let verify_msg = VerifyCaptchaResult {
+            key: KEY.into(),
+            token: RES.into(),
+        };
+        assert!(!addr.send(verify_msg).await.unwrap().unwrap());
+    }
+}
+
+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/src/m_captcha/cache/mod.rs.html b/api-docs/m_captcha/0.1.3/src/m_captcha/cache/mod.rs.html new file mode 100644 index 0000000..bf7dd62 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/src/m_captcha/cache/mod.rs.html @@ -0,0 +1,253 @@ +mod.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! Cache is used to save proofof work details and nonces to prevent replay attacks
+//! and rainbow/dictionary attacks
+pub use hashcache::HashCache;
+use messages::*;
+
+pub mod hashcache;
+
+/// Describes actor handler trait impls that are required by a cache implementation
+pub trait Save:
+    actix::Actor
+    + actix::Handler<RetrivePoW>
+    + actix::Handler<CachePoW>
+    + actix::Handler<DeletePoW>
+    + actix::Handler<CacheResult>
+    + actix::Handler<VerifyCaptchaResult>
+    + actix::Handler<DeleteCaptchaResult>
+{
+}
+pub mod messages {
+    //! Messages that can be sent to cache data structures implementing [Save][super::Save]
+    use actix::dev::*;
+    use derive_builder::Builder;
+    use serde::{Deserialize, Serialize};
+
+    use crate::errors::*;
+
+    /// Message to cache PoW difficulty factor and string
+    #[derive(Message, Serialize, Deserialize, Builder, Clone)]
+    #[rtype(result = "CaptchaResult<()>")]
+    pub struct CachePoW {
+        pub string: String,
+        pub difficulty_factor: u32,
+        pub duration: u64,
+        pub key: String,
+    }
+
+    //    pub fn new(p: &PoWConfig, k: String, v: &AddVisitorResult) -> Self {
+    //        CachePoWBuilder::default()
+    //            .string(p.string.clone())
+    //            .difficulty_factor(v.difficulty_factor)
+    //            .duration(v.duration)
+    //            .key(k)
+    //            .build()
+    //            .unwrap()
+    //    }
+    //}
+
+    /// Message to retrive the the difficulty factor for the specified
+    /// string from the cache
+    #[derive(Message)]
+    #[rtype(result = "CaptchaResult<Option<CachedPoWConfig>>")]
+    pub struct RetrivePoW(pub String);
+
+    #[derive(Clone, PartialEq, Debug, Default, Deserialize, Serialize)]
+    pub struct CachedPoWConfig {
+        pub key: String,
+        pub difficulty_factor: u32,
+        pub duration: u64,
+    }
+
+    /// Message to delete cached PoW difficulty factor and string
+    /// when they expire
+    #[derive(Message)]
+    #[rtype(result = "CaptchaResult<()>")]
+    pub struct DeletePoW(pub String);
+
+    /// Message to cache captcha result and the captcha key for which
+    /// it was generated
+    #[derive(Message, Serialize, Deserialize, Builder)]
+    #[rtype(result = "CaptchaResult<()>")]
+    pub struct CacheResult {
+        pub token: String,
+        // key is Captcha identifier
+        pub key: String,
+        pub duration: u64,
+    }
+
+    impl From<CachedPoWConfig> for CacheResult {
+        fn from(c: CachedPoWConfig) -> Self {
+            use crate::utils::get_random;
+
+            CacheResultBuilder::default()
+                .key(c.key)
+                .duration(c.duration)
+                .token(get_random(32))
+                .build()
+                .unwrap()
+        }
+    }
+
+    /// Message to verify captcha result against
+    /// the stored captcha key
+    #[derive(Message, Clone, Deserialize, Serialize)]
+    #[rtype(result = "CaptchaResult<bool>")]
+    pub struct VerifyCaptchaResult {
+        pub token: String,
+        pub key: String,
+    }
+
+    /// Message to delete cached capthca result when it expires
+    #[derive(Message)]
+    #[rtype(result = "CaptchaResult<()>")]
+    pub struct DeleteCaptchaResult {
+        pub token: String,
+    }
+}
+
+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/src/m_captcha/defense.rs.html b/api-docs/m_captcha/0.1.3/src/m_captcha/defense.rs.html new file mode 100644 index 0000000..92f6bc5 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/src/m_captcha/defense.rs.html @@ -0,0 +1,841 @@ +defense.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+//! Defense datatypes
+//! ```rust
+//! use m_captcha::{LevelBuilder, DefenseBuilder};
+//! DefenseBuilder::default()
+//!        .add_level(
+//!            LevelBuilder::default()
+//!                .visitor_threshold(50)
+//!                .difficulty_factor(50)
+//!                .unwrap()
+//!                .build()
+//!                .unwrap(),
+//!        )
+//!        .unwrap()
+//!        .add_level(
+//!            LevelBuilder::default()
+//!                .visitor_threshold(500)
+//!                .difficulty_factor(500)
+//!                .unwrap()
+//!                .build()
+//!                .unwrap(),
+//!        )
+//!        .unwrap()
+//!        .build()
+//!        .unwrap();
+//! ```
+
+use crate::errors::*;
+use serde::{Deserialize, Serialize};
+
+/// Level struct that describes threshold-difficulty factor mapping
+#[derive(Debug, Deserialize, Serialize, Copy, Clone, PartialEq)]
+pub struct Level {
+    pub visitor_threshold: u32,
+    pub difficulty_factor: u32,
+}
+
+/// Bulder struct for [Level] to describe threshold-difficulty factor mapping
+#[derive(Debug, Copy, Clone, PartialEq)]
+pub struct LevelBuilder {
+    visitor_threshold: Option<u32>,
+    difficulty_factor: Option<u32>,
+}
+
+impl Default for LevelBuilder {
+    fn default() -> Self {
+        LevelBuilder {
+            visitor_threshold: None,
+            difficulty_factor: None,
+        }
+    }
+}
+
+impl LevelBuilder {
+    /// set visitor count for level
+    pub fn visitor_threshold(&mut self, visitor_threshold: u32) -> &mut Self {
+        self.visitor_threshold = Some(visitor_threshold);
+        self
+    }
+
+    /// set difficulty factor for level. difficulty_factor can't be zero because
+    /// Difficulty is calculated as:
+    /// ```no_run
+    /// let difficulty_factor = 500;
+    /// let difficulty = u128::max_value() - u128::max_value() / difficulty_factor;
+    /// ```
+    /// the higher the `difficulty_factor`, the higher the difficulty.
+    pub fn difficulty_factor(&mut self, difficulty_factor: u32) -> CaptchaResult<&mut Self> {
+        if difficulty_factor > 0 {
+            self.difficulty_factor = Some(difficulty_factor);
+            Ok(self)
+        } else {
+            Err(CaptchaError::DifficultyFactorZero)
+        }
+    }
+
+    /// build Level struct
+    pub fn build(&mut self) -> CaptchaResult<Level> {
+        if self.visitor_threshold.is_none() {
+            Err(CaptchaError::SetVisitorThreshold)
+        } else if self.difficulty_factor.is_none() {
+            Err(CaptchaError::SetDifficultyFactor)
+        } else {
+            Ok(Level {
+                difficulty_factor: self.difficulty_factor.unwrap(),
+                visitor_threshold: self.visitor_threshold.unwrap(),
+            })
+        }
+    }
+}
+
+/// struct describes all the different [Level]s at which an mCaptcha system operates
+#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
+pub struct Defense {
+    levels: Vec<Level>,
+    // index of current visitor threshold
+    current_visitor_threshold: usize,
+}
+
+/// Builder struct for [Defense]
+#[derive(Debug, Clone, PartialEq)]
+pub struct DefenseBuilder {
+    levels: Vec<Level>,
+}
+
+impl Default for DefenseBuilder {
+    fn default() -> Self {
+        DefenseBuilder { levels: vec![] }
+    }
+}
+
+impl DefenseBuilder {
+    /// add a level to [Defense]
+    pub fn add_level(&mut self, level: Level) -> CaptchaResult<&mut Self> {
+        for i in self.levels.iter() {
+            if i.visitor_threshold == level.visitor_threshold {
+                return Err(CaptchaError::DuplicateVisitorCount);
+            }
+        }
+        self.levels.push(level);
+        Ok(self)
+    }
+
+    /// Build [Defense]
+    pub fn build(&mut self) -> CaptchaResult<Defense> {
+        if !self.levels.is_empty() {
+            // sort levels to arrange in ascending order
+            self.levels.sort_by_key(|a| a.visitor_threshold);
+
+            for level in self.levels.iter() {
+                if level.difficulty_factor == 0 {
+                    return Err(CaptchaError::DifficultyFactorZero);
+                }
+            }
+
+            // as visitor count increases, difficulty_factor too should increse
+            // if it decreses, an error must be thrown
+            for i in 0..self.levels.len() - 1 {
+                if self.levels[i].difficulty_factor > self.levels[i + 1].difficulty_factor {
+                    return Err(CaptchaError::DecreaseingDifficultyFactor);
+                }
+            }
+
+            Ok(Defense {
+                levels: self.levels.to_owned(),
+                current_visitor_threshold: 0,
+            })
+        } else {
+            Err(CaptchaError::LevelEmpty)
+        }
+    }
+}
+
+impl Defense {
+    ///! Difficulty is calculated as:
+    ///! ```rust
+    ///! let difficulty = u128::max_value() - u128::max_value() / difficulty_factor;
+    ///! ```
+    ///! The higher the `difficulty_factor`, the higher the difficulty.
+
+    /// Get difficulty factor of current level of defense
+    pub fn get_difficulty(&self) -> u32 {
+        self.levels[self.current_visitor_threshold].difficulty_factor
+    }
+
+    /// tighten up defense. Increases defense level by a factor of one.
+    /// When defense is at max level, calling this method will have no effect
+    pub fn tighten_up(&mut self) {
+        if self.current_visitor_threshold != self.levels.len() - 1 {
+            self.current_visitor_threshold += 1;
+        }
+    }
+    /// Loosen up defense. Decreases defense level by a factor of one.
+    /// When defense is at the lowest level, calling this method will have no effect.
+    pub fn loosen_up(&mut self) {
+        if self.current_visitor_threshold != 0 {
+            self.current_visitor_threshold -= 1;
+        }
+    }
+
+    /// Set defense to maximum level
+    pub fn max_defense(&mut self) {
+        self.current_visitor_threshold = self.levels.len() - 1;
+    }
+
+    /// Set defense to minimum level
+    pub fn min_defense(&mut self) {
+        self.current_visitor_threshold = 0;
+    }
+
+    /// Get current level's  visitor threshold
+    pub fn visitor_threshold(&self) -> u32 {
+        self.levels[self.current_visitor_threshold].visitor_threshold
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn level_builder_works() {
+        let level = LevelBuilder::default()
+            .difficulty_factor(1)
+            .unwrap()
+            .visitor_threshold(0)
+            .build()
+            .unwrap();
+
+        assert_eq!(level.visitor_threshold, 0);
+        assert_eq!(level.difficulty_factor, 1);
+
+        assert_eq!(
+            LevelBuilder::default().difficulty_factor(0),
+            Err(CaptchaError::DifficultyFactorZero)
+        );
+
+        assert_eq!(
+            LevelBuilder::default()
+                .difficulty_factor(1)
+                .unwrap()
+                .build(),
+            Err(CaptchaError::SetVisitorThreshold)
+        );
+        assert_eq!(
+            LevelBuilder::default().visitor_threshold(10).build(),
+            Err(CaptchaError::SetDifficultyFactor)
+        );
+    }
+
+    #[test]
+    fn defense_builder_duplicate_visitor_threshold() {
+        let mut defense_builder = DefenseBuilder::default();
+        let err = defense_builder
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            );
+        assert_eq!(err, Err(CaptchaError::DuplicateVisitorCount));
+    }
+
+    #[test]
+    fn defense_builder_decreasing_difficulty_factor() {
+        let mut defense_builder = DefenseBuilder::default();
+        let err = defense_builder
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(500)
+                    .difficulty_factor(10)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .build();
+        assert_eq!(err, Err(CaptchaError::DecreaseingDifficultyFactor));
+    }
+
+    fn get_defense() -> Defense {
+        DefenseBuilder::default()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50)
+                    .difficulty_factor(50)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(500)
+                    .difficulty_factor(5000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(5000)
+                    .difficulty_factor(50000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(50000)
+                    .difficulty_factor(500000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(500000)
+                    .difficulty_factor(5000000)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .build()
+            .unwrap()
+    }
+    #[test]
+    fn defense_builder_works() {
+        let defense = get_defense();
+
+        assert_eq!(defense.levels[0].difficulty_factor, 50);
+        assert_eq!(defense.levels[1].difficulty_factor, 5000);
+        assert_eq!(defense.levels[2].difficulty_factor, 50_000);
+        assert_eq!(defense.levels[3].difficulty_factor, 500_000);
+        assert_eq!(defense.levels[4].difficulty_factor, 5_000_000);
+    }
+
+    #[test]
+    fn tighten_up_works() {
+        let mut defense = get_defense();
+
+        assert_eq!(defense.get_difficulty(), 50);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 5_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 50_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 500_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+
+        defense.tighten_up();
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+    }
+
+    #[test]
+    fn max_defense_works() {
+        let mut defense = get_defense();
+        defense.max_defense();
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+    }
+
+    #[test]
+    fn minimum_defense_works() {
+        let mut defense = get_defense();
+        defense.min_defense();
+        assert_eq!(defense.get_difficulty(), 50);
+    }
+
+    #[test]
+    fn loosen_up_works() {
+        let mut defense = get_defense();
+        defense.max_defense();
+
+        assert_eq!(defense.get_difficulty(), 5_000_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 500_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 50_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 5_000);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 50);
+
+        defense.loosen_up();
+        assert_eq!(defense.get_difficulty(), 50);
+    }
+}
+
+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/src/m_captcha/errors.rs.html b/api-docs/m_captcha/0.1.3/src/m_captcha/errors.rs.html new file mode 100644 index 0000000..f726d3a --- /dev/null +++ b/api-docs/m_captcha/0.1.3/src/m_captcha/errors.rs.html @@ -0,0 +1,179 @@ +errors.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+//! Errors and Result module
+use derive_more::{Display, Error};
+
+/// Error datatype
+#[derive(Debug, PartialEq, Display, Clone, Error)]
+#[cfg(not(tarpaulin_include))]
+pub enum CaptchaError {
+    /// When configuring m_captcha, [DefenseBuilder][crate::defense::DefenseBuilder]
+    /// must be passed atleast one `LevelConfig` if not this error will arise
+    #[display(fmt = "LevelBuilder should have atleaset one level configured")]
+    LevelEmpty,
+
+    /// Visitor count must be a whole number(zero and above).
+    /// When configuring m_captcha, [LevelBuilder][crate::defense::LevelBuilder].
+    /// difficulty_factor must be set to greater than zero.
+    #[display(fmt = "difficulty factor must be greater than zero")]
+    DifficultyFactorZero,
+
+    /// captcha cooldown duration must be greater than 0
+    #[display(fmt = "difficulty factor must be greater than zero")]
+    CaptchaDurationZero,
+
+    /// Difficulty factor must be set
+    #[display(fmt = "Set difficulty factor")]
+    SetDifficultyFactor,
+
+    /// Visitor threshold must be set
+    #[display(fmt = "Set visitor threshold")]
+    SetVisitorThreshold,
+
+    /// Visitor count must be Unique
+    #[display(fmt = "Duplicate visitor count")]
+    DuplicateVisitorCount,
+
+    /// Difficulty factor should increase with level
+    #[display(fmt = "Difficulty factor should increase with level")]
+    DecreaseingDifficultyFactor,
+
+    /// Difficulty factor should increase with level
+    #[display(fmt = "Actor mailbox error")]
+    MailboxError,
+
+    /// Happens when submitted work doesn't satisfy the required
+    /// difficulty factor
+    #[display(fmt = "Insuffiencient Difficulty")]
+    InsuffiencientDifficulty,
+
+    /// Happens when submitted work is computed over string that
+    /// isn't in cache
+    #[display(fmt = "String now found")]
+    StringNotFound,
+
+    /// Happens when submitted work is computed over configuration intended for
+    /// a different mCAptcha sitekey
+    #[display(fmt = "PoW computed over configuration not intended for target sitekey")]
+    MCaptchaKeyValidationFail,
+
+    /// Submitted PoW is invalid
+    #[display(fmt = "Invalid PoW")]
+    InvalidPoW,
+
+    /// Used in builder structs when a value is not set
+    #[display(fmt = "Please set value: {}", _0)]
+    PleaseSetValue(#[error(not(source))] String),
+}
+
+/// [Result] datatype for m_captcha
+pub type CaptchaResult<V> = std::result::Result<V, CaptchaError>;
+
+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/src/m_captcha/lib.rs.html b/api-docs/m_captcha/0.1.3/src/m_captcha/lib.rs.html new file mode 100644 index 0000000..a0e3c89 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/src/m_captcha/lib.rs.html @@ -0,0 +1,407 @@ +lib.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! mCaptcha is a proof of work based Denaial-of-Service attack protection system.
+//! This is is a server library that you can embed in your services to protect your
+//! servers.
+//!
+//! A commercial managed solution is in the works but I'd much rather prefer
+//! folks host their own instances as it will make the more decentralized and free.
+//!
+//! In mCaptcha, defense is adjusted in discrete levels that depend on the
+//! ammount of traffic that a service is experiencing. So users of this library are
+//! requested to benchmark their target machines before configuring their mCaptcha
+//! component.
+//!
+//! ## Terminology:
+//! - Difficulty(Factor): Minimum ammount of work that a client must do to make a valid
+//! request.
+//! - [Defense]: A datatype that various visitor-difficulty mappigns
+//! - Visitor: Smallest unit of traffic, usually a single request. The more you have, the busier
+//! your service is. Determines mCaptcha defense defense
+//! - Visitor threshold: The threshold at which [MCaptcha] will adjust defense defense
+//! - [Cache][crate::cache] : A datatype that implements [Save][crate::cache::Save]. Used to store
+//! PoW requirements to defend against replay attacks and dictionary attacks.
+//! - [Master][crate::master::Master]: A datatype that manages
+//! [MCaptcha][crate::mcaptcha::MCaptcha] actors. Works like a DNS for
+//! [AddVisitor][crate::mcaptcha::AddVisitor] messages.
+//! - [System][crate::system::System]: mCaptcha system that manages cache, master and provides
+//! useful abstractions. An mCaptcha system/instance can have only a single
+//! [System][crate::system::System]
+//!
+//! ## Example:
+//!
+//! ```rust
+//! use m_captcha::{
+//!     cache::{messages::VerifyCaptchaResult, HashCache},
+//!     master::{AddSiteBuilder, Master},
+//!     pow::{ConfigBuilder, Work},
+//!     system::SystemBuilder,
+//!     DefenseBuilder, LevelBuilder, MCaptchaBuilder,
+//! };
+//! // traits from actix needs to be in scope for starting actor
+//! use actix::prelude::*;
+//!
+//! #[actix_rt::main]
+//! async fn main() -> std::io::Result<()> {
+//!     // start cahce actor
+//!     // cache is used to store PoW requirements that are sent to clients
+//!     // This way, it can be verified that the client computed work over a config
+//!     // that _we_ sent. Offers protection against rainbow tables powered dictionary attacks
+//!     let cache = HashCache::default().start();
+//!
+//!     // create PoW config with unique salt. Salt has to be safely guarded.
+//!     // salts protect us from replay attacks
+//!     let pow = ConfigBuilder::default()
+//!         .salt("myrandomsaltisnotlongenoug".into())
+//!         .build()
+//!         .unwrap();
+//!
+//!     // start master actor. Master actor is responsible for managing MCaptcha actors
+//!     // each mCaptcha system should have only one master
+//!     let master = Master::new(5).start();
+//!
+//!     // Create system. System encapsulates master and cache and provides useful abstraction
+//!     // each mCaptcha system should have only one system
+//!     let system = SystemBuilder::default()
+//!         .master(master)
+//!         .cache(cache)
+//!         .pow(pow.clone())
+//!         .build()
+//!         .unwrap();
+//!
+//!     // configure defense. This is a per site configuration. A site can have several levels
+//!     // of defenses configured
+//!     let defense = DefenseBuilder::default()
+//!         // add as many defense as you see fit
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 // visitor_threshold is the threshold/limit at which
+//!                 // mCaptcha will adjust difficulty defense
+//!                 // it is advisable to set small values for the first
+//!                 // defense visitor_threshold and difficulty_factor
+//!                 // as this will be the work that clients will be
+//!                 // computing when there's no load
+//!                 .visitor_threshold(50)
+//!                 .difficulty_factor(500)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 .visitor_threshold(5000)
+//!                 .difficulty_factor(50000)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .build()
+//!         .unwrap();
+//!
+//!     // create and start MCaptcha actor that uses the above defense configuration
+//!     // This is what manages the difficulty factor of sites that an mCaptcha protects
+//!     let mcaptcha = MCaptchaBuilder::default()
+//!         .defense(defense)
+//!         // leaky bucket algorithm's emission interval
+//!         .duration(30)
+//!         //   .cache(cache)
+//!         .build()
+//!         .unwrap()
+//!         .start();
+//!
+//!     // unique value identifying an MCaptcha actor
+//!     let mcaptcha_name = "batsense.net";
+//!
+//!     // add MCaptcha to Master
+//!     let msg = AddSiteBuilder::default()
+//!         .id(mcaptcha_name.into())
+//!         .addr(mcaptcha.clone())
+//!         .build()
+//!         .unwrap();
+//!     system.master.send(msg).await.unwrap();
+//!
+//!     // Get PoW config. Should be called everytime there's a visitor for a
+//!     // managed site(here mcaptcha_name)
+//!     let work_req = system.get_pow(mcaptcha_name.into()).await.unwrap();
+//!
+//!     // the following computation should be done on the client but for the purpose
+//!     // of this illustration, we are going to do it on the server it self
+//!     let work = pow
+//!         .prove_work(&work_req.string, work_req.difficulty_factor)
+//!         .unwrap();
+//!
+//!     // the payload that the client sends to the server
+//!     let payload = Work {
+//!         string: work_req.string,
+//!         result: work.result,
+//!         nonce: work.nonce,
+//!         key: mcaptcha_name.into(),
+//!     };
+//!
+//!     // Server evaluates client's work. Returns true if everything
+//!     // checksout and Err() if something fishy is happening
+//!     let res = system.verify_pow(payload.clone()).await;
+//!     assert!(res.is_ok());
+//!
+//!    // The client should submit the token to the mCaptcha protected service
+//!    // The service should validate the token received from the client
+//!    // with the mCaptcha server before processing client's
+//!    // request
+//!
+//!    // mcaptcha protected service sends the following paylaod to mCaptcha
+//!    // server:
+//!    let verify_msg = VerifyCaptchaResult {
+//!        token: res.unwrap(),
+//!        key: mcaptcha_name.into(),
+//!    };
+//!
+//!    // on mCaptcha server:
+//!    let res = system.validate_verification_tokens(verify_msg).await;
+//!    // mCaptcha will return true if token is valid and false if
+//!    // token is invalid
+//!    assert!(res.is_ok());
+//!    assert!(res.unwrap());
+//!
+//!    Ok(())
+//! }
+//! ```
+#![forbid(unsafe_code)]
+pub mod defense;
+pub mod errors;
+pub mod master;
+pub mod mcaptcha;
+
+/// message datatypes to interact with [MCaptcha] actor
+pub mod cache;
+pub mod pow;
+pub mod system;
+mod utils;
+
+pub use crate::cache::hashcache::HashCache;
+
+pub use defense::{Defense, DefenseBuilder, LevelBuilder};
+pub use mcaptcha::{MCaptcha, MCaptchaBuilder};
+
+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/src/m_captcha/master.rs.html b/api-docs/m_captcha/0.1.3/src/m_captcha/master.rs.html new file mode 100644 index 0000000..41a478f --- /dev/null +++ b/api-docs/m_captcha/0.1.3/src/m_captcha/master.rs.html @@ -0,0 +1,409 @@ +master.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! [Master] actor module that manages [MCaptcha] actors
+use std::collections::BTreeMap;
+use std::time::Duration;
+
+//use actix::clock::sleep;
+use actix::clock::delay_for;
+use actix::dev::*;
+use derive_builder::Builder;
+use log::info;
+
+use crate::mcaptcha::MCaptcha;
+
+/// This Actor manages the [MCaptcha] actors.
+/// A service can have several [MCaptcha] actors with
+/// varying [Defense][crate::defense::Defense] configurations
+/// so a "master" actor is needed to manage them all
+#[derive(Clone)]
+pub struct Master {
+    sites: BTreeMap<String, (Option<()>, Addr<MCaptcha>)>,
+    gc: u64,
+}
+
+impl Master {
+    /// add [MCaptcha] actor to [Master]
+    pub fn add_site(&mut self, details: AddSite) {
+        self.sites
+            .insert(details.id, (None, details.addr.to_owned()));
+    }
+
+    /// create new master
+    /// accepts a `u64` to configure garbage collection period
+    pub fn new(gc: u64) -> Self {
+        Master {
+            sites: BTreeMap::new(),
+            gc,
+        }
+    }
+
+    /// get [MCaptcha] actor from [Master]
+    pub fn get_site<'a, 'b>(&'a mut self, id: &'b str) -> Option<Addr<MCaptcha>> {
+        let mut r = None;
+        if let Some((read_val, addr)) = self.sites.get_mut(id) {
+            r = Some(addr.clone());
+            *read_val = Some(());
+        };
+        r
+    }
+
+    /// remvoes [MCaptcha] actor from [Master]
+    pub fn rm_site(&mut self, id: &str) {
+        self.sites.remove(id);
+    }
+}
+
+impl Actor for Master {
+    type Context = Context<Self>;
+
+    fn started(&mut self, ctx: &mut Self::Context) {
+        let addr = ctx.address();
+        let task = async move {
+            addr.send(CleanUp).await.unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(task);
+    }
+}
+
+/// Message to get an [MCaptcha] actor from master
+#[derive(Message)]
+#[rtype(result = "Option<Addr<MCaptcha>>")]
+pub struct GetSite(pub String);
+
+impl Handler<GetSite> for Master {
+    type Result = MessageResult<GetSite>;
+
+    fn handle(&mut self, m: GetSite, _ctx: &mut Self::Context) -> Self::Result {
+        let addr = self.get_site(&m.0);
+        if addr.is_none() {
+            return MessageResult(None);
+        } else {
+            return MessageResult(Some(addr.unwrap().clone()));
+        }
+    }
+}
+
+/// Message to clean up master of [MCaptcha] actors with zero visitor count
+#[derive(Message)]
+#[rtype(result = "()")]
+pub struct CleanUp;
+
+impl Handler<CleanUp> for Master {
+    type Result = ();
+
+    fn handle(&mut self, _: CleanUp, ctx: &mut Self::Context) -> Self::Result {
+        let sites = self.sites.clone();
+        let gc = self.gc;
+        let master = ctx.address();
+        info!("init master actor cleanup up");
+        let task = async move {
+            for (id, (new, addr)) in sites.iter() {
+                use crate::mcaptcha::{GetCurrentVisitorCount, Stop};
+                let visitor_count = addr.send(GetCurrentVisitorCount).await.unwrap();
+                println!("{}", visitor_count);
+                if visitor_count == 0 && new.is_some() {
+                    addr.send(Stop).await.unwrap();
+                    master.send(RemoveSite(id.to_owned())).await.unwrap();
+                    println!("cleaned up");
+                }
+            }
+
+            let duration = Duration::new(gc, 0);
+            //sleep(duration).await;
+            delay_for(duration).await;
+            master.send(CleanUp).await.unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(task);
+    }
+}
+
+/// Message to delete [MCaptcha] actor
+#[derive(Message)]
+#[rtype(result = "()")]
+pub struct RemoveSite(pub String);
+
+impl Handler<RemoveSite> for Master {
+    type Result = ();
+
+    fn handle(&mut self, m: RemoveSite, _ctx: &mut Self::Context) -> Self::Result {
+        self.rm_site(&m.0);
+    }
+}
+
+/// Message to add an [MCaptcha] actor to [Master]
+#[derive(Message, Builder)]
+#[rtype(result = "()")]
+pub struct AddSite {
+    pub id: String,
+    pub addr: Addr<MCaptcha>,
+}
+
+impl Handler<AddSite> for Master {
+    type Result = ();
+
+    fn handle(&mut self, m: AddSite, _ctx: &mut Self::Context) -> Self::Result {
+        self.add_site(m);
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::mcaptcha::tests::*;
+
+    #[actix_rt::test]
+    async fn master_actor_works() {
+        let addr = Master::new(1).start();
+
+        let id = "yo";
+        let mcaptcha = get_counter().start();
+        let msg = AddSiteBuilder::default()
+            .id(id.into())
+            .addr(mcaptcha.clone())
+            .build()
+            .unwrap();
+
+        addr.send(msg).await.unwrap();
+
+        let mcaptcha_addr = addr.send(GetSite(id.into())).await.unwrap();
+        assert_eq!(mcaptcha_addr, Some(mcaptcha));
+
+        let addr_doesnt_exist = addr.send(GetSite("a".into())).await.unwrap();
+        assert!(addr_doesnt_exist.is_none());
+
+        let timer_expire = Duration::new(DURATION, 0);
+        //        sleep(timer_expire).await;
+        //        sleep(timer_expire).await;
+        delay_for(timer_expire).await;
+        delay_for(timer_expire).await;
+
+        let mcaptcha_addr = addr.send(GetSite(id.into())).await.unwrap();
+        assert_eq!(mcaptcha_addr, None);
+    }
+}
+
+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/src/m_captcha/mcaptcha.rs.html b/api-docs/m_captcha/0.1.3/src/m_captcha/mcaptcha.rs.html new file mode 100644 index 0000000..ea5da2b --- /dev/null +++ b/api-docs/m_captcha/0.1.3/src/m_captcha/mcaptcha.rs.html @@ -0,0 +1,777 @@ +mcaptcha.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! MCaptcha actor module that manages defense levels
+//!
+//! ## Usage:
+//! ```rust
+//! use m_captcha::{mcaptcha::AddVisitor, MCaptchaBuilder, cache::HashCache, LevelBuilder, DefenseBuilder};
+//! // traits from actix needs to be in scope for starting actor
+//! use actix::prelude::*;
+//!
+//! #[actix_rt::main]
+//! async fn main() -> std::io::Result<()> {
+//!     // configure defense
+//!     let defense = DefenseBuilder::default()
+//!         // add as many levels as you see fit
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 // visitor_threshold is the threshold/limit at which
+//!                 // mCaptcha will adjust difficulty levels
+//!                 // it is advisable to set small values for the first
+//!                 // levels visitor_threshold and difficulty_factor
+//!                 // as this will be the work that clients will be
+//!                 // computing when there's no load
+//!                 .visitor_threshold(50)
+//!                 .difficulty_factor(500)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .add_level(
+//!             LevelBuilder::default()
+//!                 .visitor_threshold(5000)
+//!                 .difficulty_factor(50000)
+//!                 .unwrap()
+//!                 .build()
+//!                 .unwrap(),
+//!         )
+//!         .unwrap()
+//!         .build()
+//!         .unwrap();
+//!
+//!     // create and start MCaptcha actor
+//!     //let cache = HashCache::default().start();
+//!     let mcaptcha = MCaptchaBuilder::default()
+//!         .defense(defense)
+//!         // leaky bucket algorithm's emission interval
+//!         .duration(30)
+//!         .build()
+//!         .unwrap()
+//!         .start();
+//!
+//!     // increment count when user visits protected routes
+//!     mcaptcha.send(AddVisitor).await.unwrap();
+//!
+//!     Ok(())
+//! }
+//! ```
+
+use std::time::Duration;
+
+//use actix::clock::sleep;
+use actix::dev::*;
+use serde::{Deserialize, Serialize};
+
+use crate::{
+    defense::Defense,
+    errors::{CaptchaError, CaptchaResult},
+};
+
+/// Builder for [MCaptcha]
+#[derive(Clone, Serialize, Deserialize, Debug)]
+pub struct MCaptchaBuilder {
+    visitor_threshold: u32,
+    defense: Option<Defense>,
+    duration: Option<u64>,
+}
+
+impl Default for MCaptchaBuilder {
+    fn default() -> Self {
+        MCaptchaBuilder {
+            visitor_threshold: 0,
+            defense: None,
+            duration: None,
+        }
+    }
+}
+
+/// This struct represents the mCaptcha state and is used
+/// to configure leaky-bucket lifetime and manage defense
+#[derive(Clone, Serialize, Deserialize, Debug)]
+pub struct MCaptcha {
+    visitor_threshold: u32,
+    defense: Defense,
+    duration: u64,
+}
+
+impl MCaptchaBuilder {
+    /// set defense
+    pub fn defense(&mut self, d: Defense) -> &mut Self {
+        self.defense = Some(d);
+        self
+    }
+
+    /// set duration
+    pub fn duration(&mut self, d: u64) -> &mut Self {
+        self.duration = Some(d);
+        self
+    }
+
+    /// Builds new [MCaptcha]
+    pub fn build(&mut self) -> CaptchaResult<MCaptcha> {
+        if self.duration.is_none() {
+            Err(CaptchaError::PleaseSetValue("duration".into()))
+        } else if self.defense.is_none() {
+            Err(CaptchaError::PleaseSetValue("defense".into()))
+        } else if self.duration <= Some(0) {
+            Err(CaptchaError::CaptchaDurationZero)
+        } else {
+            let m = MCaptcha {
+                duration: self.duration.unwrap(),
+                defense: self.defense.clone().unwrap(),
+                visitor_threshold: self.visitor_threshold,
+            };
+            Ok(m)
+        }
+    }
+}
+
+impl MCaptcha {
+    /// increments the visitor count by one
+    pub fn add_visitor(&mut self) {
+        self.visitor_threshold += 1;
+        if self.visitor_threshold > self.defense.visitor_threshold() {
+            self.defense.tighten_up();
+        } else {
+            self.defense.loosen_up();
+        }
+    }
+
+    /// decrements the visitor count by one
+    pub fn decrement_visitor(&mut self) {
+        if self.visitor_threshold > 0 {
+            self.visitor_threshold -= 1;
+        }
+    }
+
+    /// get current difficulty factor
+    pub fn get_difficulty(&self) -> u32 {
+        self.defense.get_difficulty()
+    }
+
+    /// get [MCaptcha]'s lifetime
+    pub fn get_duration(&self) -> u64 {
+        self.duration
+    }
+}
+impl Actor for MCaptcha {
+    type Context = Context<Self>;
+}
+
+/// Message to decrement the visitor count
+#[derive(Message)]
+#[rtype(result = "()")]
+struct DeleteVisitor;
+
+impl Handler<DeleteVisitor> for MCaptcha {
+    type Result = ();
+    fn handle(&mut self, _msg: DeleteVisitor, _ctx: &mut Self::Context) -> Self::Result {
+        self.decrement_visitor();
+    }
+}
+
+/// Message to increment the visitor count
+/// returns difficulty factor and lifetime
+#[derive(Message)]
+#[rtype(result = "AddVisitorResult")]
+pub struct AddVisitor;
+
+/// Struct representing the return datatime of
+/// [AddVisitor] message. Contains MCaptcha lifetime
+/// and difficulty factor
+#[derive(Debug, Clone, Deserialize, Serialize)]
+pub struct AddVisitorResult {
+    pub duration: u64,
+    pub difficulty_factor: u32,
+}
+
+impl AddVisitorResult {
+    fn new(m: &MCaptcha) -> Self {
+        AddVisitorResult {
+            duration: m.get_duration(),
+            difficulty_factor: m.get_difficulty(),
+        }
+    }
+}
+
+impl Handler<AddVisitor> for MCaptcha {
+    type Result = MessageResult<AddVisitor>;
+
+    fn handle(&mut self, _: AddVisitor, ctx: &mut Self::Context) -> Self::Result {
+        let addr = ctx.address();
+        use actix::clock::delay_for;
+
+        let duration: Duration = Duration::new(self.duration.clone(), 0);
+        let wait_for = async move {
+            //sleep(duration).await;
+            delay_for(duration).await;
+            addr.send(DeleteVisitor).await.unwrap();
+        }
+        .into_actor(self);
+        ctx.spawn(wait_for);
+
+        self.add_visitor();
+        MessageResult(AddVisitorResult::new(&self))
+    }
+}
+
+/// Message to get the visitor count
+#[derive(Message)]
+#[rtype(result = "u32")]
+pub struct GetCurrentVisitorCount;
+
+impl Handler<GetCurrentVisitorCount> for MCaptcha {
+    type Result = MessageResult<GetCurrentVisitorCount>;
+
+    fn handle(&mut self, _: GetCurrentVisitorCount, _ctx: &mut Self::Context) -> Self::Result {
+        MessageResult(self.visitor_threshold)
+    }
+}
+
+/// Message to stop [MCaptcha]
+#[derive(Message)]
+#[rtype(result = "()")]
+pub struct Stop;
+
+impl Handler<Stop> for MCaptcha {
+    type Result = ();
+
+    fn handle(&mut self, _: Stop, ctx: &mut Self::Context) -> Self::Result {
+        ctx.stop()
+    }
+}
+
+#[cfg(test)]
+pub mod tests {
+    use super::*;
+    use crate::defense::*;
+
+    // constants for testing
+    // (visitor count, level)
+    pub const LEVEL_1: (u32, u32) = (50, 50);
+    pub const LEVEL_2: (u32, u32) = (500, 500);
+    pub const DURATION: u64 = 5;
+
+    type MyActor = Addr<MCaptcha>;
+
+    pub fn get_defense() -> Defense {
+        DefenseBuilder::default()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(LEVEL_1.0)
+                    .difficulty_factor(LEVEL_1.1)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .add_level(
+                LevelBuilder::default()
+                    .visitor_threshold(LEVEL_2.0)
+                    .difficulty_factor(LEVEL_2.1)
+                    .unwrap()
+                    .build()
+                    .unwrap(),
+            )
+            .unwrap()
+            .build()
+            .unwrap()
+    }
+
+    async fn race(addr: Addr<MCaptcha>, count: (u32, u32)) {
+        for _ in 0..count.0 as usize - 1 {
+            let _ = addr.send(AddVisitor).await.unwrap();
+        }
+    }
+
+    pub fn get_counter() -> MCaptcha {
+        MCaptchaBuilder::default()
+            .defense(get_defense())
+            .duration(DURATION)
+            .build()
+            .unwrap()
+    }
+
+    #[actix_rt::test]
+    async fn counter_defense_tightenup_works() {
+        let addr: MyActor = get_counter().start();
+
+        let mut mcaptcha = addr.send(AddVisitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_1.0);
+
+        race(addr.clone(), LEVEL_2).await;
+        mcaptcha = addr.send(AddVisitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_2.1);
+    }
+
+    #[actix_rt::test]
+    async fn counter_defense_loosenup_works() {
+        //use actix::clock::sleep;
+        use actix::clock::delay_for;
+        let addr: MyActor = get_counter().start();
+
+        race(addr.clone(), LEVEL_2).await;
+        race(addr.clone(), LEVEL_2).await;
+        let mut mcaptcha = addr.send(AddVisitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_2.1);
+
+        let duration = Duration::new(DURATION, 0);
+        //sleep(duration).await;
+        delay_for(duration).await;
+
+        mcaptcha = addr.send(AddVisitor).await.unwrap();
+        assert_eq!(mcaptcha.difficulty_factor, LEVEL_1.1);
+    }
+
+    #[test]
+    fn test_mcatcptha_builder() {
+        let defense = get_defense();
+        let m = MCaptchaBuilder::default()
+            .duration(0)
+            .defense(defense.clone())
+            .build();
+
+        assert_eq!(m.err(), Some(CaptchaError::CaptchaDurationZero));
+
+        let m = MCaptchaBuilder::default().duration(30).build();
+        assert_eq!(
+            m.err(),
+            Some(CaptchaError::PleaseSetValue("defense".into()))
+        );
+
+        let m = MCaptchaBuilder::default().defense(defense.clone()).build();
+        assert_eq!(
+            m.err(),
+            Some(CaptchaError::PleaseSetValue("duration".into()))
+        );
+    }
+
+    #[actix_rt::test]
+    async fn get_current_visitor_count_works() {
+        let addr: MyActor = get_counter().start();
+
+        addr.send(AddVisitor).await.unwrap();
+        addr.send(AddVisitor).await.unwrap();
+        addr.send(AddVisitor).await.unwrap();
+        addr.send(AddVisitor).await.unwrap();
+        let count = addr.send(GetCurrentVisitorCount).await.unwrap();
+
+        assert_eq!(count, 4);
+    }
+
+    #[actix_rt::test]
+    #[should_panic]
+    async fn stop_works() {
+        let addr: MyActor = get_counter().start();
+        addr.send(Stop).await.unwrap();
+        addr.send(AddVisitor).await.unwrap();
+    }
+}
+
+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/src/m_captcha/pow.rs.html b/api-docs/m_captcha/0.1.3/src/m_captcha/pow.rs.html new file mode 100644 index 0000000..c61a995 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/src/m_captcha/pow.rs.html @@ -0,0 +1,129 @@ +pow.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+//! PoW datatypes used in client-server interaction
+use pow_sha256::PoW;
+use serde::{Deserialize, Serialize};
+
+pub use pow_sha256::ConfigBuilder;
+
+/// PoW requirement datatype that is be sent to clients for generating PoW
+#[derive(Clone, Serialize, Deserialize, Debug)]
+pub struct PoWConfig {
+    pub string: String,
+    pub difficulty_factor: u32,
+}
+impl PoWConfig {
+    /// create new instance of [PoWConfig]
+    pub fn new(m: u32) -> Self {
+        use crate::utils::get_random;
+
+        PoWConfig {
+            string: get_random(32),
+            difficulty_factor: m,
+        }
+    }
+}
+
+/// PoW datatype that clients send to server
+#[derive(Clone, Serialize, Deserialize, Debug)]
+pub struct Work {
+    pub string: String,
+    pub result: String,
+    pub nonce: u64,
+    pub key: String,
+}
+
+impl From<Work> for PoW<String> {
+    fn from(w: Work) -> Self {
+        use pow_sha256::PoWBuilder;
+        PoWBuilder::default()
+            .result(w.result)
+            .nonce(w.nonce)
+            .build()
+            .unwrap()
+    }
+}
+
+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/src/m_captcha/system.rs.html b/api-docs/m_captcha/0.1.3/src/m_captcha/system.rs.html new file mode 100644 index 0000000..b4116f7 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/src/m_captcha/system.rs.html @@ -0,0 +1,483 @@ +system.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+//! module describing mCaptcha system
+use actix::dev::*;
+use derive_builder::Builder;
+use pow_sha256::Config;
+
+use crate::cache::messages::*;
+use crate::cache::Save;
+use crate::errors::*;
+use crate::master::Master;
+use crate::pow::*;
+
+/// struct describing various bits of data required for an mCaptcha system
+#[derive(Clone, Builder)]
+pub struct System<T: Save> {
+    pub master: Addr<Master>,
+    cache: Addr<T>,
+    pow: Config,
+}
+
+impl<T> System<T>
+where
+    T: Save,
+    <T as actix::Actor>::Context: ToEnvelope<T, CachePoW>
+        + ToEnvelope<T, RetrivePoW>
+        + ToEnvelope<T, CacheResult>
+        + ToEnvelope<T, VerifyCaptchaResult>,
+{
+    /// utility function to get difficulty factor of site `id` and cache it
+    pub async fn get_pow(&self, id: String) -> Option<PoWConfig> {
+        use crate::master::GetSite;
+        use crate::mcaptcha::AddVisitor;
+
+        let site_addr = self.master.send(GetSite(id.clone())).await.unwrap();
+        if site_addr.is_none() {
+            return None;
+        }
+        let mcaptcha = site_addr.unwrap().send(AddVisitor).await.unwrap();
+        let pow_config = PoWConfig::new(mcaptcha.difficulty_factor);
+
+        let cache_msg = CachePoWBuilder::default()
+            .string(pow_config.string.clone())
+            .difficulty_factor(mcaptcha.difficulty_factor)
+            .duration(mcaptcha.duration)
+            .key(id)
+            .build()
+            .unwrap();
+
+        self.cache.send(cache_msg).await.unwrap().unwrap();
+        Some(pow_config)
+    }
+
+    /// utility function to verify [Work]
+    pub async fn verify_pow(&self, work: Work) -> CaptchaResult<String> {
+        let string = work.string.clone();
+        let msg = RetrivePoW(string.clone());
+
+        let cached_config = self.cache.send(msg).await.unwrap()?;
+
+        if cached_config.is_none() {
+            return Err(CaptchaError::StringNotFound);
+        }
+
+        let cached_config = cached_config.unwrap();
+
+        if work.key != cached_config.key {
+            return Err(CaptchaError::MCaptchaKeyValidationFail);
+        }
+
+        let pow = work.into();
+
+        if !self
+            .pow
+            .is_sufficient_difficulty(&pow, cached_config.difficulty_factor)
+        {
+            return Err(CaptchaError::InsuffiencientDifficulty);
+        }
+
+        if !self.pow.is_valid_proof(&pow, &string) {
+            return Err(CaptchaError::InvalidPoW);
+        }
+
+        let msg: CacheResult = cached_config.into();
+        let res = msg.token.clone();
+        self.cache.send(msg).await.unwrap()?;
+        Ok(res)
+    }
+
+    /// utility function to validate verification tokens
+    pub async fn validate_verification_tokens(
+        &self,
+        msg: VerifyCaptchaResult,
+    ) -> CaptchaResult<bool> {
+        self.cache.send(msg).await.unwrap()
+    }
+}
+
+#[cfg(test)]
+mod tests {
+
+    use pow_sha256::ConfigBuilder;
+
+    use super::System;
+    use super::*;
+    use crate::cache::HashCache;
+    use crate::master::*;
+    use crate::mcaptcha::tests::*;
+
+    const MCAPTCHA_NAME: &str = "batsense.net";
+
+    async fn boostrap_system(gc: u64) -> System<HashCache> {
+        let master = Master::new(gc).start();
+        let mcaptcha = get_counter().start();
+        let pow = get_config();
+
+        let cache = HashCache::default().start();
+        let msg = AddSiteBuilder::default()
+            .id(MCAPTCHA_NAME.into())
+            .addr(mcaptcha.clone())
+            .build()
+            .unwrap();
+
+        master.send(msg).await.unwrap();
+
+        SystemBuilder::default()
+            .master(master)
+            .cache(cache)
+            .pow(pow)
+            .build()
+            .unwrap()
+    }
+
+    fn get_config() -> Config {
+        ConfigBuilder::default()
+            .salt("myrandomsaltisnotlongenoug".into())
+            .build()
+            .unwrap()
+    }
+
+    #[actix_rt::test]
+    async fn get_pow_works() {
+        let actors = boostrap_system(10).await;
+        let pow = actors.get_pow(MCAPTCHA_NAME.into()).await.unwrap();
+        assert_eq!(pow.difficulty_factor, LEVEL_1.0);
+    }
+
+    #[actix_rt::test]
+    async fn verify_pow_works() {
+        // start system
+        let actors = boostrap_system(10).await;
+        // get work
+        let work_req = actors.get_pow(MCAPTCHA_NAME.into()).await.unwrap();
+        // get config
+        let config = get_config();
+
+        // generate proof
+        let work = config
+            .prove_work(&work_req.string, work_req.difficulty_factor)
+            .unwrap();
+        // generate proof payload
+        let mut payload = Work {
+            string: work_req.string,
+            result: work.result,
+            nonce: work.nonce,
+            key: MCAPTCHA_NAME.into(),
+        };
+
+        // verifiy proof
+        let res = actors.verify_pow(payload.clone()).await;
+        assert!(res.is_ok());
+
+        // verify validation token
+        let mut verifi_msg = VerifyCaptchaResult {
+            token: res.unwrap(),
+            key: MCAPTCHA_NAME.into(),
+        };
+        assert!(actors
+            .validate_verification_tokens(verifi_msg.clone())
+            .await
+            .unwrap());
+
+        // verify wrong validation token
+        verifi_msg.token = MCAPTCHA_NAME.into();
+        assert!(!actors
+            .validate_verification_tokens(verifi_msg)
+            .await
+            .unwrap());
+
+        payload.string = "wrongstring".into();
+        let res = actors.verify_pow(payload.clone()).await;
+        assert_eq!(res, Err(CaptchaError::StringNotFound));
+
+        let insufficient_work_req = actors.get_pow(MCAPTCHA_NAME.into()).await.unwrap();
+        let insufficient_work = config.prove_work(&insufficient_work_req.string, 1).unwrap();
+        let insufficient_work_payload = Work {
+            string: insufficient_work_req.string,
+            result: insufficient_work.result,
+            nonce: insufficient_work.nonce,
+            key: MCAPTCHA_NAME.into(),
+        };
+        let res = actors.verify_pow(insufficient_work_payload.clone()).await;
+        assert_eq!(res, Err(CaptchaError::InsuffiencientDifficulty));
+
+        let sitekeyfail_config = actors.get_pow(MCAPTCHA_NAME.into()).await.unwrap();
+        let sitekeyfail_work = config
+            .prove_work(
+                &sitekeyfail_config.string,
+                sitekeyfail_config.difficulty_factor,
+            )
+            .unwrap();
+
+        let sitekeyfail = Work {
+            string: sitekeyfail_config.string,
+            result: sitekeyfail_work.result,
+            nonce: sitekeyfail_work.nonce,
+            key: "example.com".into(),
+        };
+
+        let res = actors.verify_pow(sitekeyfail).await;
+        assert_eq!(res, Err(CaptchaError::MCaptchaKeyValidationFail));
+    }
+}
+
+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/src/m_captcha/utils.rs.html b/api-docs/m_captcha/0.1.3/src/m_captcha/utils.rs.html new file mode 100644 index 0000000..3fabe73 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/src/m_captcha/utils.rs.html @@ -0,0 +1,73 @@ +utils.rs - source + +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+
+/*
+ * mCaptcha - A proof of work based DoS protection system
+ * Copyright © 2021 Aravinth Manivannan <realravinth@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 <http://www.gnu.org/licenses/>.
+ */
+
+// utility function to get a randomly generated string
+// of size len
+pub fn get_random(len: usize) -> String {
+    use std::iter;
+
+    use rand::{distributions::Alphanumeric, rngs::ThreadRng, thread_rng, Rng};
+
+    let mut rng: ThreadRng = thread_rng();
+
+    iter::repeat(())
+        .map(|()| rng.sample(Alphanumeric))
+        .map(char::from)
+        .take(len)
+        .collect::<String>()
+}
+
+
+ \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/src/unicode_xid/lib.rs.html b/api-docs/m_captcha/0.1.3/src/unicode_xid/lib.rs.html new file mode 100644 index 0000000..4f28090 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/src/unicode_xid/lib.rs.html @@ -0,0 +1,172 @@ +lib.rs - source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! Determine if a `char` is a valid identifier for a parser and/or lexer according to
+//! [Unicode Standard Annex #31](http://www.unicode.org/reports/tr31/) rules.
+//!
+//! ```rust
+//! extern crate unicode_xid;
+//!
+//! use unicode_xid::UnicodeXID;
+//!
+//! fn main() {
+//!     let ch = 'a';
+//!     println!("Is {} a valid start of an identifier? {}", ch, UnicodeXID::is_xid_start(ch));
+//! }
+//! ```
+//!
+//! # features
+//!
+//! unicode-xid supports a `no_std` feature. This eliminates dependence
+//! on std, and instead uses equivalent functions from core.
+//!
+
+#![forbid(unsafe_code)]
+#![deny(missing_docs)]
+#![doc(
+    html_logo_url = "https://unicode-rs.github.io/unicode-rs_sm.png",
+    html_favicon_url = "https://unicode-rs.github.io/unicode-rs_sm.png"
+)]
+#![no_std]
+#![cfg_attr(feature = "bench", feature(test, unicode_internals))]
+
+#[cfg(test)]
+#[macro_use]
+extern crate std;
+
+#[cfg(feature = "bench")]
+extern crate test;
+
+use tables::derived_property;
+pub use tables::UNICODE_VERSION;
+
+mod tables;
+
+#[cfg(test)]
+mod tests;
+
+/// Methods for determining if a character is a valid identifier character.
+pub trait UnicodeXID {
+    /// Returns whether the specified character satisfies the 'XID_Start'
+    /// Unicode property.
+    ///
+    /// 'XID_Start' is a Unicode Derived Property specified in
+    /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications),
+    /// mostly similar to ID_Start but modified for closure under NFKx.
+    fn is_xid_start(self) -> bool;
+
+    /// Returns whether the specified `char` satisfies the 'XID_Continue'
+    /// Unicode property.
+    ///
+    /// 'XID_Continue' is a Unicode Derived Property specified in
+    /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications),
+    /// mostly similar to 'ID_Continue' but modified for closure under NFKx.
+    fn is_xid_continue(self) -> bool;
+}
+
+impl UnicodeXID for char {
+    #[inline]
+    fn is_xid_start(self) -> bool {
+        derived_property::XID_Start(self)
+    }
+
+    #[inline]
+    fn is_xid_continue(self) -> bool {
+        derived_property::XID_Continue(self)
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/src/unicode_xid/tables.rs.html b/api-docs/m_captcha/0.1.3/src/unicode_xid/tables.rs.html new file mode 100644 index 0000000..44ff13d --- /dev/null +++ b/api-docs/m_captcha/0.1.3/src/unicode_xid/tables.rs.html @@ -0,0 +1,2842 @@ +tables.rs - source
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// NOTE: The following code was generated by "scripts/unicode.py", do not edit directly
+
+#![allow(missing_docs, non_upper_case_globals, non_snake_case)]
+
+/// The version of [Unicode](http://www.unicode.org/)
+/// that this version of unicode-xid is based on.
+pub const UNICODE_VERSION: (u64, u64, u64) = (13, 0, 0);
+
+fn bsearch_range_table(c: char, r: &[(char, char)]) -> bool {
+    use core::cmp::Ordering::{Equal, Greater, Less};
+
+    r.binary_search_by(|&(lo, hi)| {
+        // Because ASCII ranges are at the start of the tables, a search for an
+        // ASCII char will involve more `Greater` results (i.e. the `(lo,hi)`
+        // table entry is greater than `c`) than `Less` results. And given that
+        // ASCII chars are so common, it makes sense to favor them. Therefore,
+        // the `Greater` case is tested for before the `Less` case.
+        if lo > c {
+            Greater
+        } else if hi < c {
+            Less
+        } else {
+            Equal
+        }
+    })
+    .is_ok()
+}
+
+pub mod derived_property {
+    pub const XID_Continue_table: &[(char, char)] = &[
+        ('\u{30}', '\u{39}'),
+        ('\u{41}', '\u{5a}'),
+        ('\u{5f}', '\u{5f}'),
+        ('\u{61}', '\u{7a}'),
+        ('\u{aa}', '\u{aa}'),
+        ('\u{b5}', '\u{b5}'),
+        ('\u{b7}', '\u{b7}'),
+        ('\u{ba}', '\u{ba}'),
+        ('\u{c0}', '\u{d6}'),
+        ('\u{d8}', '\u{f6}'),
+        ('\u{f8}', '\u{2c1}'),
+        ('\u{2c6}', '\u{2d1}'),
+        ('\u{2e0}', '\u{2e4}'),
+        ('\u{2ec}', '\u{2ec}'),
+        ('\u{2ee}', '\u{2ee}'),
+        ('\u{300}', '\u{374}'),
+        ('\u{376}', '\u{377}'),
+        ('\u{37b}', '\u{37d}'),
+        ('\u{37f}', '\u{37f}'),
+        ('\u{386}', '\u{38a}'),
+        ('\u{38c}', '\u{38c}'),
+        ('\u{38e}', '\u{3a1}'),
+        ('\u{3a3}', '\u{3f5}'),
+        ('\u{3f7}', '\u{481}'),
+        ('\u{483}', '\u{487}'),
+        ('\u{48a}', '\u{52f}'),
+        ('\u{531}', '\u{556}'),
+        ('\u{559}', '\u{559}'),
+        ('\u{560}', '\u{588}'),
+        ('\u{591}', '\u{5bd}'),
+        ('\u{5bf}', '\u{5bf}'),
+        ('\u{5c1}', '\u{5c2}'),
+        ('\u{5c4}', '\u{5c5}'),
+        ('\u{5c7}', '\u{5c7}'),
+        ('\u{5d0}', '\u{5ea}'),
+        ('\u{5ef}', '\u{5f2}'),
+        ('\u{610}', '\u{61a}'),
+        ('\u{620}', '\u{669}'),
+        ('\u{66e}', '\u{6d3}'),
+        ('\u{6d5}', '\u{6dc}'),
+        ('\u{6df}', '\u{6e8}'),
+        ('\u{6ea}', '\u{6fc}'),
+        ('\u{6ff}', '\u{6ff}'),
+        ('\u{710}', '\u{74a}'),
+        ('\u{74d}', '\u{7b1}'),
+        ('\u{7c0}', '\u{7f5}'),
+        ('\u{7fa}', '\u{7fa}'),
+        ('\u{7fd}', '\u{7fd}'),
+        ('\u{800}', '\u{82d}'),
+        ('\u{840}', '\u{85b}'),
+        ('\u{860}', '\u{86a}'),
+        ('\u{8a0}', '\u{8b4}'),
+        ('\u{8b6}', '\u{8c7}'),
+        ('\u{8d3}', '\u{8e1}'),
+        ('\u{8e3}', '\u{963}'),
+        ('\u{966}', '\u{96f}'),
+        ('\u{971}', '\u{983}'),
+        ('\u{985}', '\u{98c}'),
+        ('\u{98f}', '\u{990}'),
+        ('\u{993}', '\u{9a8}'),
+        ('\u{9aa}', '\u{9b0}'),
+        ('\u{9b2}', '\u{9b2}'),
+        ('\u{9b6}', '\u{9b9}'),
+        ('\u{9bc}', '\u{9c4}'),
+        ('\u{9c7}', '\u{9c8}'),
+        ('\u{9cb}', '\u{9ce}'),
+        ('\u{9d7}', '\u{9d7}'),
+        ('\u{9dc}', '\u{9dd}'),
+        ('\u{9df}', '\u{9e3}'),
+        ('\u{9e6}', '\u{9f1}'),
+        ('\u{9fc}', '\u{9fc}'),
+        ('\u{9fe}', '\u{9fe}'),
+        ('\u{a01}', '\u{a03}'),
+        ('\u{a05}', '\u{a0a}'),
+        ('\u{a0f}', '\u{a10}'),
+        ('\u{a13}', '\u{a28}'),
+        ('\u{a2a}', '\u{a30}'),
+        ('\u{a32}', '\u{a33}'),
+        ('\u{a35}', '\u{a36}'),
+        ('\u{a38}', '\u{a39}'),
+        ('\u{a3c}', '\u{a3c}'),
+        ('\u{a3e}', '\u{a42}'),
+        ('\u{a47}', '\u{a48}'),
+        ('\u{a4b}', '\u{a4d}'),
+        ('\u{a51}', '\u{a51}'),
+        ('\u{a59}', '\u{a5c}'),
+        ('\u{a5e}', '\u{a5e}'),
+        ('\u{a66}', '\u{a75}'),
+        ('\u{a81}', '\u{a83}'),
+        ('\u{a85}', '\u{a8d}'),
+        ('\u{a8f}', '\u{a91}'),
+        ('\u{a93}', '\u{aa8}'),
+        ('\u{aaa}', '\u{ab0}'),
+        ('\u{ab2}', '\u{ab3}'),
+        ('\u{ab5}', '\u{ab9}'),
+        ('\u{abc}', '\u{ac5}'),
+        ('\u{ac7}', '\u{ac9}'),
+        ('\u{acb}', '\u{acd}'),
+        ('\u{ad0}', '\u{ad0}'),
+        ('\u{ae0}', '\u{ae3}'),
+        ('\u{ae6}', '\u{aef}'),
+        ('\u{af9}', '\u{aff}'),
+        ('\u{b01}', '\u{b03}'),
+        ('\u{b05}', '\u{b0c}'),
+        ('\u{b0f}', '\u{b10}'),
+        ('\u{b13}', '\u{b28}'),
+        ('\u{b2a}', '\u{b30}'),
+        ('\u{b32}', '\u{b33}'),
+        ('\u{b35}', '\u{b39}'),
+        ('\u{b3c}', '\u{b44}'),
+        ('\u{b47}', '\u{b48}'),
+        ('\u{b4b}', '\u{b4d}'),
+        ('\u{b55}', '\u{b57}'),
+        ('\u{b5c}', '\u{b5d}'),
+        ('\u{b5f}', '\u{b63}'),
+        ('\u{b66}', '\u{b6f}'),
+        ('\u{b71}', '\u{b71}'),
+        ('\u{b82}', '\u{b83}'),
+        ('\u{b85}', '\u{b8a}'),
+        ('\u{b8e}', '\u{b90}'),
+        ('\u{b92}', '\u{b95}'),
+        ('\u{b99}', '\u{b9a}'),
+        ('\u{b9c}', '\u{b9c}'),
+        ('\u{b9e}', '\u{b9f}'),
+        ('\u{ba3}', '\u{ba4}'),
+        ('\u{ba8}', '\u{baa}'),
+        ('\u{bae}', '\u{bb9}'),
+        ('\u{bbe}', '\u{bc2}'),
+        ('\u{bc6}', '\u{bc8}'),
+        ('\u{bca}', '\u{bcd}'),
+        ('\u{bd0}', '\u{bd0}'),
+        ('\u{bd7}', '\u{bd7}'),
+        ('\u{be6}', '\u{bef}'),
+        ('\u{c00}', '\u{c0c}'),
+        ('\u{c0e}', '\u{c10}'),
+        ('\u{c12}', '\u{c28}'),
+        ('\u{c2a}', '\u{c39}'),
+        ('\u{c3d}', '\u{c44}'),
+        ('\u{c46}', '\u{c48}'),
+        ('\u{c4a}', '\u{c4d}'),
+        ('\u{c55}', '\u{c56}'),
+        ('\u{c58}', '\u{c5a}'),
+        ('\u{c60}', '\u{c63}'),
+        ('\u{c66}', '\u{c6f}'),
+        ('\u{c80}', '\u{c83}'),
+        ('\u{c85}', '\u{c8c}'),
+        ('\u{c8e}', '\u{c90}'),
+        ('\u{c92}', '\u{ca8}'),
+        ('\u{caa}', '\u{cb3}'),
+        ('\u{cb5}', '\u{cb9}'),
+        ('\u{cbc}', '\u{cc4}'),
+        ('\u{cc6}', '\u{cc8}'),
+        ('\u{cca}', '\u{ccd}'),
+        ('\u{cd5}', '\u{cd6}'),
+        ('\u{cde}', '\u{cde}'),
+        ('\u{ce0}', '\u{ce3}'),
+        ('\u{ce6}', '\u{cef}'),
+        ('\u{cf1}', '\u{cf2}'),
+        ('\u{d00}', '\u{d0c}'),
+        ('\u{d0e}', '\u{d10}'),
+        ('\u{d12}', '\u{d44}'),
+        ('\u{d46}', '\u{d48}'),
+        ('\u{d4a}', '\u{d4e}'),
+        ('\u{d54}', '\u{d57}'),
+        ('\u{d5f}', '\u{d63}'),
+        ('\u{d66}', '\u{d6f}'),
+        ('\u{d7a}', '\u{d7f}'),
+        ('\u{d81}', '\u{d83}'),
+        ('\u{d85}', '\u{d96}'),
+        ('\u{d9a}', '\u{db1}'),
+        ('\u{db3}', '\u{dbb}'),
+        ('\u{dbd}', '\u{dbd}'),
+        ('\u{dc0}', '\u{dc6}'),
+        ('\u{dca}', '\u{dca}'),
+        ('\u{dcf}', '\u{dd4}'),
+        ('\u{dd6}', '\u{dd6}'),
+        ('\u{dd8}', '\u{ddf}'),
+        ('\u{de6}', '\u{def}'),
+        ('\u{df2}', '\u{df3}'),
+        ('\u{e01}', '\u{e3a}'),
+        ('\u{e40}', '\u{e4e}'),
+        ('\u{e50}', '\u{e59}'),
+        ('\u{e81}', '\u{e82}'),
+        ('\u{e84}', '\u{e84}'),
+        ('\u{e86}', '\u{e8a}'),
+        ('\u{e8c}', '\u{ea3}'),
+        ('\u{ea5}', '\u{ea5}'),
+        ('\u{ea7}', '\u{ebd}'),
+        ('\u{ec0}', '\u{ec4}'),
+        ('\u{ec6}', '\u{ec6}'),
+        ('\u{ec8}', '\u{ecd}'),
+        ('\u{ed0}', '\u{ed9}'),
+        ('\u{edc}', '\u{edf}'),
+        ('\u{f00}', '\u{f00}'),
+        ('\u{f18}', '\u{f19}'),
+        ('\u{f20}', '\u{f29}'),
+        ('\u{f35}', '\u{f35}'),
+        ('\u{f37}', '\u{f37}'),
+        ('\u{f39}', '\u{f39}'),
+        ('\u{f3e}', '\u{f47}'),
+        ('\u{f49}', '\u{f6c}'),
+        ('\u{f71}', '\u{f84}'),
+        ('\u{f86}', '\u{f97}'),
+        ('\u{f99}', '\u{fbc}'),
+        ('\u{fc6}', '\u{fc6}'),
+        ('\u{1000}', '\u{1049}'),
+        ('\u{1050}', '\u{109d}'),
+        ('\u{10a0}', '\u{10c5}'),
+        ('\u{10c7}', '\u{10c7}'),
+        ('\u{10cd}', '\u{10cd}'),
+        ('\u{10d0}', '\u{10fa}'),
+        ('\u{10fc}', '\u{1248}'),
+        ('\u{124a}', '\u{124d}'),
+        ('\u{1250}', '\u{1256}'),
+        ('\u{1258}', '\u{1258}'),
+        ('\u{125a}', '\u{125d}'),
+        ('\u{1260}', '\u{1288}'),
+        ('\u{128a}', '\u{128d}'),
+        ('\u{1290}', '\u{12b0}'),
+        ('\u{12b2}', '\u{12b5}'),
+        ('\u{12b8}', '\u{12be}'),
+        ('\u{12c0}', '\u{12c0}'),
+        ('\u{12c2}', '\u{12c5}'),
+        ('\u{12c8}', '\u{12d6}'),
+        ('\u{12d8}', '\u{1310}'),
+        ('\u{1312}', '\u{1315}'),
+        ('\u{1318}', '\u{135a}'),
+        ('\u{135d}', '\u{135f}'),
+        ('\u{1369}', '\u{1371}'),
+        ('\u{1380}', '\u{138f}'),
+        ('\u{13a0}', '\u{13f5}'),
+        ('\u{13f8}', '\u{13fd}'),
+        ('\u{1401}', '\u{166c}'),
+        ('\u{166f}', '\u{167f}'),
+        ('\u{1681}', '\u{169a}'),
+        ('\u{16a0}', '\u{16ea}'),
+        ('\u{16ee}', '\u{16f8}'),
+        ('\u{1700}', '\u{170c}'),
+        ('\u{170e}', '\u{1714}'),
+        ('\u{1720}', '\u{1734}'),
+        ('\u{1740}', '\u{1753}'),
+        ('\u{1760}', '\u{176c}'),
+        ('\u{176e}', '\u{1770}'),
+        ('\u{1772}', '\u{1773}'),
+        ('\u{1780}', '\u{17d3}'),
+        ('\u{17d7}', '\u{17d7}'),
+        ('\u{17dc}', '\u{17dd}'),
+        ('\u{17e0}', '\u{17e9}'),
+        ('\u{180b}', '\u{180d}'),
+        ('\u{1810}', '\u{1819}'),
+        ('\u{1820}', '\u{1878}'),
+        ('\u{1880}', '\u{18aa}'),
+        ('\u{18b0}', '\u{18f5}'),
+        ('\u{1900}', '\u{191e}'),
+        ('\u{1920}', '\u{192b}'),
+        ('\u{1930}', '\u{193b}'),
+        ('\u{1946}', '\u{196d}'),
+        ('\u{1970}', '\u{1974}'),
+        ('\u{1980}', '\u{19ab}'),
+        ('\u{19b0}', '\u{19c9}'),
+        ('\u{19d0}', '\u{19da}'),
+        ('\u{1a00}', '\u{1a1b}'),
+        ('\u{1a20}', '\u{1a5e}'),
+        ('\u{1a60}', '\u{1a7c}'),
+        ('\u{1a7f}', '\u{1a89}'),
+        ('\u{1a90}', '\u{1a99}'),
+        ('\u{1aa7}', '\u{1aa7}'),
+        ('\u{1ab0}', '\u{1abd}'),
+        ('\u{1abf}', '\u{1ac0}'),
+        ('\u{1b00}', '\u{1b4b}'),
+        ('\u{1b50}', '\u{1b59}'),
+        ('\u{1b6b}', '\u{1b73}'),
+        ('\u{1b80}', '\u{1bf3}'),
+        ('\u{1c00}', '\u{1c37}'),
+        ('\u{1c40}', '\u{1c49}'),
+        ('\u{1c4d}', '\u{1c7d}'),
+        ('\u{1c80}', '\u{1c88}'),
+        ('\u{1c90}', '\u{1cba}'),
+        ('\u{1cbd}', '\u{1cbf}'),
+        ('\u{1cd0}', '\u{1cd2}'),
+        ('\u{1cd4}', '\u{1cfa}'),
+        ('\u{1d00}', '\u{1df9}'),
+        ('\u{1dfb}', '\u{1f15}'),
+        ('\u{1f18}', '\u{1f1d}'),
+        ('\u{1f20}', '\u{1f45}'),
+        ('\u{1f48}', '\u{1f4d}'),
+        ('\u{1f50}', '\u{1f57}'),
+        ('\u{1f59}', '\u{1f59}'),
+        ('\u{1f5b}', '\u{1f5b}'),
+        ('\u{1f5d}', '\u{1f5d}'),
+        ('\u{1f5f}', '\u{1f7d}'),
+        ('\u{1f80}', '\u{1fb4}'),
+        ('\u{1fb6}', '\u{1fbc}'),
+        ('\u{1fbe}', '\u{1fbe}'),
+        ('\u{1fc2}', '\u{1fc4}'),
+        ('\u{1fc6}', '\u{1fcc}'),
+        ('\u{1fd0}', '\u{1fd3}'),
+        ('\u{1fd6}', '\u{1fdb}'),
+        ('\u{1fe0}', '\u{1fec}'),
+        ('\u{1ff2}', '\u{1ff4}'),
+        ('\u{1ff6}', '\u{1ffc}'),
+        ('\u{203f}', '\u{2040}'),
+        ('\u{2054}', '\u{2054}'),
+        ('\u{2071}', '\u{2071}'),
+        ('\u{207f}', '\u{207f}'),
+        ('\u{2090}', '\u{209c}'),
+        ('\u{20d0}', '\u{20dc}'),
+        ('\u{20e1}', '\u{20e1}'),
+        ('\u{20e5}', '\u{20f0}'),
+        ('\u{2102}', '\u{2102}'),
+        ('\u{2107}', '\u{2107}'),
+        ('\u{210a}', '\u{2113}'),
+        ('\u{2115}', '\u{2115}'),
+        ('\u{2118}', '\u{211d}'),
+        ('\u{2124}', '\u{2124}'),
+        ('\u{2126}', '\u{2126}'),
+        ('\u{2128}', '\u{2128}'),
+        ('\u{212a}', '\u{2139}'),
+        ('\u{213c}', '\u{213f}'),
+        ('\u{2145}', '\u{2149}'),
+        ('\u{214e}', '\u{214e}'),
+        ('\u{2160}', '\u{2188}'),
+        ('\u{2c00}', '\u{2c2e}'),
+        ('\u{2c30}', '\u{2c5e}'),
+        ('\u{2c60}', '\u{2ce4}'),
+        ('\u{2ceb}', '\u{2cf3}'),
+        ('\u{2d00}', '\u{2d25}'),
+        ('\u{2d27}', '\u{2d27}'),
+        ('\u{2d2d}', '\u{2d2d}'),
+        ('\u{2d30}', '\u{2d67}'),
+        ('\u{2d6f}', '\u{2d6f}'),
+        ('\u{2d7f}', '\u{2d96}'),
+        ('\u{2da0}', '\u{2da6}'),
+        ('\u{2da8}', '\u{2dae}'),
+        ('\u{2db0}', '\u{2db6}'),
+        ('\u{2db8}', '\u{2dbe}'),
+        ('\u{2dc0}', '\u{2dc6}'),
+        ('\u{2dc8}', '\u{2dce}'),
+        ('\u{2dd0}', '\u{2dd6}'),
+        ('\u{2dd8}', '\u{2dde}'),
+        ('\u{2de0}', '\u{2dff}'),
+        ('\u{3005}', '\u{3007}'),
+        ('\u{3021}', '\u{302f}'),
+        ('\u{3031}', '\u{3035}'),
+        ('\u{3038}', '\u{303c}'),
+        ('\u{3041}', '\u{3096}'),
+        ('\u{3099}', '\u{309a}'),
+        ('\u{309d}', '\u{309f}'),
+        ('\u{30a1}', '\u{30fa}'),
+        ('\u{30fc}', '\u{30ff}'),
+        ('\u{3105}', '\u{312f}'),
+        ('\u{3131}', '\u{318e}'),
+        ('\u{31a0}', '\u{31bf}'),
+        ('\u{31f0}', '\u{31ff}'),
+        ('\u{3400}', '\u{4dbf}'),
+        ('\u{4e00}', '\u{9ffc}'),
+        ('\u{a000}', '\u{a48c}'),
+        ('\u{a4d0}', '\u{a4fd}'),
+        ('\u{a500}', '\u{a60c}'),
+        ('\u{a610}', '\u{a62b}'),
+        ('\u{a640}', '\u{a66f}'),
+        ('\u{a674}', '\u{a67d}'),
+        ('\u{a67f}', '\u{a6f1}'),
+        ('\u{a717}', '\u{a71f}'),
+        ('\u{a722}', '\u{a788}'),
+        ('\u{a78b}', '\u{a7bf}'),
+        ('\u{a7c2}', '\u{a7ca}'),
+        ('\u{a7f5}', '\u{a827}'),
+        ('\u{a82c}', '\u{a82c}'),
+        ('\u{a840}', '\u{a873}'),
+        ('\u{a880}', '\u{a8c5}'),
+        ('\u{a8d0}', '\u{a8d9}'),
+        ('\u{a8e0}', '\u{a8f7}'),
+        ('\u{a8fb}', '\u{a8fb}'),
+        ('\u{a8fd}', '\u{a92d}'),
+        ('\u{a930}', '\u{a953}'),
+        ('\u{a960}', '\u{a97c}'),
+        ('\u{a980}', '\u{a9c0}'),
+        ('\u{a9cf}', '\u{a9d9}'),
+        ('\u{a9e0}', '\u{a9fe}'),
+        ('\u{aa00}', '\u{aa36}'),
+        ('\u{aa40}', '\u{aa4d}'),
+        ('\u{aa50}', '\u{aa59}'),
+        ('\u{aa60}', '\u{aa76}'),
+        ('\u{aa7a}', '\u{aac2}'),
+        ('\u{aadb}', '\u{aadd}'),
+        ('\u{aae0}', '\u{aaef}'),
+        ('\u{aaf2}', '\u{aaf6}'),
+        ('\u{ab01}', '\u{ab06}'),
+        ('\u{ab09}', '\u{ab0e}'),
+        ('\u{ab11}', '\u{ab16}'),
+        ('\u{ab20}', '\u{ab26}'),
+        ('\u{ab28}', '\u{ab2e}'),
+        ('\u{ab30}', '\u{ab5a}'),
+        ('\u{ab5c}', '\u{ab69}'),
+        ('\u{ab70}', '\u{abea}'),
+        ('\u{abec}', '\u{abed}'),
+        ('\u{abf0}', '\u{abf9}'),
+        ('\u{ac00}', '\u{d7a3}'),
+        ('\u{d7b0}', '\u{d7c6}'),
+        ('\u{d7cb}', '\u{d7fb}'),
+        ('\u{f900}', '\u{fa6d}'),
+        ('\u{fa70}', '\u{fad9}'),
+        ('\u{fb00}', '\u{fb06}'),
+        ('\u{fb13}', '\u{fb17}'),
+        ('\u{fb1d}', '\u{fb28}'),
+        ('\u{fb2a}', '\u{fb36}'),
+        ('\u{fb38}', '\u{fb3c}'),
+        ('\u{fb3e}', '\u{fb3e}'),
+        ('\u{fb40}', '\u{fb41}'),
+        ('\u{fb43}', '\u{fb44}'),
+        ('\u{fb46}', '\u{fbb1}'),
+        ('\u{fbd3}', '\u{fc5d}'),
+        ('\u{fc64}', '\u{fd3d}'),
+        ('\u{fd50}', '\u{fd8f}'),
+        ('\u{fd92}', '\u{fdc7}'),
+        ('\u{fdf0}', '\u{fdf9}'),
+        ('\u{fe00}', '\u{fe0f}'),
+        ('\u{fe20}', '\u{fe2f}'),
+        ('\u{fe33}', '\u{fe34}'),
+        ('\u{fe4d}', '\u{fe4f}'),
+        ('\u{fe71}', '\u{fe71}'),
+        ('\u{fe73}', '\u{fe73}'),
+        ('\u{fe77}', '\u{fe77}'),
+        ('\u{fe79}', '\u{fe79}'),
+        ('\u{fe7b}', '\u{fe7b}'),
+        ('\u{fe7d}', '\u{fe7d}'),
+        ('\u{fe7f}', '\u{fefc}'),
+        ('\u{ff10}', '\u{ff19}'),
+        ('\u{ff21}', '\u{ff3a}'),
+        ('\u{ff3f}', '\u{ff3f}'),
+        ('\u{ff41}', '\u{ff5a}'),
+        ('\u{ff66}', '\u{ffbe}'),
+        ('\u{ffc2}', '\u{ffc7}'),
+        ('\u{ffca}', '\u{ffcf}'),
+        ('\u{ffd2}', '\u{ffd7}'),
+        ('\u{ffda}', '\u{ffdc}'),
+        ('\u{10000}', '\u{1000b}'),
+        ('\u{1000d}', '\u{10026}'),
+        ('\u{10028}', '\u{1003a}'),
+        ('\u{1003c}', '\u{1003d}'),
+        ('\u{1003f}', '\u{1004d}'),
+        ('\u{10050}', '\u{1005d}'),
+        ('\u{10080}', '\u{100fa}'),
+        ('\u{10140}', '\u{10174}'),
+        ('\u{101fd}', '\u{101fd}'),
+        ('\u{10280}', '\u{1029c}'),
+        ('\u{102a0}', '\u{102d0}'),
+        ('\u{102e0}', '\u{102e0}'),
+        ('\u{10300}', '\u{1031f}'),
+        ('\u{1032d}', '\u{1034a}'),
+        ('\u{10350}', '\u{1037a}'),
+        ('\u{10380}', '\u{1039d}'),
+        ('\u{103a0}', '\u{103c3}'),
+        ('\u{103c8}', '\u{103cf}'),
+        ('\u{103d1}', '\u{103d5}'),
+        ('\u{10400}', '\u{1049d}'),
+        ('\u{104a0}', '\u{104a9}'),
+        ('\u{104b0}', '\u{104d3}'),
+        ('\u{104d8}', '\u{104fb}'),
+        ('\u{10500}', '\u{10527}'),
+        ('\u{10530}', '\u{10563}'),
+        ('\u{10600}', '\u{10736}'),
+        ('\u{10740}', '\u{10755}'),
+        ('\u{10760}', '\u{10767}'),
+        ('\u{10800}', '\u{10805}'),
+        ('\u{10808}', '\u{10808}'),
+        ('\u{1080a}', '\u{10835}'),
+        ('\u{10837}', '\u{10838}'),
+        ('\u{1083c}', '\u{1083c}'),
+        ('\u{1083f}', '\u{10855}'),
+        ('\u{10860}', '\u{10876}'),
+        ('\u{10880}', '\u{1089e}'),
+        ('\u{108e0}', '\u{108f2}'),
+        ('\u{108f4}', '\u{108f5}'),
+        ('\u{10900}', '\u{10915}'),
+        ('\u{10920}', '\u{10939}'),
+        ('\u{10980}', '\u{109b7}'),
+        ('\u{109be}', '\u{109bf}'),
+        ('\u{10a00}', '\u{10a03}'),
+        ('\u{10a05}', '\u{10a06}'),
+        ('\u{10a0c}', '\u{10a13}'),
+        ('\u{10a15}', '\u{10a17}'),
+        ('\u{10a19}', '\u{10a35}'),
+        ('\u{10a38}', '\u{10a3a}'),
+        ('\u{10a3f}', '\u{10a3f}'),
+        ('\u{10a60}', '\u{10a7c}'),
+        ('\u{10a80}', '\u{10a9c}'),
+        ('\u{10ac0}', '\u{10ac7}'),
+        ('\u{10ac9}', '\u{10ae6}'),
+        ('\u{10b00}', '\u{10b35}'),
+        ('\u{10b40}', '\u{10b55}'),
+        ('\u{10b60}', '\u{10b72}'),
+        ('\u{10b80}', '\u{10b91}'),
+        ('\u{10c00}', '\u{10c48}'),
+        ('\u{10c80}', '\u{10cb2}'),
+        ('\u{10cc0}', '\u{10cf2}'),
+        ('\u{10d00}', '\u{10d27}'),
+        ('\u{10d30}', '\u{10d39}'),
+        ('\u{10e80}', '\u{10ea9}'),
+        ('\u{10eab}', '\u{10eac}'),
+        ('\u{10eb0}', '\u{10eb1}'),
+        ('\u{10f00}', '\u{10f1c}'),
+        ('\u{10f27}', '\u{10f27}'),
+        ('\u{10f30}', '\u{10f50}'),
+        ('\u{10fb0}', '\u{10fc4}'),
+        ('\u{10fe0}', '\u{10ff6}'),
+        ('\u{11000}', '\u{11046}'),
+        ('\u{11066}', '\u{1106f}'),
+        ('\u{1107f}', '\u{110ba}'),
+        ('\u{110d0}', '\u{110e8}'),
+        ('\u{110f0}', '\u{110f9}'),
+        ('\u{11100}', '\u{11134}'),
+        ('\u{11136}', '\u{1113f}'),
+        ('\u{11144}', '\u{11147}'),
+        ('\u{11150}', '\u{11173}'),
+        ('\u{11176}', '\u{11176}'),
+        ('\u{11180}', '\u{111c4}'),
+        ('\u{111c9}', '\u{111cc}'),
+        ('\u{111ce}', '\u{111da}'),
+        ('\u{111dc}', '\u{111dc}'),
+        ('\u{11200}', '\u{11211}'),
+        ('\u{11213}', '\u{11237}'),
+        ('\u{1123e}', '\u{1123e}'),
+        ('\u{11280}', '\u{11286}'),
+        ('\u{11288}', '\u{11288}'),
+        ('\u{1128a}', '\u{1128d}'),
+        ('\u{1128f}', '\u{1129d}'),
+        ('\u{1129f}', '\u{112a8}'),
+        ('\u{112b0}', '\u{112ea}'),
+        ('\u{112f0}', '\u{112f9}'),
+        ('\u{11300}', '\u{11303}'),
+        ('\u{11305}', '\u{1130c}'),
+        ('\u{1130f}', '\u{11310}'),
+        ('\u{11313}', '\u{11328}'),
+        ('\u{1132a}', '\u{11330}'),
+        ('\u{11332}', '\u{11333}'),
+        ('\u{11335}', '\u{11339}'),
+        ('\u{1133b}', '\u{11344}'),
+        ('\u{11347}', '\u{11348}'),
+        ('\u{1134b}', '\u{1134d}'),
+        ('\u{11350}', '\u{11350}'),
+        ('\u{11357}', '\u{11357}'),
+        ('\u{1135d}', '\u{11363}'),
+        ('\u{11366}', '\u{1136c}'),
+        ('\u{11370}', '\u{11374}'),
+        ('\u{11400}', '\u{1144a}'),
+        ('\u{11450}', '\u{11459}'),
+        ('\u{1145e}', '\u{11461}'),
+        ('\u{11480}', '\u{114c5}'),
+        ('\u{114c7}', '\u{114c7}'),
+        ('\u{114d0}', '\u{114d9}'),
+        ('\u{11580}', '\u{115b5}'),
+        ('\u{115b8}', '\u{115c0}'),
+        ('\u{115d8}', '\u{115dd}'),
+        ('\u{11600}', '\u{11640}'),
+        ('\u{11644}', '\u{11644}'),
+        ('\u{11650}', '\u{11659}'),
+        ('\u{11680}', '\u{116b8}'),
+        ('\u{116c0}', '\u{116c9}'),
+        ('\u{11700}', '\u{1171a}'),
+        ('\u{1171d}', '\u{1172b}'),
+        ('\u{11730}', '\u{11739}'),
+        ('\u{11800}', '\u{1183a}'),
+        ('\u{118a0}', '\u{118e9}'),
+        ('\u{118ff}', '\u{11906}'),
+        ('\u{11909}', '\u{11909}'),
+        ('\u{1190c}', '\u{11913}'),
+        ('\u{11915}', '\u{11916}'),
+        ('\u{11918}', '\u{11935}'),
+        ('\u{11937}', '\u{11938}'),
+        ('\u{1193b}', '\u{11943}'),
+        ('\u{11950}', '\u{11959}'),
+        ('\u{119a0}', '\u{119a7}'),
+        ('\u{119aa}', '\u{119d7}'),
+        ('\u{119da}', '\u{119e1}'),
+        ('\u{119e3}', '\u{119e4}'),
+        ('\u{11a00}', '\u{11a3e}'),
+        ('\u{11a47}', '\u{11a47}'),
+        ('\u{11a50}', '\u{11a99}'),
+        ('\u{11a9d}', '\u{11a9d}'),
+        ('\u{11ac0}', '\u{11af8}'),
+        ('\u{11c00}', '\u{11c08}'),
+        ('\u{11c0a}', '\u{11c36}'),
+        ('\u{11c38}', '\u{11c40}'),
+        ('\u{11c50}', '\u{11c59}'),
+        ('\u{11c72}', '\u{11c8f}'),
+        ('\u{11c92}', '\u{11ca7}'),
+        ('\u{11ca9}', '\u{11cb6}'),
+        ('\u{11d00}', '\u{11d06}'),
+        ('\u{11d08}', '\u{11d09}'),
+        ('\u{11d0b}', '\u{11d36}'),
+        ('\u{11d3a}', '\u{11d3a}'),
+        ('\u{11d3c}', '\u{11d3d}'),
+        ('\u{11d3f}', '\u{11d47}'),
+        ('\u{11d50}', '\u{11d59}'),
+        ('\u{11d60}', '\u{11d65}'),
+        ('\u{11d67}', '\u{11d68}'),
+        ('\u{11d6a}', '\u{11d8e}'),
+        ('\u{11d90}', '\u{11d91}'),
+        ('\u{11d93}', '\u{11d98}'),
+        ('\u{11da0}', '\u{11da9}'),
+        ('\u{11ee0}', '\u{11ef6}'),
+        ('\u{11fb0}', '\u{11fb0}'),
+        ('\u{12000}', '\u{12399}'),
+        ('\u{12400}', '\u{1246e}'),
+        ('\u{12480}', '\u{12543}'),
+        ('\u{13000}', '\u{1342e}'),
+        ('\u{14400}', '\u{14646}'),
+        ('\u{16800}', '\u{16a38}'),
+        ('\u{16a40}', '\u{16a5e}'),
+        ('\u{16a60}', '\u{16a69}'),
+        ('\u{16ad0}', '\u{16aed}'),
+        ('\u{16af0}', '\u{16af4}'),
+        ('\u{16b00}', '\u{16b36}'),
+        ('\u{16b40}', '\u{16b43}'),
+        ('\u{16b50}', '\u{16b59}'),
+        ('\u{16b63}', '\u{16b77}'),
+        ('\u{16b7d}', '\u{16b8f}'),
+        ('\u{16e40}', '\u{16e7f}'),
+        ('\u{16f00}', '\u{16f4a}'),
+        ('\u{16f4f}', '\u{16f87}'),
+        ('\u{16f8f}', '\u{16f9f}'),
+        ('\u{16fe0}', '\u{16fe1}'),
+        ('\u{16fe3}', '\u{16fe4}'),
+        ('\u{16ff0}', '\u{16ff1}'),
+        ('\u{17000}', '\u{187f7}'),
+        ('\u{18800}', '\u{18cd5}'),
+        ('\u{18d00}', '\u{18d08}'),
+        ('\u{1b000}', '\u{1b11e}'),
+        ('\u{1b150}', '\u{1b152}'),
+        ('\u{1b164}', '\u{1b167}'),
+        ('\u{1b170}', '\u{1b2fb}'),
+        ('\u{1bc00}', '\u{1bc6a}'),
+        ('\u{1bc70}', '\u{1bc7c}'),
+        ('\u{1bc80}', '\u{1bc88}'),
+        ('\u{1bc90}', '\u{1bc99}'),
+        ('\u{1bc9d}', '\u{1bc9e}'),
+        ('\u{1d165}', '\u{1d169}'),
+        ('\u{1d16d}', '\u{1d172}'),
+        ('\u{1d17b}', '\u{1d182}'),
+        ('\u{1d185}', '\u{1d18b}'),
+        ('\u{1d1aa}', '\u{1d1ad}'),
+        ('\u{1d242}', '\u{1d244}'),
+        ('\u{1d400}', '\u{1d454}'),
+        ('\u{1d456}', '\u{1d49c}'),
+        ('\u{1d49e}', '\u{1d49f}'),
+        ('\u{1d4a2}', '\u{1d4a2}'),
+        ('\u{1d4a5}', '\u{1d4a6}'),
+        ('\u{1d4a9}', '\u{1d4ac}'),
+        ('\u{1d4ae}', '\u{1d4b9}'),
+        ('\u{1d4bb}', '\u{1d4bb}'),
+        ('\u{1d4bd}', '\u{1d4c3}'),
+        ('\u{1d4c5}', '\u{1d505}'),
+        ('\u{1d507}', '\u{1d50a}'),
+        ('\u{1d50d}', '\u{1d514}'),
+        ('\u{1d516}', '\u{1d51c}'),
+        ('\u{1d51e}', '\u{1d539}'),
+        ('\u{1d53b}', '\u{1d53e}'),
+        ('\u{1d540}', '\u{1d544}'),
+        ('\u{1d546}', '\u{1d546}'),
+        ('\u{1d54a}', '\u{1d550}'),
+        ('\u{1d552}', '\u{1d6a5}'),
+        ('\u{1d6a8}', '\u{1d6c0}'),
+        ('\u{1d6c2}', '\u{1d6da}'),
+        ('\u{1d6dc}', '\u{1d6fa}'),
+        ('\u{1d6fc}', '\u{1d714}'),
+        ('\u{1d716}', '\u{1d734}'),
+        ('\u{1d736}', '\u{1d74e}'),
+        ('\u{1d750}', '\u{1d76e}'),
+        ('\u{1d770}', '\u{1d788}'),
+        ('\u{1d78a}', '\u{1d7a8}'),
+        ('\u{1d7aa}', '\u{1d7c2}'),
+        ('\u{1d7c4}', '\u{1d7cb}'),
+        ('\u{1d7ce}', '\u{1d7ff}'),
+        ('\u{1da00}', '\u{1da36}'),
+        ('\u{1da3b}', '\u{1da6c}'),
+        ('\u{1da75}', '\u{1da75}'),
+        ('\u{1da84}', '\u{1da84}'),
+        ('\u{1da9b}', '\u{1da9f}'),
+        ('\u{1daa1}', '\u{1daaf}'),
+        ('\u{1e000}', '\u{1e006}'),
+        ('\u{1e008}', '\u{1e018}'),
+        ('\u{1e01b}', '\u{1e021}'),
+        ('\u{1e023}', '\u{1e024}'),
+        ('\u{1e026}', '\u{1e02a}'),
+        ('\u{1e100}', '\u{1e12c}'),
+        ('\u{1e130}', '\u{1e13d}'),
+        ('\u{1e140}', '\u{1e149}'),
+        ('\u{1e14e}', '\u{1e14e}'),
+        ('\u{1e2c0}', '\u{1e2f9}'),
+        ('\u{1e800}', '\u{1e8c4}'),
+        ('\u{1e8d0}', '\u{1e8d6}'),
+        ('\u{1e900}', '\u{1e94b}'),
+        ('\u{1e950}', '\u{1e959}'),
+        ('\u{1ee00}', '\u{1ee03}'),
+        ('\u{1ee05}', '\u{1ee1f}'),
+        ('\u{1ee21}', '\u{1ee22}'),
+        ('\u{1ee24}', '\u{1ee24}'),
+        ('\u{1ee27}', '\u{1ee27}'),
+        ('\u{1ee29}', '\u{1ee32}'),
+        ('\u{1ee34}', '\u{1ee37}'),
+        ('\u{1ee39}', '\u{1ee39}'),
+        ('\u{1ee3b}', '\u{1ee3b}'),
+        ('\u{1ee42}', '\u{1ee42}'),
+        ('\u{1ee47}', '\u{1ee47}'),
+        ('\u{1ee49}', '\u{1ee49}'),
+        ('\u{1ee4b}', '\u{1ee4b}'),
+        ('\u{1ee4d}', '\u{1ee4f}'),
+        ('\u{1ee51}', '\u{1ee52}'),
+        ('\u{1ee54}', '\u{1ee54}'),
+        ('\u{1ee57}', '\u{1ee57}'),
+        ('\u{1ee59}', '\u{1ee59}'),
+        ('\u{1ee5b}', '\u{1ee5b}'),
+        ('\u{1ee5d}', '\u{1ee5d}'),
+        ('\u{1ee5f}', '\u{1ee5f}'),
+        ('\u{1ee61}', '\u{1ee62}'),
+        ('\u{1ee64}', '\u{1ee64}'),
+        ('\u{1ee67}', '\u{1ee6a}'),
+        ('\u{1ee6c}', '\u{1ee72}'),
+        ('\u{1ee74}', '\u{1ee77}'),
+        ('\u{1ee79}', '\u{1ee7c}'),
+        ('\u{1ee7e}', '\u{1ee7e}'),
+        ('\u{1ee80}', '\u{1ee89}'),
+        ('\u{1ee8b}', '\u{1ee9b}'),
+        ('\u{1eea1}', '\u{1eea3}'),
+        ('\u{1eea5}', '\u{1eea9}'),
+        ('\u{1eeab}', '\u{1eebb}'),
+        ('\u{1fbf0}', '\u{1fbf9}'),
+        ('\u{20000}', '\u{2a6dd}'),
+        ('\u{2a700}', '\u{2b734}'),
+        ('\u{2b740}', '\u{2b81d}'),
+        ('\u{2b820}', '\u{2cea1}'),
+        ('\u{2ceb0}', '\u{2ebe0}'),
+        ('\u{2f800}', '\u{2fa1d}'),
+        ('\u{30000}', '\u{3134a}'),
+        ('\u{e0100}', '\u{e01ef}'),
+    ];
+
+    pub fn XID_Continue(c: char) -> bool {
+        super::bsearch_range_table(c, XID_Continue_table)
+    }
+
+    pub const XID_Start_table: &[(char, char)] = &[
+        ('\u{41}', '\u{5a}'),
+        ('\u{61}', '\u{7a}'),
+        ('\u{aa}', '\u{aa}'),
+        ('\u{b5}', '\u{b5}'),
+        ('\u{ba}', '\u{ba}'),
+        ('\u{c0}', '\u{d6}'),
+        ('\u{d8}', '\u{f6}'),
+        ('\u{f8}', '\u{2c1}'),
+        ('\u{2c6}', '\u{2d1}'),
+        ('\u{2e0}', '\u{2e4}'),
+        ('\u{2ec}', '\u{2ec}'),
+        ('\u{2ee}', '\u{2ee}'),
+        ('\u{370}', '\u{374}'),
+        ('\u{376}', '\u{377}'),
+        ('\u{37b}', '\u{37d}'),
+        ('\u{37f}', '\u{37f}'),
+        ('\u{386}', '\u{386}'),
+        ('\u{388}', '\u{38a}'),
+        ('\u{38c}', '\u{38c}'),
+        ('\u{38e}', '\u{3a1}'),
+        ('\u{3a3}', '\u{3f5}'),
+        ('\u{3f7}', '\u{481}'),
+        ('\u{48a}', '\u{52f}'),
+        ('\u{531}', '\u{556}'),
+        ('\u{559}', '\u{559}'),
+        ('\u{560}', '\u{588}'),
+        ('\u{5d0}', '\u{5ea}'),
+        ('\u{5ef}', '\u{5f2}'),
+        ('\u{620}', '\u{64a}'),
+        ('\u{66e}', '\u{66f}'),
+        ('\u{671}', '\u{6d3}'),
+        ('\u{6d5}', '\u{6d5}'),
+        ('\u{6e5}', '\u{6e6}'),
+        ('\u{6ee}', '\u{6ef}'),
+        ('\u{6fa}', '\u{6fc}'),
+        ('\u{6ff}', '\u{6ff}'),
+        ('\u{710}', '\u{710}'),
+        ('\u{712}', '\u{72f}'),
+        ('\u{74d}', '\u{7a5}'),
+        ('\u{7b1}', '\u{7b1}'),
+        ('\u{7ca}', '\u{7ea}'),
+        ('\u{7f4}', '\u{7f5}'),
+        ('\u{7fa}', '\u{7fa}'),
+        ('\u{800}', '\u{815}'),
+        ('\u{81a}', '\u{81a}'),
+        ('\u{824}', '\u{824}'),
+        ('\u{828}', '\u{828}'),
+        ('\u{840}', '\u{858}'),
+        ('\u{860}', '\u{86a}'),
+        ('\u{8a0}', '\u{8b4}'),
+        ('\u{8b6}', '\u{8c7}'),
+        ('\u{904}', '\u{939}'),
+        ('\u{93d}', '\u{93d}'),
+        ('\u{950}', '\u{950}'),
+        ('\u{958}', '\u{961}'),
+        ('\u{971}', '\u{980}'),
+        ('\u{985}', '\u{98c}'),
+        ('\u{98f}', '\u{990}'),
+        ('\u{993}', '\u{9a8}'),
+        ('\u{9aa}', '\u{9b0}'),
+        ('\u{9b2}', '\u{9b2}'),
+        ('\u{9b6}', '\u{9b9}'),
+        ('\u{9bd}', '\u{9bd}'),
+        ('\u{9ce}', '\u{9ce}'),
+        ('\u{9dc}', '\u{9dd}'),
+        ('\u{9df}', '\u{9e1}'),
+        ('\u{9f0}', '\u{9f1}'),
+        ('\u{9fc}', '\u{9fc}'),
+        ('\u{a05}', '\u{a0a}'),
+        ('\u{a0f}', '\u{a10}'),
+        ('\u{a13}', '\u{a28}'),
+        ('\u{a2a}', '\u{a30}'),
+        ('\u{a32}', '\u{a33}'),
+        ('\u{a35}', '\u{a36}'),
+        ('\u{a38}', '\u{a39}'),
+        ('\u{a59}', '\u{a5c}'),
+        ('\u{a5e}', '\u{a5e}'),
+        ('\u{a72}', '\u{a74}'),
+        ('\u{a85}', '\u{a8d}'),
+        ('\u{a8f}', '\u{a91}'),
+        ('\u{a93}', '\u{aa8}'),
+        ('\u{aaa}', '\u{ab0}'),
+        ('\u{ab2}', '\u{ab3}'),
+        ('\u{ab5}', '\u{ab9}'),
+        ('\u{abd}', '\u{abd}'),
+        ('\u{ad0}', '\u{ad0}'),
+        ('\u{ae0}', '\u{ae1}'),
+        ('\u{af9}', '\u{af9}'),
+        ('\u{b05}', '\u{b0c}'),
+        ('\u{b0f}', '\u{b10}'),
+        ('\u{b13}', '\u{b28}'),
+        ('\u{b2a}', '\u{b30}'),
+        ('\u{b32}', '\u{b33}'),
+        ('\u{b35}', '\u{b39}'),
+        ('\u{b3d}', '\u{b3d}'),
+        ('\u{b5c}', '\u{b5d}'),
+        ('\u{b5f}', '\u{b61}'),
+        ('\u{b71}', '\u{b71}'),
+        ('\u{b83}', '\u{b83}'),
+        ('\u{b85}', '\u{b8a}'),
+        ('\u{b8e}', '\u{b90}'),
+        ('\u{b92}', '\u{b95}'),
+        ('\u{b99}', '\u{b9a}'),
+        ('\u{b9c}', '\u{b9c}'),
+        ('\u{b9e}', '\u{b9f}'),
+        ('\u{ba3}', '\u{ba4}'),
+        ('\u{ba8}', '\u{baa}'),
+        ('\u{bae}', '\u{bb9}'),
+        ('\u{bd0}', '\u{bd0}'),
+        ('\u{c05}', '\u{c0c}'),
+        ('\u{c0e}', '\u{c10}'),
+        ('\u{c12}', '\u{c28}'),
+        ('\u{c2a}', '\u{c39}'),
+        ('\u{c3d}', '\u{c3d}'),
+        ('\u{c58}', '\u{c5a}'),
+        ('\u{c60}', '\u{c61}'),
+        ('\u{c80}', '\u{c80}'),
+        ('\u{c85}', '\u{c8c}'),
+        ('\u{c8e}', '\u{c90}'),
+        ('\u{c92}', '\u{ca8}'),
+        ('\u{caa}', '\u{cb3}'),
+        ('\u{cb5}', '\u{cb9}'),
+        ('\u{cbd}', '\u{cbd}'),
+        ('\u{cde}', '\u{cde}'),
+        ('\u{ce0}', '\u{ce1}'),
+        ('\u{cf1}', '\u{cf2}'),
+        ('\u{d04}', '\u{d0c}'),
+        ('\u{d0e}', '\u{d10}'),
+        ('\u{d12}', '\u{d3a}'),
+        ('\u{d3d}', '\u{d3d}'),
+        ('\u{d4e}', '\u{d4e}'),
+        ('\u{d54}', '\u{d56}'),
+        ('\u{d5f}', '\u{d61}'),
+        ('\u{d7a}', '\u{d7f}'),
+        ('\u{d85}', '\u{d96}'),
+        ('\u{d9a}', '\u{db1}'),
+        ('\u{db3}', '\u{dbb}'),
+        ('\u{dbd}', '\u{dbd}'),
+        ('\u{dc0}', '\u{dc6}'),
+        ('\u{e01}', '\u{e30}'),
+        ('\u{e32}', '\u{e32}'),
+        ('\u{e40}', '\u{e46}'),
+        ('\u{e81}', '\u{e82}'),
+        ('\u{e84}', '\u{e84}'),
+        ('\u{e86}', '\u{e8a}'),
+        ('\u{e8c}', '\u{ea3}'),
+        ('\u{ea5}', '\u{ea5}'),
+        ('\u{ea7}', '\u{eb0}'),
+        ('\u{eb2}', '\u{eb2}'),
+        ('\u{ebd}', '\u{ebd}'),
+        ('\u{ec0}', '\u{ec4}'),
+        ('\u{ec6}', '\u{ec6}'),
+        ('\u{edc}', '\u{edf}'),
+        ('\u{f00}', '\u{f00}'),
+        ('\u{f40}', '\u{f47}'),
+        ('\u{f49}', '\u{f6c}'),
+        ('\u{f88}', '\u{f8c}'),
+        ('\u{1000}', '\u{102a}'),
+        ('\u{103f}', '\u{103f}'),
+        ('\u{1050}', '\u{1055}'),
+        ('\u{105a}', '\u{105d}'),
+        ('\u{1061}', '\u{1061}'),
+        ('\u{1065}', '\u{1066}'),
+        ('\u{106e}', '\u{1070}'),
+        ('\u{1075}', '\u{1081}'),
+        ('\u{108e}', '\u{108e}'),
+        ('\u{10a0}', '\u{10c5}'),
+        ('\u{10c7}', '\u{10c7}'),
+        ('\u{10cd}', '\u{10cd}'),
+        ('\u{10d0}', '\u{10fa}'),
+        ('\u{10fc}', '\u{1248}'),
+        ('\u{124a}', '\u{124d}'),
+        ('\u{1250}', '\u{1256}'),
+        ('\u{1258}', '\u{1258}'),
+        ('\u{125a}', '\u{125d}'),
+        ('\u{1260}', '\u{1288}'),
+        ('\u{128a}', '\u{128d}'),
+        ('\u{1290}', '\u{12b0}'),
+        ('\u{12b2}', '\u{12b5}'),
+        ('\u{12b8}', '\u{12be}'),
+        ('\u{12c0}', '\u{12c0}'),
+        ('\u{12c2}', '\u{12c5}'),
+        ('\u{12c8}', '\u{12d6}'),
+        ('\u{12d8}', '\u{1310}'),
+        ('\u{1312}', '\u{1315}'),
+        ('\u{1318}', '\u{135a}'),
+        ('\u{1380}', '\u{138f}'),
+        ('\u{13a0}', '\u{13f5}'),
+        ('\u{13f8}', '\u{13fd}'),
+        ('\u{1401}', '\u{166c}'),
+        ('\u{166f}', '\u{167f}'),
+        ('\u{1681}', '\u{169a}'),
+        ('\u{16a0}', '\u{16ea}'),
+        ('\u{16ee}', '\u{16f8}'),
+        ('\u{1700}', '\u{170c}'),
+        ('\u{170e}', '\u{1711}'),
+        ('\u{1720}', '\u{1731}'),
+        ('\u{1740}', '\u{1751}'),
+        ('\u{1760}', '\u{176c}'),
+        ('\u{176e}', '\u{1770}'),
+        ('\u{1780}', '\u{17b3}'),
+        ('\u{17d7}', '\u{17d7}'),
+        ('\u{17dc}', '\u{17dc}'),
+        ('\u{1820}', '\u{1878}'),
+        ('\u{1880}', '\u{18a8}'),
+        ('\u{18aa}', '\u{18aa}'),
+        ('\u{18b0}', '\u{18f5}'),
+        ('\u{1900}', '\u{191e}'),
+        ('\u{1950}', '\u{196d}'),
+        ('\u{1970}', '\u{1974}'),
+        ('\u{1980}', '\u{19ab}'),
+        ('\u{19b0}', '\u{19c9}'),
+        ('\u{1a00}', '\u{1a16}'),
+        ('\u{1a20}', '\u{1a54}'),
+        ('\u{1aa7}', '\u{1aa7}'),
+        ('\u{1b05}', '\u{1b33}'),
+        ('\u{1b45}', '\u{1b4b}'),
+        ('\u{1b83}', '\u{1ba0}'),
+        ('\u{1bae}', '\u{1baf}'),
+        ('\u{1bba}', '\u{1be5}'),
+        ('\u{1c00}', '\u{1c23}'),
+        ('\u{1c4d}', '\u{1c4f}'),
+        ('\u{1c5a}', '\u{1c7d}'),
+        ('\u{1c80}', '\u{1c88}'),
+        ('\u{1c90}', '\u{1cba}'),
+        ('\u{1cbd}', '\u{1cbf}'),
+        ('\u{1ce9}', '\u{1cec}'),
+        ('\u{1cee}', '\u{1cf3}'),
+        ('\u{1cf5}', '\u{1cf6}'),
+        ('\u{1cfa}', '\u{1cfa}'),
+        ('\u{1d00}', '\u{1dbf}'),
+        ('\u{1e00}', '\u{1f15}'),
+        ('\u{1f18}', '\u{1f1d}'),
+        ('\u{1f20}', '\u{1f45}'),
+        ('\u{1f48}', '\u{1f4d}'),
+        ('\u{1f50}', '\u{1f57}'),
+        ('\u{1f59}', '\u{1f59}'),
+        ('\u{1f5b}', '\u{1f5b}'),
+        ('\u{1f5d}', '\u{1f5d}'),
+        ('\u{1f5f}', '\u{1f7d}'),
+        ('\u{1f80}', '\u{1fb4}'),
+        ('\u{1fb6}', '\u{1fbc}'),
+        ('\u{1fbe}', '\u{1fbe}'),
+        ('\u{1fc2}', '\u{1fc4}'),
+        ('\u{1fc6}', '\u{1fcc}'),
+        ('\u{1fd0}', '\u{1fd3}'),
+        ('\u{1fd6}', '\u{1fdb}'),
+        ('\u{1fe0}', '\u{1fec}'),
+        ('\u{1ff2}', '\u{1ff4}'),
+        ('\u{1ff6}', '\u{1ffc}'),
+        ('\u{2071}', '\u{2071}'),
+        ('\u{207f}', '\u{207f}'),
+        ('\u{2090}', '\u{209c}'),
+        ('\u{2102}', '\u{2102}'),
+        ('\u{2107}', '\u{2107}'),
+        ('\u{210a}', '\u{2113}'),
+        ('\u{2115}', '\u{2115}'),
+        ('\u{2118}', '\u{211d}'),
+        ('\u{2124}', '\u{2124}'),
+        ('\u{2126}', '\u{2126}'),
+        ('\u{2128}', '\u{2128}'),
+        ('\u{212a}', '\u{2139}'),
+        ('\u{213c}', '\u{213f}'),
+        ('\u{2145}', '\u{2149}'),
+        ('\u{214e}', '\u{214e}'),
+        ('\u{2160}', '\u{2188}'),
+        ('\u{2c00}', '\u{2c2e}'),
+        ('\u{2c30}', '\u{2c5e}'),
+        ('\u{2c60}', '\u{2ce4}'),
+        ('\u{2ceb}', '\u{2cee}'),
+        ('\u{2cf2}', '\u{2cf3}'),
+        ('\u{2d00}', '\u{2d25}'),
+        ('\u{2d27}', '\u{2d27}'),
+        ('\u{2d2d}', '\u{2d2d}'),
+        ('\u{2d30}', '\u{2d67}'),
+        ('\u{2d6f}', '\u{2d6f}'),
+        ('\u{2d80}', '\u{2d96}'),
+        ('\u{2da0}', '\u{2da6}'),
+        ('\u{2da8}', '\u{2dae}'),
+        ('\u{2db0}', '\u{2db6}'),
+        ('\u{2db8}', '\u{2dbe}'),
+        ('\u{2dc0}', '\u{2dc6}'),
+        ('\u{2dc8}', '\u{2dce}'),
+        ('\u{2dd0}', '\u{2dd6}'),
+        ('\u{2dd8}', '\u{2dde}'),
+        ('\u{3005}', '\u{3007}'),
+        ('\u{3021}', '\u{3029}'),
+        ('\u{3031}', '\u{3035}'),
+        ('\u{3038}', '\u{303c}'),
+        ('\u{3041}', '\u{3096}'),
+        ('\u{309d}', '\u{309f}'),
+        ('\u{30a1}', '\u{30fa}'),
+        ('\u{30fc}', '\u{30ff}'),
+        ('\u{3105}', '\u{312f}'),
+        ('\u{3131}', '\u{318e}'),
+        ('\u{31a0}', '\u{31bf}'),
+        ('\u{31f0}', '\u{31ff}'),
+        ('\u{3400}', '\u{4dbf}'),
+        ('\u{4e00}', '\u{9ffc}'),
+        ('\u{a000}', '\u{a48c}'),
+        ('\u{a4d0}', '\u{a4fd}'),
+        ('\u{a500}', '\u{a60c}'),
+        ('\u{a610}', '\u{a61f}'),
+        ('\u{a62a}', '\u{a62b}'),
+        ('\u{a640}', '\u{a66e}'),
+        ('\u{a67f}', '\u{a69d}'),
+        ('\u{a6a0}', '\u{a6ef}'),
+        ('\u{a717}', '\u{a71f}'),
+        ('\u{a722}', '\u{a788}'),
+        ('\u{a78b}', '\u{a7bf}'),
+        ('\u{a7c2}', '\u{a7ca}'),
+        ('\u{a7f5}', '\u{a801}'),
+        ('\u{a803}', '\u{a805}'),
+        ('\u{a807}', '\u{a80a}'),
+        ('\u{a80c}', '\u{a822}'),
+        ('\u{a840}', '\u{a873}'),
+        ('\u{a882}', '\u{a8b3}'),
+        ('\u{a8f2}', '\u{a8f7}'),
+        ('\u{a8fb}', '\u{a8fb}'),
+        ('\u{a8fd}', '\u{a8fe}'),
+        ('\u{a90a}', '\u{a925}'),
+        ('\u{a930}', '\u{a946}'),
+        ('\u{a960}', '\u{a97c}'),
+        ('\u{a984}', '\u{a9b2}'),
+        ('\u{a9cf}', '\u{a9cf}'),
+        ('\u{a9e0}', '\u{a9e4}'),
+        ('\u{a9e6}', '\u{a9ef}'),
+        ('\u{a9fa}', '\u{a9fe}'),
+        ('\u{aa00}', '\u{aa28}'),
+        ('\u{aa40}', '\u{aa42}'),
+        ('\u{aa44}', '\u{aa4b}'),
+        ('\u{aa60}', '\u{aa76}'),
+        ('\u{aa7a}', '\u{aa7a}'),
+        ('\u{aa7e}', '\u{aaaf}'),
+        ('\u{aab1}', '\u{aab1}'),
+        ('\u{aab5}', '\u{aab6}'),
+        ('\u{aab9}', '\u{aabd}'),
+        ('\u{aac0}', '\u{aac0}'),
+        ('\u{aac2}', '\u{aac2}'),
+        ('\u{aadb}', '\u{aadd}'),
+        ('\u{aae0}', '\u{aaea}'),
+        ('\u{aaf2}', '\u{aaf4}'),
+        ('\u{ab01}', '\u{ab06}'),
+        ('\u{ab09}', '\u{ab0e}'),
+        ('\u{ab11}', '\u{ab16}'),
+        ('\u{ab20}', '\u{ab26}'),
+        ('\u{ab28}', '\u{ab2e}'),
+        ('\u{ab30}', '\u{ab5a}'),
+        ('\u{ab5c}', '\u{ab69}'),
+        ('\u{ab70}', '\u{abe2}'),
+        ('\u{ac00}', '\u{d7a3}'),
+        ('\u{d7b0}', '\u{d7c6}'),
+        ('\u{d7cb}', '\u{d7fb}'),
+        ('\u{f900}', '\u{fa6d}'),
+        ('\u{fa70}', '\u{fad9}'),
+        ('\u{fb00}', '\u{fb06}'),
+        ('\u{fb13}', '\u{fb17}'),
+        ('\u{fb1d}', '\u{fb1d}'),
+        ('\u{fb1f}', '\u{fb28}'),
+        ('\u{fb2a}', '\u{fb36}'),
+        ('\u{fb38}', '\u{fb3c}'),
+        ('\u{fb3e}', '\u{fb3e}'),
+        ('\u{fb40}', '\u{fb41}'),
+        ('\u{fb43}', '\u{fb44}'),
+        ('\u{fb46}', '\u{fbb1}'),
+        ('\u{fbd3}', '\u{fc5d}'),
+        ('\u{fc64}', '\u{fd3d}'),
+        ('\u{fd50}', '\u{fd8f}'),
+        ('\u{fd92}', '\u{fdc7}'),
+        ('\u{fdf0}', '\u{fdf9}'),
+        ('\u{fe71}', '\u{fe71}'),
+        ('\u{fe73}', '\u{fe73}'),
+        ('\u{fe77}', '\u{fe77}'),
+        ('\u{fe79}', '\u{fe79}'),
+        ('\u{fe7b}', '\u{fe7b}'),
+        ('\u{fe7d}', '\u{fe7d}'),
+        ('\u{fe7f}', '\u{fefc}'),
+        ('\u{ff21}', '\u{ff3a}'),
+        ('\u{ff41}', '\u{ff5a}'),
+        ('\u{ff66}', '\u{ff9d}'),
+        ('\u{ffa0}', '\u{ffbe}'),
+        ('\u{ffc2}', '\u{ffc7}'),
+        ('\u{ffca}', '\u{ffcf}'),
+        ('\u{ffd2}', '\u{ffd7}'),
+        ('\u{ffda}', '\u{ffdc}'),
+        ('\u{10000}', '\u{1000b}'),
+        ('\u{1000d}', '\u{10026}'),
+        ('\u{10028}', '\u{1003a}'),
+        ('\u{1003c}', '\u{1003d}'),
+        ('\u{1003f}', '\u{1004d}'),
+        ('\u{10050}', '\u{1005d}'),
+        ('\u{10080}', '\u{100fa}'),
+        ('\u{10140}', '\u{10174}'),
+        ('\u{10280}', '\u{1029c}'),
+        ('\u{102a0}', '\u{102d0}'),
+        ('\u{10300}', '\u{1031f}'),
+        ('\u{1032d}', '\u{1034a}'),
+        ('\u{10350}', '\u{10375}'),
+        ('\u{10380}', '\u{1039d}'),
+        ('\u{103a0}', '\u{103c3}'),
+        ('\u{103c8}', '\u{103cf}'),
+        ('\u{103d1}', '\u{103d5}'),
+        ('\u{10400}', '\u{1049d}'),
+        ('\u{104b0}', '\u{104d3}'),
+        ('\u{104d8}', '\u{104fb}'),
+        ('\u{10500}', '\u{10527}'),
+        ('\u{10530}', '\u{10563}'),
+        ('\u{10600}', '\u{10736}'),
+        ('\u{10740}', '\u{10755}'),
+        ('\u{10760}', '\u{10767}'),
+        ('\u{10800}', '\u{10805}'),
+        ('\u{10808}', '\u{10808}'),
+        ('\u{1080a}', '\u{10835}'),
+        ('\u{10837}', '\u{10838}'),
+        ('\u{1083c}', '\u{1083c}'),
+        ('\u{1083f}', '\u{10855}'),
+        ('\u{10860}', '\u{10876}'),
+        ('\u{10880}', '\u{1089e}'),
+        ('\u{108e0}', '\u{108f2}'),
+        ('\u{108f4}', '\u{108f5}'),
+        ('\u{10900}', '\u{10915}'),
+        ('\u{10920}', '\u{10939}'),
+        ('\u{10980}', '\u{109b7}'),
+        ('\u{109be}', '\u{109bf}'),
+        ('\u{10a00}', '\u{10a00}'),
+        ('\u{10a10}', '\u{10a13}'),
+        ('\u{10a15}', '\u{10a17}'),
+        ('\u{10a19}', '\u{10a35}'),
+        ('\u{10a60}', '\u{10a7c}'),
+        ('\u{10a80}', '\u{10a9c}'),
+        ('\u{10ac0}', '\u{10ac7}'),
+        ('\u{10ac9}', '\u{10ae4}'),
+        ('\u{10b00}', '\u{10b35}'),
+        ('\u{10b40}', '\u{10b55}'),
+        ('\u{10b60}', '\u{10b72}'),
+        ('\u{10b80}', '\u{10b91}'),
+        ('\u{10c00}', '\u{10c48}'),
+        ('\u{10c80}', '\u{10cb2}'),
+        ('\u{10cc0}', '\u{10cf2}'),
+        ('\u{10d00}', '\u{10d23}'),
+        ('\u{10e80}', '\u{10ea9}'),
+        ('\u{10eb0}', '\u{10eb1}'),
+        ('\u{10f00}', '\u{10f1c}'),
+        ('\u{10f27}', '\u{10f27}'),
+        ('\u{10f30}', '\u{10f45}'),
+        ('\u{10fb0}', '\u{10fc4}'),
+        ('\u{10fe0}', '\u{10ff6}'),
+        ('\u{11003}', '\u{11037}'),
+        ('\u{11083}', '\u{110af}'),
+        ('\u{110d0}', '\u{110e8}'),
+        ('\u{11103}', '\u{11126}'),
+        ('\u{11144}', '\u{11144}'),
+        ('\u{11147}', '\u{11147}'),
+        ('\u{11150}', '\u{11172}'),
+        ('\u{11176}', '\u{11176}'),
+        ('\u{11183}', '\u{111b2}'),
+        ('\u{111c1}', '\u{111c4}'),
+        ('\u{111da}', '\u{111da}'),
+        ('\u{111dc}', '\u{111dc}'),
+        ('\u{11200}', '\u{11211}'),
+        ('\u{11213}', '\u{1122b}'),
+        ('\u{11280}', '\u{11286}'),
+        ('\u{11288}', '\u{11288}'),
+        ('\u{1128a}', '\u{1128d}'),
+        ('\u{1128f}', '\u{1129d}'),
+        ('\u{1129f}', '\u{112a8}'),
+        ('\u{112b0}', '\u{112de}'),
+        ('\u{11305}', '\u{1130c}'),
+        ('\u{1130f}', '\u{11310}'),
+        ('\u{11313}', '\u{11328}'),
+        ('\u{1132a}', '\u{11330}'),
+        ('\u{11332}', '\u{11333}'),
+        ('\u{11335}', '\u{11339}'),
+        ('\u{1133d}', '\u{1133d}'),
+        ('\u{11350}', '\u{11350}'),
+        ('\u{1135d}', '\u{11361}'),
+        ('\u{11400}', '\u{11434}'),
+        ('\u{11447}', '\u{1144a}'),
+        ('\u{1145f}', '\u{11461}'),
+        ('\u{11480}', '\u{114af}'),
+        ('\u{114c4}', '\u{114c5}'),
+        ('\u{114c7}', '\u{114c7}'),
+        ('\u{11580}', '\u{115ae}'),
+        ('\u{115d8}', '\u{115db}'),
+        ('\u{11600}', '\u{1162f}'),
+        ('\u{11644}', '\u{11644}'),
+        ('\u{11680}', '\u{116aa}'),
+        ('\u{116b8}', '\u{116b8}'),
+        ('\u{11700}', '\u{1171a}'),
+        ('\u{11800}', '\u{1182b}'),
+        ('\u{118a0}', '\u{118df}'),
+        ('\u{118ff}', '\u{11906}'),
+        ('\u{11909}', '\u{11909}'),
+        ('\u{1190c}', '\u{11913}'),
+        ('\u{11915}', '\u{11916}'),
+        ('\u{11918}', '\u{1192f}'),
+        ('\u{1193f}', '\u{1193f}'),
+        ('\u{11941}', '\u{11941}'),
+        ('\u{119a0}', '\u{119a7}'),
+        ('\u{119aa}', '\u{119d0}'),
+        ('\u{119e1}', '\u{119e1}'),
+        ('\u{119e3}', '\u{119e3}'),
+        ('\u{11a00}', '\u{11a00}'),
+        ('\u{11a0b}', '\u{11a32}'),
+        ('\u{11a3a}', '\u{11a3a}'),
+        ('\u{11a50}', '\u{11a50}'),
+        ('\u{11a5c}', '\u{11a89}'),
+        ('\u{11a9d}', '\u{11a9d}'),
+        ('\u{11ac0}', '\u{11af8}'),
+        ('\u{11c00}', '\u{11c08}'),
+        ('\u{11c0a}', '\u{11c2e}'),
+        ('\u{11c40}', '\u{11c40}'),
+        ('\u{11c72}', '\u{11c8f}'),
+        ('\u{11d00}', '\u{11d06}'),
+        ('\u{11d08}', '\u{11d09}'),
+        ('\u{11d0b}', '\u{11d30}'),
+        ('\u{11d46}', '\u{11d46}'),
+        ('\u{11d60}', '\u{11d65}'),
+        ('\u{11d67}', '\u{11d68}'),
+        ('\u{11d6a}', '\u{11d89}'),
+        ('\u{11d98}', '\u{11d98}'),
+        ('\u{11ee0}', '\u{11ef2}'),
+        ('\u{11fb0}', '\u{11fb0}'),
+        ('\u{12000}', '\u{12399}'),
+        ('\u{12400}', '\u{1246e}'),
+        ('\u{12480}', '\u{12543}'),
+        ('\u{13000}', '\u{1342e}'),
+        ('\u{14400}', '\u{14646}'),
+        ('\u{16800}', '\u{16a38}'),
+        ('\u{16a40}', '\u{16a5e}'),
+        ('\u{16ad0}', '\u{16aed}'),
+        ('\u{16b00}', '\u{16b2f}'),
+        ('\u{16b40}', '\u{16b43}'),
+        ('\u{16b63}', '\u{16b77}'),
+        ('\u{16b7d}', '\u{16b8f}'),
+        ('\u{16e40}', '\u{16e7f}'),
+        ('\u{16f00}', '\u{16f4a}'),
+        ('\u{16f50}', '\u{16f50}'),
+        ('\u{16f93}', '\u{16f9f}'),
+        ('\u{16fe0}', '\u{16fe1}'),
+        ('\u{16fe3}', '\u{16fe3}'),
+        ('\u{17000}', '\u{187f7}'),
+        ('\u{18800}', '\u{18cd5}'),
+        ('\u{18d00}', '\u{18d08}'),
+        ('\u{1b000}', '\u{1b11e}'),
+        ('\u{1b150}', '\u{1b152}'),
+        ('\u{1b164}', '\u{1b167}'),
+        ('\u{1b170}', '\u{1b2fb}'),
+        ('\u{1bc00}', '\u{1bc6a}'),
+        ('\u{1bc70}', '\u{1bc7c}'),
+        ('\u{1bc80}', '\u{1bc88}'),
+        ('\u{1bc90}', '\u{1bc99}'),
+        ('\u{1d400}', '\u{1d454}'),
+        ('\u{1d456}', '\u{1d49c}'),
+        ('\u{1d49e}', '\u{1d49f}'),
+        ('\u{1d4a2}', '\u{1d4a2}'),
+        ('\u{1d4a5}', '\u{1d4a6}'),
+        ('\u{1d4a9}', '\u{1d4ac}'),
+        ('\u{1d4ae}', '\u{1d4b9}'),
+        ('\u{1d4bb}', '\u{1d4bb}'),
+        ('\u{1d4bd}', '\u{1d4c3}'),
+        ('\u{1d4c5}', '\u{1d505}'),
+        ('\u{1d507}', '\u{1d50a}'),
+        ('\u{1d50d}', '\u{1d514}'),
+        ('\u{1d516}', '\u{1d51c}'),
+        ('\u{1d51e}', '\u{1d539}'),
+        ('\u{1d53b}', '\u{1d53e}'),
+        ('\u{1d540}', '\u{1d544}'),
+        ('\u{1d546}', '\u{1d546}'),
+        ('\u{1d54a}', '\u{1d550}'),
+        ('\u{1d552}', '\u{1d6a5}'),
+        ('\u{1d6a8}', '\u{1d6c0}'),
+        ('\u{1d6c2}', '\u{1d6da}'),
+        ('\u{1d6dc}', '\u{1d6fa}'),
+        ('\u{1d6fc}', '\u{1d714}'),
+        ('\u{1d716}', '\u{1d734}'),
+        ('\u{1d736}', '\u{1d74e}'),
+        ('\u{1d750}', '\u{1d76e}'),
+        ('\u{1d770}', '\u{1d788}'),
+        ('\u{1d78a}', '\u{1d7a8}'),
+        ('\u{1d7aa}', '\u{1d7c2}'),
+        ('\u{1d7c4}', '\u{1d7cb}'),
+        ('\u{1e100}', '\u{1e12c}'),
+        ('\u{1e137}', '\u{1e13d}'),
+        ('\u{1e14e}', '\u{1e14e}'),
+        ('\u{1e2c0}', '\u{1e2eb}'),
+        ('\u{1e800}', '\u{1e8c4}'),
+        ('\u{1e900}', '\u{1e943}'),
+        ('\u{1e94b}', '\u{1e94b}'),
+        ('\u{1ee00}', '\u{1ee03}'),
+        ('\u{1ee05}', '\u{1ee1f}'),
+        ('\u{1ee21}', '\u{1ee22}'),
+        ('\u{1ee24}', '\u{1ee24}'),
+        ('\u{1ee27}', '\u{1ee27}'),
+        ('\u{1ee29}', '\u{1ee32}'),
+        ('\u{1ee34}', '\u{1ee37}'),
+        ('\u{1ee39}', '\u{1ee39}'),
+        ('\u{1ee3b}', '\u{1ee3b}'),
+        ('\u{1ee42}', '\u{1ee42}'),
+        ('\u{1ee47}', '\u{1ee47}'),
+        ('\u{1ee49}', '\u{1ee49}'),
+        ('\u{1ee4b}', '\u{1ee4b}'),
+        ('\u{1ee4d}', '\u{1ee4f}'),
+        ('\u{1ee51}', '\u{1ee52}'),
+        ('\u{1ee54}', '\u{1ee54}'),
+        ('\u{1ee57}', '\u{1ee57}'),
+        ('\u{1ee59}', '\u{1ee59}'),
+        ('\u{1ee5b}', '\u{1ee5b}'),
+        ('\u{1ee5d}', '\u{1ee5d}'),
+        ('\u{1ee5f}', '\u{1ee5f}'),
+        ('\u{1ee61}', '\u{1ee62}'),
+        ('\u{1ee64}', '\u{1ee64}'),
+        ('\u{1ee67}', '\u{1ee6a}'),
+        ('\u{1ee6c}', '\u{1ee72}'),
+        ('\u{1ee74}', '\u{1ee77}'),
+        ('\u{1ee79}', '\u{1ee7c}'),
+        ('\u{1ee7e}', '\u{1ee7e}'),
+        ('\u{1ee80}', '\u{1ee89}'),
+        ('\u{1ee8b}', '\u{1ee9b}'),
+        ('\u{1eea1}', '\u{1eea3}'),
+        ('\u{1eea5}', '\u{1eea9}'),
+        ('\u{1eeab}', '\u{1eebb}'),
+        ('\u{20000}', '\u{2a6dd}'),
+        ('\u{2a700}', '\u{2b734}'),
+        ('\u{2b740}', '\u{2b81d}'),
+        ('\u{2b820}', '\u{2cea1}'),
+        ('\u{2ceb0}', '\u{2ebe0}'),
+        ('\u{2f800}', '\u{2fa1d}'),
+        ('\u{30000}', '\u{3134a}'),
+    ];
+
+    pub fn XID_Start(c: char) -> bool {
+        super::bsearch_range_table(c, XID_Start_table)
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/storage.js b/api-docs/m_captcha/0.1.3/storage.js new file mode 100644 index 0000000..ff361c6 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/storage.js @@ -0,0 +1 @@ +var resourcesSuffix="";var darkThemes=["dark","ayu"];var currentTheme=document.getElementById("themeStyle");var mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed!==true){for(i=0;i=0;--i){if(func(arr[i])===true){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function hasOwnProperty(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function usableLocalStorage(){if(typeof Storage==="undefined"){return false}try{return window.localStorage!==null&&window.localStorage!==undefined}catch(err){return false}}function updateLocalStorage(name,value){if(usableLocalStorage()){localStorage[name]=value}else{}}function getCurrentValue(name){if(usableLocalStorage()&&localStorage[name]!==undefined){return localStorage[name]}return null}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){var fullBasicCss="rustdoc"+resourcesSuffix+".css";var fullNewTheme=newTheme+resourcesSuffix+".css";var newHref=mainStyleElem.href.replace(fullBasicCss,fullNewTheme);if(saveTheme===true){updateLocalStorage("rustdoc-theme",newTheme)}if(styleElem.href===newHref){return}var found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),function(el){savedHref.push(el.href)})}onEach(savedHref,function(el){if(el===newHref){found=true;return true}});if(found===true){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("rustdoc-use-system-theme",value);var toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}var updateSystemTheme=(function(){if(!window.matchMedia){return function(){let cssTheme=getComputedStyle(document.documentElement).getPropertyValue('content');switchTheme(currentTheme,mainTheme,JSON.parse(cssTheme)||"light",true)}}var mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){if(getSettingValue("use-system-theme")!=="false"){var lightTheme=getSettingValue("preferred-light-theme")||"light";var darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){switchTheme(currentTheme,mainTheme,darkTheme,true)}else{switchTheme(currentTheme,mainTheme,lightTheme,true)}}}mql.addListener(handlePreferenceChange);return function(){handlePreferenceChange(mql)}})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(currentTheme,mainTheme,getSettingValue("theme")||"light",false)} \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/theme.js b/api-docs/m_captcha/0.1.3/theme.js new file mode 100644 index 0000000..8f9c49a --- /dev/null +++ b/api-docs/m_captcha/0.1.3/theme.js @@ -0,0 +1 @@ +var themes=document.getElementById("theme-choices");var themePicker=document.getElementById("theme-picker");function showThemeButtonState(){themes.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){themes.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}function switchThemeButtonState(){if(themes.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}};function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!=="theme-picker"&&(!active.parentNode||active.parentNode.id!=="theme-choices")&&(!related||(related.id!=="theme-picker"&&(!related.parentNode||related.parentNode.id!=="theme-choices")))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;["ayu","dark","light"].forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(el){switchTheme(currentTheme,mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themes.appendChild(but)}) \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/unicode_xid/all.html b/api-docs/m_captcha/0.1.3/unicode_xid/all.html new file mode 100644 index 0000000..9b081a3 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/unicode_xid/all.html @@ -0,0 +1,4 @@ +List of all items in this crate

[] + + List of all items

Traits

Constants

\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/unicode_xid/constant.UNICODE_VERSION.html b/api-docs/m_captcha/0.1.3/unicode_xid/constant.UNICODE_VERSION.html new file mode 100644 index 0000000..bbed5ce --- /dev/null +++ b/api-docs/m_captcha/0.1.3/unicode_xid/constant.UNICODE_VERSION.html @@ -0,0 +1,4 @@ +unicode_xid::UNICODE_VERSION - Rust

[][src]Constant unicode_xid::UNICODE_VERSION

pub const UNICODE_VERSION: (u64, u64, u64);

The version of Unicode +that this version of unicode-xid is based on.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/unicode_xid/index.html b/api-docs/m_captcha/0.1.3/unicode_xid/index.html new file mode 100644 index 0000000..06cde42 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/unicode_xid/index.html @@ -0,0 +1,22 @@ +unicode_xid - Rust

[][src]Crate unicode_xid

Determine if a char is a valid identifier for a parser and/or lexer according to +Unicode Standard Annex #31 rules.

+ +
+extern crate unicode_xid;
+
+use unicode_xid::UnicodeXID;
+
+fn main() {
+    let ch = 'a';
+    println!("Is {} a valid start of an identifier? {}", ch, UnicodeXID::is_xid_start(ch));
+}
+

features

+

unicode-xid supports a no_std feature. This eliminates dependence +on std, and instead uses equivalent functions from core.

+

Constants

+
UNICODE_VERSION

The version of Unicode +that this version of unicode-xid is based on.

+

Traits

+
UnicodeXID

Methods for determining if a character is a valid identifier character.

+
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/unicode_xid/sidebar-items.js b/api-docs/m_captcha/0.1.3/unicode_xid/sidebar-items.js new file mode 100644 index 0000000..d23714a --- /dev/null +++ b/api-docs/m_captcha/0.1.3/unicode_xid/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["UNICODE_VERSION","The version of Unicode that this version of unicode-xid is based on."]],"trait":[["UnicodeXID","Methods for determining if a character is a valid identifier character."]]}); \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/unicode_xid/tables/constant.UNICODE_VERSION.html b/api-docs/m_captcha/0.1.3/unicode_xid/tables/constant.UNICODE_VERSION.html new file mode 100644 index 0000000..b67c5aa --- /dev/null +++ b/api-docs/m_captcha/0.1.3/unicode_xid/tables/constant.UNICODE_VERSION.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../unicode_xid/constant.UNICODE_VERSION.html...

+ + + \ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/unicode_xid/trait.UnicodeXID.html b/api-docs/m_captcha/0.1.3/unicode_xid/trait.UnicodeXID.html new file mode 100644 index 0000000..096daf6 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/unicode_xid/trait.UnicodeXID.html @@ -0,0 +1,16 @@ +unicode_xid::UnicodeXID - Rust

[][src]Trait unicode_xid::UnicodeXID

pub trait UnicodeXID {
+    fn is_xid_start(self) -> bool;
+
fn is_xid_continue(self) -> bool; +}

Methods for determining if a character is a valid identifier character.

+

Required methods

fn is_xid_start(self) -> bool[src]

Returns whether the specified character satisfies the 'XID_Start' +Unicode property.

+

'XID_Start' is a Unicode Derived Property specified in +UAX #31, +mostly similar to ID_Start but modified for closure under NFKx.

+

fn is_xid_continue(self) -> bool[src]

Returns whether the specified char satisfies the 'XID_Continue' +Unicode property.

+

'XID_Continue' is a Unicode Derived Property specified in +UAX #31, +mostly similar to 'ID_Continue' but modified for closure under NFKx.

+
Loading content...

Implementors

impl UnicodeXID for char[src]

Loading content...
\ No newline at end of file diff --git a/api-docs/m_captcha/0.1.3/wheel.svg b/api-docs/m_captcha/0.1.3/wheel.svg new file mode 100644 index 0000000..01da3b2 --- /dev/null +++ b/api-docs/m_captcha/0.1.3/wheel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/COPYRIGHT.txt b/api-docs/pow_sha256/0.1.0/COPYRIGHT.txt new file mode 100644 index 0000000..af77776 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/COPYRIGHT.txt @@ -0,0 +1,45 @@ +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif Pro (SourceSerifPro-Regular.ttf.woff, + SourceSerifPro-Bold.ttf.woff, SourceSerifPro-It.ttf.woff): + + Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with + Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of + Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerifPro-LICENSE.txt. + +This copyright file is intended to be distributed with rustdoc output. diff --git a/api-docs/pow_sha256/0.1.0/FiraSans-LICENSE.txt b/api-docs/pow_sha256/0.1.0/FiraSans-LICENSE.txt new file mode 100644 index 0000000..d444ea9 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/FiraSans-LICENSE.txt @@ -0,0 +1,94 @@ +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/pow_sha256/0.1.0/FiraSans-Medium.woff b/api-docs/pow_sha256/0.1.0/FiraSans-Medium.woff new file mode 100644 index 0000000..7d742c5 Binary files /dev/null and b/api-docs/pow_sha256/0.1.0/FiraSans-Medium.woff differ diff --git a/api-docs/pow_sha256/0.1.0/FiraSans-Regular.woff b/api-docs/pow_sha256/0.1.0/FiraSans-Regular.woff new file mode 100644 index 0000000..d8e0363 Binary files /dev/null and b/api-docs/pow_sha256/0.1.0/FiraSans-Regular.woff differ diff --git a/api-docs/pow_sha256/0.1.0/LICENSE-APACHE.txt b/api-docs/pow_sha256/0.1.0/LICENSE-APACHE.txt new file mode 100644 index 0000000..16fe87b --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/LICENSE-APACHE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/api-docs/pow_sha256/0.1.0/LICENSE-MIT.txt b/api-docs/pow_sha256/0.1.0/LICENSE-MIT.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/LICENSE-MIT.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/api-docs/pow_sha256/0.1.0/SourceCodePro-LICENSE.txt b/api-docs/pow_sha256/0.1.0/SourceCodePro-LICENSE.txt new file mode 100644 index 0000000..0754257 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/SourceCodePro-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/pow_sha256/0.1.0/SourceCodePro-Regular.woff b/api-docs/pow_sha256/0.1.0/SourceCodePro-Regular.woff new file mode 100644 index 0000000..5576670 Binary files /dev/null and b/api-docs/pow_sha256/0.1.0/SourceCodePro-Regular.woff differ diff --git a/api-docs/pow_sha256/0.1.0/SourceCodePro-Semibold.woff b/api-docs/pow_sha256/0.1.0/SourceCodePro-Semibold.woff new file mode 100644 index 0000000..ca972a1 Binary files /dev/null and b/api-docs/pow_sha256/0.1.0/SourceCodePro-Semibold.woff differ diff --git a/api-docs/pow_sha256/0.1.0/SourceSerifPro-Bold.ttf.woff b/api-docs/pow_sha256/0.1.0/SourceSerifPro-Bold.ttf.woff new file mode 100644 index 0000000..ca25431 Binary files /dev/null and b/api-docs/pow_sha256/0.1.0/SourceSerifPro-Bold.ttf.woff differ diff --git a/api-docs/pow_sha256/0.1.0/SourceSerifPro-It.ttf.woff b/api-docs/pow_sha256/0.1.0/SourceSerifPro-It.ttf.woff new file mode 100644 index 0000000..a287bbe Binary files /dev/null and b/api-docs/pow_sha256/0.1.0/SourceSerifPro-It.ttf.woff differ diff --git a/api-docs/pow_sha256/0.1.0/SourceSerifPro-LICENSE.md b/api-docs/pow_sha256/0.1.0/SourceSerifPro-LICENSE.md new file mode 100644 index 0000000..22cb755 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/SourceSerifPro-LICENSE.md @@ -0,0 +1,93 @@ +Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/pow_sha256/0.1.0/SourceSerifPro-Regular.ttf.woff b/api-docs/pow_sha256/0.1.0/SourceSerifPro-Regular.ttf.woff new file mode 100644 index 0000000..a3d55cf Binary files /dev/null and b/api-docs/pow_sha256/0.1.0/SourceSerifPro-Regular.ttf.woff differ diff --git a/api-docs/pow_sha256/0.1.0/ayu.css b/api-docs/pow_sha256/0.1.0/ayu.css new file mode 100644 index 0000000..096f6f3 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/ayu.css @@ -0,0 +1 @@ + body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod){border-bottom-color:#5c6773;}h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}code{color:#ffb454;}h3>code,h4>code,h5>code{color:#e6e1cf;}pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#5c6773;}.docblock table,.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.content .highlighted{color:#000 !important;background-color:#c6afb3;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted{background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a span.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}.collapse-toggle{color:#999;}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-focus:disabled{color:#929292;}.module-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background-color:transparent;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help>div>span{border-bottom-color:#5c6773;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.content .highlighted.mod,.content .highlighted.externcrate{}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content .highlighted.trait{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content .highlighted.traitalias{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}.content .highlighted.foreigntype{}pre.rust .lifetime{}.content .highlighted.primitive{}.content .highlighted.constant,.content .highlighted.static{}.stab.unstable{}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content .highlighted.enum{}.content .highlighted.struct{}.content .highlighted.keyword{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{}.stab.portability{}.content .highlighted.union{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}.content .highlighted.type{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results td span.alias{color:#c5c5c5;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/brush.svg b/api-docs/pow_sha256/0.1.0/brush.svg new file mode 100644 index 0000000..ea266e8 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/brush.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/dark.css b/api-docs/pow_sha256/0.1.0/dark.css new file mode 100644 index 0000000..85dec48 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/dark.css @@ -0,0 +1 @@ +body{background-color:#353535;color:#ddd;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.content .highlighted{color:#eee !important;background-color:#616161;}.content .highlighted a,.content .highlighted span{color:#eee !important;}.content .highlighted.trait{background-color:#013191;}.content .highlighted.traitalias{background-color:#013191;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.mod{background-color:#803a1b;}.content .highlighted.externcrate{background-color:#396bac;}.content .highlighted.enum{background-color:#5b4e68;}.content .highlighted.struct{background-color:#194e9f;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#4950ed;}.content .highlighted.type{background-color:#38902c;}.content .highlighted.foreigntype{background-color:#b200d6;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#217d1c;}.content .highlighted.constant,.content .highlighted.static{background-color:#0063cc;}.content .highlighted.primitive{background-color:#00708a;}.content .highlighted.keyword{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}.collapse-toggle{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-focus:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;color:#2f2f2f;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;color:#2f2f2f;}.stab.portability>code{color:#ddd;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);color:black;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#ffb900;}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results td span.alias{color:#fff;}.search-results td span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/down-arrow.svg b/api-docs/pow_sha256/0.1.0/down-arrow.svg new file mode 100644 index 0000000..35437e7 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/down-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/favicon-16x16.png b/api-docs/pow_sha256/0.1.0/favicon-16x16.png new file mode 100644 index 0000000..7cfe6c1 Binary files /dev/null and b/api-docs/pow_sha256/0.1.0/favicon-16x16.png differ diff --git a/api-docs/pow_sha256/0.1.0/favicon-32x32.png b/api-docs/pow_sha256/0.1.0/favicon-32x32.png new file mode 100644 index 0000000..5109c1d Binary files /dev/null and b/api-docs/pow_sha256/0.1.0/favicon-32x32.png differ diff --git a/api-docs/pow_sha256/0.1.0/favicon.svg b/api-docs/pow_sha256/0.1.0/favicon.svg new file mode 100644 index 0000000..8b34b51 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/favicon.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/api-docs/pow_sha256/0.1.0/implementors/core/clone/trait.Clone.js b/api-docs/pow_sha256/0.1.0/implementors/core/clone/trait.Clone.js new file mode 100644 index 0000000..b2161aa --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/implementors/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T: Clone> Clone for PoWBuilder<T>","synthetic":false,"types":[]},{"text":"impl<T: Clone> Clone for PoW<T>","synthetic":false,"types":[]},{"text":"impl Clone for ConfigBuilder","synthetic":false,"types":[]},{"text":"impl Clone for Config","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/implementors/core/cmp/trait.PartialEq.js b/api-docs/pow_sha256/0.1.0/implementors/core/cmp/trait.PartialEq.js new file mode 100644 index 0000000..dad600e --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/implementors/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T: PartialEq> PartialEq<PoW<T>> for PoW<T>","synthetic":false,"types":[]},{"text":"impl PartialEq<Config> for Config","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/implementors/core/default/trait.Default.js b/api-docs/pow_sha256/0.1.0/implementors/core/default/trait.Default.js new file mode 100644 index 0000000..b50dbb3 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/implementors/core/default/trait.Default.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T: Default> Default for PoWBuilder<T>","synthetic":false,"types":[]},{"text":"impl Default for ConfigBuilder","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/implementors/core/fmt/trait.Debug.js b/api-docs/pow_sha256/0.1.0/implementors/core/fmt/trait.Debug.js new file mode 100644 index 0000000..35cd8fa --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/implementors/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T: Debug> Debug for PoW<T>","synthetic":false,"types":[]},{"text":"impl Debug for Config","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.Freeze.js b/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.Freeze.js new file mode 100644 index 0000000..a287155 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Freeze for PoW<T>","synthetic":true,"types":[]},{"text":"impl<T> Freeze for PoWBuilder<T>","synthetic":true,"types":[]},{"text":"impl Freeze for Config","synthetic":true,"types":[]},{"text":"impl Freeze for ConfigBuilder","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.Send.js b/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.Send.js new file mode 100644 index 0000000..eccc4de --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Send for PoW<T> where
    T: Send, 
","synthetic":true,"types":[]},{"text":"impl<T> Send for PoWBuilder<T> where
    T: Send, 
","synthetic":true,"types":[]},{"text":"impl Send for Config","synthetic":true,"types":[]},{"text":"impl Send for ConfigBuilder","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.StructuralPartialEq.js b/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 0000000..0c28180 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> StructuralPartialEq for PoW<T>","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Config","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.Sync.js b/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.Sync.js new file mode 100644 index 0000000..74e89a3 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Sync for PoW<T> where
    T: Sync, 
","synthetic":true,"types":[]},{"text":"impl<T> Sync for PoWBuilder<T> where
    T: Sync, 
","synthetic":true,"types":[]},{"text":"impl Sync for Config","synthetic":true,"types":[]},{"text":"impl Sync for ConfigBuilder","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.Unpin.js b/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.Unpin.js new file mode 100644 index 0000000..2674676 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/implementors/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Unpin for PoW<T> where
    T: Unpin, 
","synthetic":true,"types":[]},{"text":"impl<T> Unpin for PoWBuilder<T> where
    T: Unpin, 
","synthetic":true,"types":[]},{"text":"impl Unpin for Config","synthetic":true,"types":[]},{"text":"impl Unpin for ConfigBuilder","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/implementors/serde/de/trait.Deserialize.js b/api-docs/pow_sha256/0.1.0/implementors/serde/de/trait.Deserialize.js new file mode 100644 index 0000000..0580d3b --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/implementors/serde/de/trait.Deserialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<'de, T> Deserialize<'de> for PoW<T>","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Config","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/implementors/serde/ser/trait.Serialize.js b/api-docs/pow_sha256/0.1.0/implementors/serde/ser/trait.Serialize.js new file mode 100644 index 0000000..adfc372 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/implementors/serde/ser/trait.Serialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Serialize for PoW<T>","synthetic":false,"types":[]},{"text":"impl Serialize for Config","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/implementors/std/panic/trait.RefUnwindSafe.js b/api-docs/pow_sha256/0.1.0/implementors/std/panic/trait.RefUnwindSafe.js new file mode 100644 index 0000000..ee487eb --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/implementors/std/panic/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> RefUnwindSafe for PoW<T> where
    T: RefUnwindSafe, 
","synthetic":true,"types":[]},{"text":"impl<T> RefUnwindSafe for PoWBuilder<T> where
    T: RefUnwindSafe, 
","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Config","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for ConfigBuilder","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/implementors/std/panic/trait.UnwindSafe.js b/api-docs/pow_sha256/0.1.0/implementors/std/panic/trait.UnwindSafe.js new file mode 100644 index 0000000..26e2c00 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/implementors/std/panic/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> UnwindSafe for PoW<T> where
    T: UnwindSafe, 
","synthetic":true,"types":[]},{"text":"impl<T> UnwindSafe for PoWBuilder<T> where
    T: UnwindSafe, 
","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Config","synthetic":true,"types":[]},{"text":"impl UnwindSafe for ConfigBuilder","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/light.css b/api-docs/pow_sha256/0.1.0/light.css new file mode 100644 index 0000000..fa73fe2 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/light.css @@ -0,0 +1 @@ + body{background-color:white;color:black;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.content .highlighted{color:#000 !important;background-color:#ccc;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted.trait{background-color:#c7b6ff;}.content .highlighted.traitalias{background-color:#c7b6ff;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.enum{background-color:#b4d1b9;}.content .highlighted.struct{background-color:#e7b1a0;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#c6afb3;}.content .highlighted.type{background-color:#ffc891;}.content .highlighted.foreigntype{background-color:#f5c4ff;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#8ce488;}.content .highlighted.constant,.content .highlighted.static{background-color:#c3e0ff;}.content .highlighted.primitive{background-color:#9aecff;}.content .highlighted.keyword{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}.collapse-toggle{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-focus:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;}.stab.portability>code{color:#000;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:#FDFFD3;border-right:3px solid #ffb44c;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#717171;}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results td span.alias{color:#000;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/main.js b/api-docs/pow_sha256/0.1.0/main.js new file mode 100644 index 0000000..03cfb2c --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/main.js @@ -0,0 +1,8 @@ +if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}function getSearchInput(){return document.getElementsByClassName("search-input")[0]}function getSearchElement(){return document.getElementById("search")}function getThemesElement(){return document.getElementById("theme-choices")}function getThemePickerElement(){return document.getElementById("theme-picker")}function focusSearchBar(){getSearchInput().focus()}function defocusSearchBar(){getSearchInput().blur()}(function(){"use strict";var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var disableShortcuts=getSettingValue("disable-shortcuts")==="true";var search_input=getSearchInput();var searchTimeout=null;var toggleAllDocsId="toggle-all-docs";var currentTab=0;var mouseMovedAfterSearch=true;var titleBeforeSearch=document.title;var searchTitle=null;function clearInputTimeout(){if(searchTimeout!==null){clearTimeout(searchTimeout);searchTimeout=null}}function getPageId(){if(window.location.hash){var tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}function showSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(main,"hidden");removeClass(search,"hidden");mouseMovedAfterSearch=false;document.title=searchTitle}function hideSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=titleBeforeSearch}var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function getQueryStringParams(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function isHidden(elem){return elem.offsetHeight===0}var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=getSearchElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){hideSearchResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(hash,"","?search=#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}elem=document.getElementById(savedHash.slice(1));if(!elem||!isHidden(elem)){return}var parent=elem.parentNode;if(parent&&hasClass(parent,"impl-items")){onEachLazy(parent.getElementsByClassName("collapsed"),function(e){if(e.parentNode===parent){e.click();return true}});if(isHidden(elem)){if(hasClass(parent.lastElementChild,"collapse-toggle")){parent.lastElementChild.click()}}}}}function highlightSourceLines(match,ev){if(typeof match==="undefined"){hideSidebar();match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to0){collapseDocs(collapses[0],"show")}}}}function getHelpElement(){buildHelperPopup();return document.getElementById("help")}function displayHelp(display,ev,help){help=help?help:getHelpElement();if(display===true){if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else if(hasClass(help,"hidden")===false){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}function handleEscape(ev){var help=getHelpElement();var search=getSearchElement();if(hasClass(help,"hidden")===false){displayHelp(false,ev,help)}else if(hasClass(search,"hidden")===false){clearInputTimeout();ev.preventDefault();hideSearchResults(search)}defocusSearchBar();hideThemeButtonState()}function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts===true){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();focusSearchBar();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:var themePicker=getThemePickerElement();if(themePicker.parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!=="theme-picker"){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!=="theme-picker"){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id==="theme-picker"&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}function findParentElement(elem,tagName){do{if(elem&&elem.tagName===tagName){return elem}elem=elem.parentNode}while(elem);return null}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function resetMouseMoved(ev){mouseMovedAfterSearch=true}document.addEventListener("mousemove",resetMouseMoved);var handleSourceHighlight=(function(){var prev_line_id=0;var set_fragment=function(name){var x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return function(ev){var cur_line_id=parseInt(ev.target.id,10);ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());document.addEventListener("click",function(ev){if(hasClass(ev.target,"help-button")){displayHelp(true,ev)}else if(hasClass(ev.target,"collapse-toggle")){collapseDocs(ev.target,"toggle")}else if(hasClass(ev.target.parentNode,"collapse-toggle")){collapseDocs(ev.target.parentNode,"toggle")}else if(ev.target.tagName==="SPAN"&&hasClass(ev.target.parentNode,"line-numbers")){handleSourceHighlight(ev)}else if(hasClass(getHelpElement(),"hidden")===false){var help=getHelpElement();var is_inside_help_popup=ev.target!==help&&help.contains(ev.target);if(is_inside_help_popup===false){addClass(help,"hidden");removeClass(document.body,"blur")}}else{var a=findParentElement(ev.target,"A");if(a&&a.hash){expandSection(a.hash.replace(/^#/,""))}}});(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=rootPath.match(/\.\.\//g).length+1;for(i=0;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;if(isType!==true||obj.type){var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnProperty(results,entry)){ar.push(results[entry])}}results=ar;var i;var nresults=results.length;for(i=0;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});var length=results.length;for(i=0;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function getObjectFromId(id){if(typeof id==="number"){return searchIndex[id]}return{'name':id}}function checkGenerics(obj,val){var lev_distance=MAX_LEV_DISTANCE+1;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var total=0;var done=0;var vlength=val.generics.length;for(var y=0;yGENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var allFound=true;for(var y=0;allFound===true&&yGENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch===true){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var length=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(aborted===false){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function generateId(ty){if(ty.parent&&ty.parent.name){return itemTypes[ty.ty]+ty.path+ty.parent.name+ty.name}return itemTypes[ty.ty]+ty.path+ty.name}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];var i;if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){for(i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i;var ty;var fullId;var returned;var in_args;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0;i1?paths.length-1:1);var lev;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=generateId(ty);if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||searchWords[j].replace(/_/g,"").indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=searchWords[j].replace(/_/g,"").indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){lev=MAX_LEV_DISTANCE+1}else{lev+=1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function initSearchNav(){var hoverTimeout;var click_func=function(e){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}var dst=e.target.getElementsByTagName("a");if(dst.length<1){return}dst=dst[0];if(window.location.pathname===dst.pathname){hideSearchResults();document.location.href=dst.href}};var mouseover_func=function(e){if(mouseMovedAfterSearch){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}clearTimeout(hoverTimeout);hoverTimeout=setTimeout(function(){onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){removeClass(i_e,"highlighted")})});addClass(el,"highlighted")},20)}};onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){i_e.onclick=click_func;i_e.onmouseover=mouseover_func})});search_input.onkeydown=function(e){var actives=[[],[],[]];var current=0;onEachLazy(document.getElementById("results").childNodes,function(e){onEachLazy(e.getElementsByClassName("highlighted"),function(h_e){actives[current].push(h_e)});current+=1});if(e.which===38){if(e.ctrlKey){printTab(currentTab>0?currentTab-1:2)}else{if(!actives[currentTab].length||!actives[currentTab][0].previousElementSibling){return}addClass(actives[currentTab][0].previousElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===40){if(e.ctrlKey){printTab(currentTab>1?0:currentTab+1)}else if(!actives[currentTab].length){var results=document.getElementById("results").childNodes;if(results.length>0){var res=results[currentTab].getElementsByClassName("result");if(res.length>0){addClass(res[0],"highlighted")}}}else if(actives[currentTab][0].nextElementSibling){addClass(actives[currentTab][0].nextElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===13){if(actives[currentTab].length){document.location.href=actives[currentTab][0].getElementsByTagName("a")[0].href}}else if(e.which===16){}else if(actives[currentTab].length>0){removeClass(actives[currentTab][0],"highlighted")}}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var splitPath=item.path.split("::");var enumName=splitPath.pop();path=splitPath.join("::");displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraStyle="";if(display===false){extraStyle=" style=\"display: none;\""}var output="";var duplicates={};var length=0;if(array.length>0){output="";array.forEach(function(item){var name,type;name=item.name;type=itemTypes[item.ty];if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}length+=1;output+=""});output+="
"+""+(item.is_alias===true?(""+item.alias+"  - see "):"")+item.displayPath+""+name+""+""+""+item.desc+" 
"}else{output="
No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:
"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(currentTab===tabNb){return""}return""}function showResults(results){var search=getSearchElement();if(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==getSearchLoadingText())){var elem=document.createElement("a");elem.href=results.others[0].href;elem.style.display="none";document.body.appendChild(elem);elem.click();return}var query=getQuery(search_input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var output="

Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"+ret_others[0]+ret_in_args[0]+ret_returned[0]+"
";search.innerHTML=output;showSearchResults(search);var tds=search.getElementsByTagName("td");var td_width=0;if(tds.length>0){td_width=tds[0].offsetWidth}var width=search.offsetWidth-40-td_width;onEachLazy(search.getElementsByClassName("desc"),function(e){e.style.width=width+"px"});initSearchNav();var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnProperty(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=getQueryStringParams();var query=getQuery(search_input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(forced!==true&&query.id===currentResults){if(query.query.length>0){putBackSearch(search_input)}return}searchTitle="Results for "+query.query+" - Rust";if(browserSupportsHistoryApi()){if(!history.state&&!params.search){history.pushState(query,"","?search="+encodeURIComponent(query.raw))}else{history.replaceState(query,"","?search="+encodeURIComponent(query.raw))}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates))}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i;var currentIndex=0;for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);searchIndex.push({crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,type:null,});currentIndex+=1;var items=rawSearchIndex[crate].i;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i0){search_input.value=params.search;search(e)}else{search_input.value="";hideSearchResults()}})}search()}index=buildIndex(rawSearchIndex);startSearch();if(rootPath==="../"||rootPath==="./"){var sidebar=document.getElementsByClassName("sidebar-elems")[0];if(sidebar){var div=document.createElement("div");div.className="block crate";div.innerHTML="

Crates

";var ul=document.createElement("ul");div.appendChild(ul);var crates=[];for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}crates.push(crate)}crates.sort();for(var i=0;i','`').replace('','`');return x.innerText}window.initSidebarItems=function(items){var sidebar=document.getElementsByClassName("sidebar-elems")[0];var current=window.sidebarCurrent;function block(shortty,longty){var filtered=items[shortty];if(!filtered){return}var div=document.createElement("div");div.className="block "+shortty;var h3=document.createElement("h3");h3.textContent=longty;div.appendChild(h3);var ul=document.createElement("ul");var length=filtered.length;for(var i=0;i"+""+"
"+code.outerHTML+"
";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function onEveryMatchingChild(elem,className,func){if(elem&&className&&func){var length=elem.childNodes.length;var nodes=elem.childNodes;for(var i=0;i"+labelForToggleButton(sectionIsCollapsed)+"
]";return toggle}function createToggle(toggle,otherMessage,fontSize,extraClass,show){var span=document.createElement("span");span.className="toggle-label";if(show){span.style.display="none"}if(!otherMessage){span.innerHTML=" Expand description"}else{span.innerHTML=otherMessage}if(fontSize){span.style.fontSize=fontSize}var mainToggle=toggle.cloneNode(true);mainToggle.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper";if(!show){addClass(wrapper,"collapsed");var inner=mainToggle.getElementsByClassName("inner");if(inner&&inner.length>0){inner[0].innerHTML="+"}}if(extraClass){addClass(wrapper,extraClass)}wrapper.appendChild(mainToggle);return wrapper}(function(){var toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}var toggle=createSimpleToggle(false);var hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";var hideImplementors=getSettingValue("auto-collapse-implementors")!=="false";var pageId=getPageId();var func=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(!next){return}if(hasClass(next,"docblock")){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideMethodDocs===true&&hasClass(e,"method")===true){collapseDocs(newToggle,"hide",pageId)}}};var funcImpl=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(next&&hasClass(next,"docblock")){next=next.nextElementSibling}if(!next){return}if(hasClass(e,"impl")&&(next.getElementsByClassName("method").length>0||next.getElementsByClassName("associatedconstant").length>0)){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideImplementors===true&&e.parentNode.id==="implementors-list"){collapseDocs(newToggle,"hide",pageId)}}};onEachLazy(document.getElementsByClassName("method"),func);onEachLazy(document.getElementsByClassName("associatedconstant"),func);onEachLazy(document.getElementsByClassName("impl"),funcImpl);var impl_call=function(){};if(hideMethodDocs===true){impl_call=function(e,newToggle){if(e.id.match(/^impl(?:-\d+)?$/)===null){if(hasClass(e,"impl")===true){collapseDocs(newToggle,"hide",pageId)}}}}var newToggle=document.createElement("a");newToggle.href="javascript:void(0)";newToggle.className="collapse-toggle hidden-default collapsed";newToggle.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items";function toggleClicked(){if(hasClass(this,"collapsed")){removeClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("hidden"),function(x){if(hasClass(x,"content")===false){removeClass(x,"hidden");addClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(false)+"] Hide undocumented items"}else{addClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("x"),function(x){if(hasClass(x,"content")===false){addClass(x,"hidden");removeClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items"}}onEachLazy(document.getElementsByClassName("impl-items"),function(e){onEachLazy(e.getElementsByClassName("associatedconstant"),func);var hiddenElems=e.getElementsByClassName("hidden");var needToggle=false;var hlength=hiddenElems.length;for(var i=0;i"+getSearchLoadingText()+"";showSearchResults(search)}var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")===true){hideSidebar()}else{showSidebar()}}}if(main){onEachLazy(main.getElementsByClassName("loading-content"),function(e){e.remove()});onEachLazy(main.childNodes,function(e){if(e.tagName==="H2"||e.tagName==="H3"){var nextTagName=e.nextElementSibling.tagName;if(nextTagName=="H2"||nextTagName=="H3"){e.nextElementSibling.style.display="flex"}else{e.nextElementSibling.style.display="block"}}})}function enableSearchInput(){if(search_input){search_input.removeAttribute('disabled')}}window.addSearchOptions=function(crates){var elem=document.getElementById("crate-search");if(!elem){enableSearchInput();return}var crates_text=[];if(Object.keys(crates).length>1){for(var crate in crates){if(hasOwnProperty(crates,crate)){crates_text.push(crate)}}}crates_text.sort(function(a,b){var lower_a=a.toLowerCase();var lower_b=b.toLowerCase();if(lower_alower_b){return 1}return 0});var savedCrate=getSettingValue("saved-filter-crate");for(var i=0;ithe rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["ctrl + ↑ / ↓","Switch result tab"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>(index&1)===0?""+y+"":y).join("")+"
"+x[1]+"
").join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";var infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + * -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ + str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);popup.appendChild(container);insertAfter(popup,getSearchElement());buildHelperPopup=function(){}}onHashChange(null);window.onhashchange=onHashChange}());window.onunload=function(){} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/normalize.css b/api-docs/pow_sha256/0.1.0/normalize.css new file mode 100644 index 0000000..6d692b5 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/normalize.css @@ -0,0 +1,2 @@ + /*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/noscript.css b/api-docs/pow_sha256/0.1.0/noscript.css new file mode 100644 index 0000000..5cbcb90 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/noscript.css @@ -0,0 +1 @@ + #main>h2+div,#main>h2+h3,#main>h3+div{display:block;}.loading-content{display:none;}#main>h2+div,#main>h3+div{display:block;}#main>h2+h3{display:flex;}#main .impl-items .hidden{display:block !important;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/pow_sha256/all.html b/api-docs/pow_sha256/0.1.0/pow_sha256/all.html new file mode 100644 index 0000000..a672840 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/pow_sha256/all.html @@ -0,0 +1,6 @@ +List of all items in this crate + +

[] + + List of all items

Structs

\ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/pow_sha256/index.html b/api-docs/pow_sha256/0.1.0/pow_sha256/index.html new file mode 100644 index 0000000..5963e22 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/pow_sha256/index.html @@ -0,0 +1,32 @@ +pow_sha256 - Rust + +

[][src]Crate pow_sha256

MCaptch's SHA256 based Proof of Work library

+

Example:

+
+  use pow_sha256::{ConfigBuilder, PoW};
+
+  fn main() {
+      let config = ConfigBuilder::default()
+        .salt("myrandomsaltisnotlongenoug".into())
+        .build()
+        .unwrap();
+
+      let phrase = "ironmansucks";
+
+      const DIFFICULTY: u128 = u128::MAX / 32;
+
+      let work = config.prove_work(&phrase, DIFFICULTY).unwrap();
+      assert!(config.calculate(&work, &phrase).unwrap() >= DIFFICULTY);
+      assert!(config.is_valid_proof(&work, &phrase));
+      assert!(config.is_sufficient_difficulty(&work, DIFFICULTY));
+  }    
+

Structs

+
Config

Configuration for generting proof of work +Please choose a long, unique value for salt +Resistance to dictionary/rainbow attacks depend on uniqueness +of the salt

+
ConfigBuilder

Builder for Config.

+
PoW

Proof of Work over concrete type T. T can be any type that implements serde::Serialize.

+
PoWBuilder

Builder for PoW.

+
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/pow_sha256/sidebar-items.js b/api-docs/pow_sha256/0.1.0/pow_sha256/sidebar-items.js new file mode 100644 index 0000000..320b71c --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/pow_sha256/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Config","Configuration for generting proof of work Please choose a long, unique value for salt Resistance to dictionary/rainbow attacks depend on uniqueness of the salt"],["ConfigBuilder","Builder for `Config`."],["PoW","Proof of Work over concrete type T. T can be any type that implements serde::Serialize."],["PoWBuilder","Builder for `PoW`."]]}); \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/pow_sha256/struct.Config.html b/api-docs/pow_sha256/0.1.0/pow_sha256/struct.Config.html new file mode 100644 index 0000000..f2f4126 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/pow_sha256/struct.Config.html @@ -0,0 +1,46 @@ +pow_sha256::Config - Rust + +

[][src]Struct pow_sha256::Config

pub struct Config {
+    pub salt: String,
+}

Configuration for generting proof of work +Please choose a long, unique value for salt +Resistance to dictionary/rainbow attacks depend on uniqueness +of the salt

+

+ Fields

salt: String

Implementations

impl Config[src]

pub fn prove_work<T>(&self, t: &T, difficulty: u128) -> Result<PoW<T>> where
    T: Serialize
[src]

Create Proof of Work over item of type T.

+

Make sure difficulty is not too high. A 64 bit difficulty, +for example, takes a long time on a general purpose processor. +Returns bincode::Error if serialization fails.

+

pub fn prove_work_serialized<T>(
    &self,
    prefix: &[u8],
    difficulty: u128
) -> PoW<T> where
    T: Serialize
[src]

Create Proof of Work on an already serialized item of type T. +The input is assumed to be serialized using network byte order.

+

Make sure difficulty is not too high. A 64 bit difficulty, +for example, takes a long time on a general purpose processor.

+

pub fn calculate<T>(&self, pow: &PoW<T>, t: &T) -> Result<u128> where
    T: Serialize
[src]

Calculate the PoW score with the provided input T.

+

pub fn calculate_serialized<T>(&self, pow: &PoW<T>, target: &[u8]) -> u128 where
    T: Serialize
[src]

Calculate the PoW score of an already serialized T and self. +The input is assumed to be serialized using network byte order.

+

pub fn is_valid_proof<T>(&self, pow: &PoW<T>, t: &T) -> bool where
    T: Serialize
[src]

Verifies that the PoW is indeed generated out of the phrase provided.

+

pub fn is_sufficient_difficulty<T>(
    &self,
    pow: &PoW<T>,
    target_diff: u128
) -> bool where
    T: Serialize
[src]

Checks if the PoW result is of sufficient difficulty

+

Trait Implementations

impl Clone for Config[src]

impl Debug for Config[src]

impl<'de> Deserialize<'de> for Config[src]

impl PartialEq<Config> for Config[src]

impl Serialize for Config[src]

impl StructuralPartialEq for Config[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/pow_sha256/struct.ConfigBuilder.html b/api-docs/pow_sha256/0.1.0/pow_sha256/struct.ConfigBuilder.html new file mode 100644 index 0000000..a84118f --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/pow_sha256/struct.ConfigBuilder.html @@ -0,0 +1,25 @@ +pow_sha256::ConfigBuilder - Rust + +

[][src]Struct pow_sha256::ConfigBuilder

pub struct ConfigBuilder { /* fields omitted */ }

Builder for Config.

+

Implementations

impl ConfigBuilder[src]

pub fn salt(&mut self, value: String) -> &mut Self[src]

pub fn build(&self) -> Result<Config, String>[src]

Builds a new Config.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for ConfigBuilder[src]

impl Default for ConfigBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/pow_sha256/struct.PoW.html b/api-docs/pow_sha256/0.1.0/pow_sha256/struct.PoW.html new file mode 100644 index 0000000..0a6d705 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/pow_sha256/struct.PoW.html @@ -0,0 +1,32 @@ +pow_sha256::PoW - Rust + +

[][src]Struct pow_sha256::PoW

pub struct PoW<T> {
+    pub nonce: u64,
+    pub result: String,
+    // some fields omitted
+}

Proof of Work over concrete type T. T can be any type that implements serde::Serialize.

+

+ Fields

nonce: u64result: String

Trait Implementations

impl<T: Clone> Clone for PoW<T>[src]

impl<T: Debug> Debug for PoW<T>[src]

impl<'de, T> Deserialize<'de> for PoW<T>[src]

impl<T: PartialEq> PartialEq<PoW<T>> for PoW<T>[src]

impl<T> Serialize for PoW<T>[src]

impl<T> StructuralPartialEq for PoW<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for PoW<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for PoW<T> where
    T: Send
[src]

impl<T> Sync for PoW<T> where
    T: Sync
[src]

impl<T> Unpin for PoW<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for PoW<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/pow_sha256/struct.PoWBuilder.html b/api-docs/pow_sha256/0.1.0/pow_sha256/struct.PoWBuilder.html new file mode 100644 index 0000000..b3673e0 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/pow_sha256/struct.PoWBuilder.html @@ -0,0 +1,25 @@ +pow_sha256::PoWBuilder - Rust + +

[][src]Struct pow_sha256::PoWBuilder

pub struct PoWBuilder<T> { /* fields omitted */ }

Builder for PoW.

+

Implementations

impl<T: Clone> PoWBuilder<T>[src]

pub fn nonce(&mut self, value: u64) -> &mut Self[src]

pub fn result(&mut self, value: String) -> &mut Self[src]

pub fn build(&self) -> Result<PoW<T>, String>[src]

Builds a new PoW.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl<T: Clone> Clone for PoWBuilder<T>[src]

impl<T: Default> Default for PoWBuilder<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for PoWBuilder<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for PoWBuilder<T> where
    T: Send
[src]

impl<T> Sync for PoWBuilder<T> where
    T: Sync
[src]

impl<T> Unpin for PoWBuilder<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for PoWBuilder<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/rust-logo.png b/api-docs/pow_sha256/0.1.0/rust-logo.png new file mode 100644 index 0000000..74b4bd6 Binary files /dev/null and b/api-docs/pow_sha256/0.1.0/rust-logo.png differ diff --git a/api-docs/pow_sha256/0.1.0/rustdoc.css b/api-docs/pow_sha256/0.1.0/rustdoc.css new file mode 100644 index 0000000..757de19 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/rustdoc.css @@ -0,0 +1 @@ + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff") format('woff');}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:400;src:local('Source Serif Pro'),url("SourceSerifPro-Regular.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:italic;font-weight:400;src:local('Source Serif Pro Italic'),url("SourceSerifPro-It.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:700;src:local('Source Serif Pro Bold'),url("SourceSerifPro-Bold.ttf.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.woff") format('woff');}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif Pro",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.notable),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{border-bottom:1px dashed;margin-top:0;}h1.fqn>.in-band>a:hover{text-decoration:underline;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border-bottom:1px solid;}h3.impl,h3.method,h4.method,h3.type,h4.type,h4.associatedconstant{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}h3.impl,h3.method,h3.type{padding-left:15px;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.content table td:first-child>a,.collapse-toggle,div.item-list .out-of-band,#source-sidebar,#sidebar-toggle{font-family:"Fira Sans",sans-serif;}.content ul.crate a.crate{font:16px/1.6 "Fira Sans";}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}code,pre,a.test-arrow{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code,.docblock code.spotlight{padding:0;}.docblock code.spotlight :last-child{padding-bottom:0.6em;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;min-width:70em;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-child{font-weight:500;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{margin-top:0;margin-bottom:8px;text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc:not(.source) .example-wrap{display:inline-flex;margin-bottom:10px;position:relative;}.example-wrap{width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;border-top-left-radius:5px;border-bottom-left-radius:5px;padding:13px 8px;text-align:right;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results{position:absolute;right:0;left:0;overflow:auto;}#results>table{width:100%;table-layout:fixed;margin-bottom:40px;}.content pre.line-numbers{float:left;border:none;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock code,.docblock-short code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}#main>.docblock h1{font-size:1.3em;}#main>.docblock h2{font-size:1.15em;}#main>.docblock h3,#main>.docblock h4,#main>.docblock h5{font-size:1em;}#main>h2+div,#main>h2+h3,#main>h3+div{display:none;flex-wrap:wrap;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{float:right;font-size:23px;margin:0px;padding:0px;font-weight:normal;}h3.impl>.out-of-band{font-size:21px;}h4.method>.out-of-band{font-size:19px;}h4>code,h3>code,.invisible>code{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{margin:0px;padding:0px;}.in-band>code{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content .method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items>h4{border-bottom:0;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.toggle-wrapper.marg-left>.collapse-toggle{left:-24px;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;margin-top:-13px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:-6px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,h4>code+.srclink,h3>code+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results .desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results a{display:block;}.content .search-results td:first-child{padding-right:0;width:50%;}.content .search-results td:first-child a{padding-right:10px;}.content .search-results td:first-child a:after{clear:both;content:"";display:block;}.content .search-results td:first-child a span{float:left;}tr.result span.primitive::after{content:' (primitive type)';font-style:italic;}tr.result span.keyword::after{content:' (keyword)';font-style:italic;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;}#help>div>span{text-align:center;display:block;margin:10px 0;font-size:18px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.module-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since,.methods .since{flex-grow:0;padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code,.methods code{flex-grow:1;}.impl-items h4,h4.impl,h3.impl,.methods h3{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.collapse-toggle{font-weight:300;position:absolute;left:-23px;top:0;}h3>.collapse-toggle,h4>.collapse-toggle{font-size:0.8em;top:5px;}.toggle-wrapper>.collapse-toggle{left:-24px;margin-top:0px;}.toggle-wrapper{position:relative;margin-top:0;}.toggle-wrapper.collapsed{height:25px;transition:height .2s;margin-bottom:.6em;}.collapse-toggle>.inner{display:inline-block;width:1.2ch;text-align:center;}.collapse-toggle.hidden-default{position:relative;margin-left:20px;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.toggle-wrapper>.collapse-toggle{left:0;}.variant+.toggle-wrapper+.docblock>p{margin-top:5px;}.sub-variant,.sub-variant>h3{margin-top:1px !important;}#main>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.enum>.toggle-wrapper+.docblock,.struct>.toggle-wrapper+.docblock{margin-left:30px;margin-bottom:20px;margin-top:5px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}.enum>.collapsed,.struct>.collapsed{margin-bottom:25px;}#main>.variant,#main>.structfield{display:block;}.attributes{display:block;margin-top:0px !important;margin-right:0px;margin-bottom:0px !important;margin-left:30px;}.toggle-attributes.collapsed{margin-bottom:0;}.impl-items>.toggle-attributes{margin-left:20px;}.impl-items .attributes{font-weight:500;}:target>code{opacity:1;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}h4>.notable-traits{position:absolute;left:-44px;top:2px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,.help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}.help-button{right:30px;font-family:"Fira Sans",sans-serif;text-align:center;font-size:17px;}#theme-picker,#settings-menu,.help-button{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}@media (min-width:701px){.information:first-child>.tooltip{margin-top:16px;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;left:0;top:45px;bottom:0;overflow-y:auto;border-right:1px solid;display:none;}.sidebar>.block.version{border-bottom:none;margin-top:12px;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main{margin-top:45px;padding:0;}.content .in-band{width:100%;}.content h4>.out-of-band{position:inherit;}.toggle-wrapper>.collapse-toggle{left:0px;}.toggle-wrapper{height:1.5em;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{display:flex;}.anchor{display:none !important;}h1.fqn{overflow:initial;}.theme-picker{left:10px;top:54px;z-index:1;}h4>.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar{width:calc(100% + 30px);}.show-it{display:block;width:246px;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}.collapse-toggle{left:-20px;}.impl>.collapse-toggle{left:-10px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}.help-button{display:none;}.search-container>div{width:calc(100% - 32px);}}@media print{nav.sub,.content .out-of-band,.collapse-toggle{display:none;}}@media (max-width:416px){#titles,#titles>button{height:73px;}#main{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}}h3.notable{margin:0;margin-bottom:13px;font-size:19px;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}.type-decl>pre>.toggle-wrapper.toggle-attributes.top-attr{margin-left:0 !important;}.type-decl>pre>.docblock.attributes.top-attr{margin-left:1.8em !important;}.type-decl>pre>.toggle-attributes{margin-left:2.2em;}.type-decl>pre>.docblock.attributes{margin-left:4em;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/search-index.js b/api-docs/pow_sha256/0.1.0/search-index.js new file mode 100644 index 0000000..7853d7d --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/search-index.js @@ -0,0 +1,4 @@ +var searchIndex = JSON.parse('{\ +"pow_sha256":{"doc":"MCaptch\'s SHA256 based Proof of Work library","i":[[3,"PoW","pow_sha256","Proof of Work over concrete type T. T can be any type …",null,null],[12,"nonce","","",0,null],[12,"result","","",0,null],[3,"PoWBuilder","","Builder for PoW.",null,null],[11,"nonce","","",1,[[]]],[11,"result","","",1,[[["string",3]]]],[11,"build","","Builds a new PoW.",1,[[],[["string",3],["result",4],["pow",3]]]],[3,"Config","","Configuration for generting proof of work Please choose a …",null,null],[12,"salt","","",2,null],[3,"ConfigBuilder","","Builder for Config.",null,null],[11,"salt","","",3,[[["string",3]]]],[11,"build","","Builds a new Config.",3,[[],[["result",4],["config",3],["string",3]]]],[11,"prove_work","","Create Proof of Work over item of type T.",2,[[],[["result",6],["pow",3]]]],[11,"prove_work_serialized","","Create Proof of Work on an already serialized item of …",2,[[],["pow",3]]],[11,"calculate","","Calculate the PoW score with the provided input T.",2,[[["pow",3]],["result",6]]],[11,"calculate_serialized","","Calculate the PoW score of an already serialized T and …",2,[[["pow",3]]]],[11,"is_valid_proof","","Verifies that the PoW is indeed generated out of the …",2,[[["pow",3]]]],[11,"is_sufficient_difficulty","","Checks if the PoW result is of sufficient difficulty",2,[[["pow",3]]]],[11,"from","","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"from","","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_owned","","",1,[[]]],[11,"clone_into","","",1,[[]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"from","","",2,[[]]],[11,"into","","",2,[[]]],[11,"to_owned","","",2,[[]]],[11,"clone_into","","",2,[[]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"from","","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"clone","","",1,[[],["powbuilder",3]]],[11,"clone","","",0,[[],["pow",3]]],[11,"clone","","",3,[[],["configbuilder",3]]],[11,"clone","","",2,[[],["config",3]]],[11,"default","","",1,[[],["powbuilder",3]]],[11,"default","","",3,[[],["configbuilder",3]]],[11,"eq","","",0,[[["pow",3]]]],[11,"ne","","",0,[[["pow",3]]]],[11,"eq","","",2,[[["config",3]]]],[11,"ne","","",2,[[["config",3]]]],[11,"fmt","","",0,[[["formatter",3]],["result",6]]],[11,"fmt","","",2,[[["formatter",3]],["result",6]]],[11,"serialize","","",0,[[],["result",4]]],[11,"serialize","","",2,[[],["result",4]]],[11,"deserialize","","",0,[[],["result",4]]],[11,"deserialize","","",2,[[],["result",4]]]],"p":[[3,"PoW"],[3,"PoWBuilder"],[3,"Config"],[3,"ConfigBuilder"]]}\ +}'); +addSearchOptions(searchIndex);initSearch(searchIndex); \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/settings.css b/api-docs/pow_sha256/0.1.0/settings.css new file mode 100644 index 0000000..6709865 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/settings.css @@ -0,0 +1 @@ +.setting-line{padding:5px;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.select-wrapper{float:right;position:relative;height:27px;min-width:25%;}.select-wrapper select{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:2px solid #ccc;padding-right:28px;width:100%;}.select-wrapper img{pointer-events:none;position:absolute;right:0;bottom:0;background:#ccc;height:100%;width:28px;padding:0px 4px;}.select-wrapper select option{color:initial;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/settings.html b/api-docs/pow_sha256/0.1.0/settings.html new file mode 100644 index 0000000..334fa30 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/settings.html @@ -0,0 +1,6 @@ +Rustdoc settings + +

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
+
Auto-hide item declarations
Auto-hide structs declaration
Auto-hide enums declaration
Auto-hide unions declaration
Auto-hide traits declaration
Auto-hide macros declaration
+
Auto-hide item attributes.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Auto-hide implementors of a trait
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/settings.js b/api-docs/pow_sha256/0.1.0/settings.js new file mode 100644 index 0000000..b4d6fdc --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/settings.js @@ -0,0 +1 @@ +(function(){function changeSetting(settingName,value){updateLocalStorage("rustdoc-"+settingName,value);switch(settingName){case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function setEvents(){onEachLazy(document.getElementsByClassName("slider"),function(elem){var toggle=elem.previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(document.getElementsByClassName("select-wrapper"),function(elem){var select=elem.getElementsByTagName("select")[0];var settingId=select.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}})}window.addEventListener("DOMContentLoaded",setEvents)})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/source-files.js b/api-docs/pow_sha256/0.1.0/source-files.js new file mode 100644 index 0000000..c682f6c --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/source-files.js @@ -0,0 +1,3 @@ +var N = null;var sourcesIndex = {}; +sourcesIndex["pow_sha256"] = {"name":"","files":["lib.rs"]}; +createSourceSidebar(); diff --git a/api-docs/pow_sha256/0.1.0/source-script.js b/api-docs/pow_sha256/0.1.0/source-script.js new file mode 100644 index 0000000..de663ca --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/source-script.js @@ -0,0 +1 @@ +function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0;i"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(window.rootPath.endsWith("/")===false){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/src/pow_sha256/lib.rs.html b/api-docs/pow_sha256/0.1.0/src/pow_sha256/lib.rs.html new file mode 100644 index 0000000..cde02f0 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/src/pow_sha256/lib.rs.html @@ -0,0 +1,438 @@ +lib.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+
+//! MCaptch's SHA256 based Proof of Work library
+//!
+//! # Example:
+//! ```rust
+//!   use pow_sha256::{ConfigBuilder, PoW};
+//!
+//!   fn main() {
+//!       let config = ConfigBuilder::default()
+//!         .salt("myrandomsaltisnotlongenoug".into())
+//!         .build()
+//!         .unwrap();
+//!
+//!       let phrase = "ironmansucks";
+//!
+//!       const DIFFICULTY: u128 = u128::MAX / 32;
+//!
+//!       let work = config.prove_work(&phrase, DIFFICULTY).unwrap();
+//!       assert!(config.calculate(&work, &phrase).unwrap() >= DIFFICULTY);
+//!       assert!(config.is_valid_proof(&work, &phrase));
+//!       assert!(config.is_sufficient_difficulty(&work, DIFFICULTY));
+//!   }    
+//! ```
+
+use std::marker::PhantomData;
+
+use derive_builder::Builder;
+use serde::{Deserialize, Serialize};
+use sha2::{Digest, Sha256};
+
+/// Proof of Work over concrete type T. T can be any type that implements serde::Serialize.
+#[derive(Serialize, Builder, Deserialize, PartialEq, Clone, Debug)]
+pub struct PoW<T> {
+    pub nonce: u64,
+    pub result: String,
+    #[builder(default = "PhantomData", setter(skip))]
+    _spook: PhantomData<T>,
+}
+
+/// Configuration for generting proof of work
+/// Please choose a long, unique value for salt
+/// Resistance to dictionary/rainbow attacks depend on uniqueness
+/// of the salt
+#[derive(Serialize, Deserialize, Builder, PartialEq, Clone, Debug)]
+pub struct Config {
+    pub salt: String,
+}
+
+impl Config {
+    /// Create Proof of Work over item of type T.
+    ///
+    /// Make sure difficulty is not too high. A 64 bit difficulty,
+    /// for example, takes a long time on a general purpose processor.
+    /// Returns bincode::Error if serialization fails.
+    pub fn prove_work<T>(&self, t: &T, difficulty: u128) -> bincode::Result<PoW<T>>
+    where
+        T: Serialize,
+    {
+        bincode::serialize(t).map(|v| self.prove_work_serialized(&v, difficulty))
+    }
+
+    /// Create Proof of Work on an already serialized item of type T.
+    /// The input is assumed to be serialized using network byte order.
+    ///
+    /// Make sure difficulty is not too high. A 64 bit difficulty,
+    /// for example, takes a long time on a general purpose processor.
+    pub fn prove_work_serialized<T>(&self, prefix: &[u8], difficulty: u128) -> PoW<T>
+    where
+        T: Serialize,
+    {
+        let prefix_sha = Sha256::new().chain(&self.salt).chain(prefix);
+        let mut n = 0;
+        let mut result = 0;
+        while result < difficulty {
+            n += 1;
+            result = score(prefix_sha.clone(), n);
+        }
+        PoW {
+            nonce: n,
+            result: result.to_string(),
+            _spook: PhantomData,
+        }
+    }
+
+    /// Calculate the PoW score with the provided input T.
+    pub fn calculate<T>(&self, pow: &PoW<T>, t: &T) -> bincode::Result<u128>
+    where
+        T: Serialize,
+    {
+        bincode::serialize(t).map(|v| self.calculate_serialized(pow, &v))
+    }
+
+    /// Calculate the PoW score of an already serialized T and self.
+    /// The input is assumed to be serialized using network byte order.
+    pub fn calculate_serialized<T>(&self, pow: &PoW<T>, target: &[u8]) -> u128
+    where
+        T: Serialize,
+    {
+        score(Sha256::new().chain(&self.salt).chain(target), pow.nonce)
+    }
+
+    /// Verifies that the PoW is indeed generated out of the phrase provided.
+    pub fn is_valid_proof<T>(&self, pow: &PoW<T>, t: &T) -> bool
+    where
+        T: Serialize,
+    {
+        match self.calculate(pow, t) {
+            Ok(res) => {
+                return if pow.result == res.to_string() {
+                    true
+                } else {
+                    false
+                }
+            }
+            Err(_) => return false,
+        }
+    }
+
+    /// Checks if the PoW result is of sufficient difficulty
+    pub fn is_sufficient_difficulty<T>(&self, pow: &PoW<T>, target_diff: u128) -> bool
+    where
+        T: Serialize,
+    {
+        match pow.result.parse::<u128>() {
+            Ok(res) => return res >= target_diff,
+            Err(_) => return false,
+        }
+    }
+}
+
+fn score(prefix_sha: Sha256, nonce: u64) -> u128 {
+    first_bytes_as_u128(
+        prefix_sha
+            .chain(&nonce.to_be_bytes()) // to_be_bytes() converts to network endian
+            .finalize()
+            .as_slice(),
+    )
+}
+
+/// # Panics
+///
+/// panics if inp.len() < 16
+fn first_bytes_as_u128(inp: &[u8]) -> u128 {
+    bincode::deserialize(&inp).unwrap()
+}
+
+#[cfg(test)]
+mod test {
+    use super::*;
+
+    const DIFFICULTY: u128 = 0xff000000000000000000000000000000;
+
+    fn get_config() -> Config {
+        ConfigBuilder::default()
+            .salt(
+                "79ziepia7vhjgviiwjhnend3ofjqocsi2winc4ptqhmkvcajihywxcizewvckg9h6gs4j83v9".into(),
+            )
+            .build()
+            .unwrap()
+    }
+
+    #[test]
+    fn base_functionality() {
+        // Let's prove we did work targeting a phrase.
+        let phrase = b"Ex nihilo nihil fit.".to_vec();
+        let config = get_config();
+        let pw = config.prove_work(&phrase, DIFFICULTY).unwrap();
+        assert!(config.calculate(&pw, &phrase).unwrap() >= DIFFICULTY);
+        assert!(config.is_valid_proof(&pw, &phrase));
+        assert!(config.is_sufficient_difficulty(&pw, DIFFICULTY));
+    }
+
+    #[test]
+    fn double_pow() {
+        let phrase = "Ex nihilo nihil fit.".to_owned();
+        let config = get_config();
+
+        let pw = config.prove_work(&phrase, DIFFICULTY).unwrap();
+        let pwpw = config.prove_work(&pw, DIFFICULTY).unwrap();
+
+        assert!(config.calculate(&pw, &phrase).unwrap() >= DIFFICULTY);
+        assert!(config.is_valid_proof(&pw, &phrase));
+        assert!(config.is_sufficient_difficulty(&pw, DIFFICULTY));
+
+        assert!(config.calculate(&pwpw, &pw).unwrap() >= DIFFICULTY);
+        assert!(config.is_valid_proof(&pwpw, &pw));
+        assert!(config.is_sufficient_difficulty(&pwpw, DIFFICULTY));
+    }
+
+    #[test]
+    fn is_not_valid_proof() {
+        let phrase = "Ex nihilo nihil fit.".to_owned();
+        let phrase2 = "Omne quod movetur ab alio movetur.".to_owned();
+
+        let config = get_config();
+        let pw = config.prove_work(&phrase, DIFFICULTY).unwrap();
+
+        let pw2 = config.prove_work(&phrase2, DIFFICULTY).unwrap();
+
+        assert!(!config.is_valid_proof(&pw, &phrase2));
+        assert!(!config.is_valid_proof(&pw2, &phrase));
+    }
+
+    #[test]
+    fn serialization_test() {
+        let target: u8 = 1;
+        let config = get_config();
+        let pw = config.prove_work(&target, DIFFICULTY).unwrap();
+
+        let message: (u8, PoW<u8>) = (target, pw);
+        let message_ser = bincode::serialize(&message).unwrap();
+        let recieved_message: (u8, PoW<u8>) = bincode::deserialize(&message_ser).unwrap();
+        assert_eq!(recieved_message, message);
+        assert!(config.is_sufficient_difficulty(&message.1, DIFFICULTY));
+        assert!(config.is_valid_proof(&message.1, &target));
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/storage.js b/api-docs/pow_sha256/0.1.0/storage.js new file mode 100644 index 0000000..318275e --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/storage.js @@ -0,0 +1 @@ +var resourcesSuffix="";var darkThemes=["dark","ayu"];var currentTheme=document.getElementById("themeStyle");var mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed!==true){for(i=0;i=0;--i){if(func(arr[i])===true){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function hasOwnProperty(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function usableLocalStorage(){if(typeof Storage==="undefined"){return false}try{return window.localStorage!==null&&window.localStorage!==undefined}catch(err){return false}}function updateLocalStorage(name,value){if(usableLocalStorage()){localStorage[name]=value}else{}}function getCurrentValue(name){if(usableLocalStorage()&&localStorage[name]!==undefined){return localStorage[name]}return null}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){var fullBasicCss="rustdoc"+resourcesSuffix+".css";var fullNewTheme=newTheme+resourcesSuffix+".css";var newHref=mainStyleElem.href.replace(fullBasicCss,fullNewTheme);if(saveTheme===true){updateLocalStorage("rustdoc-theme",newTheme)}if(styleElem.href===newHref){return}var found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),function(el){savedHref.push(el.href)})}onEach(savedHref,function(el){if(el===newHref){found=true;return true}});if(found===true){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("rustdoc-use-system-theme",value);var toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}var updateSystemTheme=(function(){if(!window.matchMedia){return function(){let cssTheme=getComputedStyle(document.documentElement).getPropertyValue('content');switchTheme(currentTheme,mainTheme,JSON.parse(cssTheme)||light,true)}}var mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){if(getSettingValue("use-system-theme")!=="false"){var lightTheme=getSettingValue("preferred-light-theme")||"light";var darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){switchTheme(currentTheme,mainTheme,darkTheme,true)}else{switchTheme(currentTheme,mainTheme,lightTheme,true)}}}mql.addListener(handlePreferenceChange);return function(){handlePreferenceChange(mql)}})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(currentTheme,mainTheme,getSettingValue("theme")||"light",false)} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/theme.js b/api-docs/pow_sha256/0.1.0/theme.js new file mode 100644 index 0000000..8f9c49a --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/theme.js @@ -0,0 +1 @@ +var themes=document.getElementById("theme-choices");var themePicker=document.getElementById("theme-picker");function showThemeButtonState(){themes.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){themes.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}function switchThemeButtonState(){if(themes.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}};function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!=="theme-picker"&&(!active.parentNode||active.parentNode.id!=="theme-choices")&&(!related||(related.id!=="theme-picker"&&(!related.parentNode||related.parentNode.id!=="theme-choices")))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;["ayu","dark","light"].forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(el){switchTheme(currentTheme,mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themes.appendChild(but)}) \ No newline at end of file diff --git a/api-docs/pow_sha256/0.1.0/wheel.svg b/api-docs/pow_sha256/0.1.0/wheel.svg new file mode 100644 index 0000000..01da3b2 --- /dev/null +++ b/api-docs/pow_sha256/0.1.0/wheel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/COPYRIGHT.txt b/api-docs/pow_sha256/0.2.0/COPYRIGHT.txt new file mode 100644 index 0000000..af77776 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/COPYRIGHT.txt @@ -0,0 +1,45 @@ +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif Pro (SourceSerifPro-Regular.ttf.woff, + SourceSerifPro-Bold.ttf.woff, SourceSerifPro-It.ttf.woff): + + Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with + Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of + Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerifPro-LICENSE.txt. + +This copyright file is intended to be distributed with rustdoc output. diff --git a/api-docs/pow_sha256/0.2.0/FiraSans-LICENSE.txt b/api-docs/pow_sha256/0.2.0/FiraSans-LICENSE.txt new file mode 100644 index 0000000..d444ea9 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/FiraSans-LICENSE.txt @@ -0,0 +1,94 @@ +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/pow_sha256/0.2.0/FiraSans-Medium.woff b/api-docs/pow_sha256/0.2.0/FiraSans-Medium.woff new file mode 100644 index 0000000..7d742c5 Binary files /dev/null and b/api-docs/pow_sha256/0.2.0/FiraSans-Medium.woff differ diff --git a/api-docs/pow_sha256/0.2.0/FiraSans-Regular.woff b/api-docs/pow_sha256/0.2.0/FiraSans-Regular.woff new file mode 100644 index 0000000..d8e0363 Binary files /dev/null and b/api-docs/pow_sha256/0.2.0/FiraSans-Regular.woff differ diff --git a/api-docs/pow_sha256/0.2.0/LICENSE-APACHE.txt b/api-docs/pow_sha256/0.2.0/LICENSE-APACHE.txt new file mode 100644 index 0000000..16fe87b --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/LICENSE-APACHE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/api-docs/pow_sha256/0.2.0/LICENSE-MIT.txt b/api-docs/pow_sha256/0.2.0/LICENSE-MIT.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/LICENSE-MIT.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/api-docs/pow_sha256/0.2.0/SourceCodePro-LICENSE.txt b/api-docs/pow_sha256/0.2.0/SourceCodePro-LICENSE.txt new file mode 100644 index 0000000..0754257 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/SourceCodePro-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/pow_sha256/0.2.0/SourceCodePro-Regular.woff b/api-docs/pow_sha256/0.2.0/SourceCodePro-Regular.woff new file mode 100644 index 0000000..5576670 Binary files /dev/null and b/api-docs/pow_sha256/0.2.0/SourceCodePro-Regular.woff differ diff --git a/api-docs/pow_sha256/0.2.0/SourceCodePro-Semibold.woff b/api-docs/pow_sha256/0.2.0/SourceCodePro-Semibold.woff new file mode 100644 index 0000000..ca972a1 Binary files /dev/null and b/api-docs/pow_sha256/0.2.0/SourceCodePro-Semibold.woff differ diff --git a/api-docs/pow_sha256/0.2.0/SourceSerifPro-Bold.ttf.woff b/api-docs/pow_sha256/0.2.0/SourceSerifPro-Bold.ttf.woff new file mode 100644 index 0000000..ca25431 Binary files /dev/null and b/api-docs/pow_sha256/0.2.0/SourceSerifPro-Bold.ttf.woff differ diff --git a/api-docs/pow_sha256/0.2.0/SourceSerifPro-It.ttf.woff b/api-docs/pow_sha256/0.2.0/SourceSerifPro-It.ttf.woff new file mode 100644 index 0000000..a287bbe Binary files /dev/null and b/api-docs/pow_sha256/0.2.0/SourceSerifPro-It.ttf.woff differ diff --git a/api-docs/pow_sha256/0.2.0/SourceSerifPro-LICENSE.md b/api-docs/pow_sha256/0.2.0/SourceSerifPro-LICENSE.md new file mode 100644 index 0000000..22cb755 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/SourceSerifPro-LICENSE.md @@ -0,0 +1,93 @@ +Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/pow_sha256/0.2.0/SourceSerifPro-Regular.ttf.woff b/api-docs/pow_sha256/0.2.0/SourceSerifPro-Regular.ttf.woff new file mode 100644 index 0000000..a3d55cf Binary files /dev/null and b/api-docs/pow_sha256/0.2.0/SourceSerifPro-Regular.ttf.woff differ diff --git a/api-docs/pow_sha256/0.2.0/ayu.css b/api-docs/pow_sha256/0.2.0/ayu.css new file mode 100644 index 0000000..096f6f3 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/ayu.css @@ -0,0 +1 @@ + body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod){border-bottom-color:#5c6773;}h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}code{color:#ffb454;}h3>code,h4>code,h5>code{color:#e6e1cf;}pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#5c6773;}.docblock table,.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.content .highlighted{color:#000 !important;background-color:#c6afb3;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted{background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a span.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}.collapse-toggle{color:#999;}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-focus:disabled{color:#929292;}.module-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background-color:transparent;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help>div>span{border-bottom-color:#5c6773;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.content .highlighted.mod,.content .highlighted.externcrate{}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content .highlighted.trait{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content .highlighted.traitalias{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}.content .highlighted.foreigntype{}pre.rust .lifetime{}.content .highlighted.primitive{}.content .highlighted.constant,.content .highlighted.static{}.stab.unstable{}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content .highlighted.enum{}.content .highlighted.struct{}.content .highlighted.keyword{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{}.stab.portability{}.content .highlighted.union{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}.content .highlighted.type{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results td span.alias{color:#c5c5c5;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/brush.svg b/api-docs/pow_sha256/0.2.0/brush.svg new file mode 100644 index 0000000..ea266e8 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/brush.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/dark.css b/api-docs/pow_sha256/0.2.0/dark.css new file mode 100644 index 0000000..85dec48 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/dark.css @@ -0,0 +1 @@ +body{background-color:#353535;color:#ddd;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.content .highlighted{color:#eee !important;background-color:#616161;}.content .highlighted a,.content .highlighted span{color:#eee !important;}.content .highlighted.trait{background-color:#013191;}.content .highlighted.traitalias{background-color:#013191;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.mod{background-color:#803a1b;}.content .highlighted.externcrate{background-color:#396bac;}.content .highlighted.enum{background-color:#5b4e68;}.content .highlighted.struct{background-color:#194e9f;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#4950ed;}.content .highlighted.type{background-color:#38902c;}.content .highlighted.foreigntype{background-color:#b200d6;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#217d1c;}.content .highlighted.constant,.content .highlighted.static{background-color:#0063cc;}.content .highlighted.primitive{background-color:#00708a;}.content .highlighted.keyword{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}.collapse-toggle{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-focus:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;color:#2f2f2f;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;color:#2f2f2f;}.stab.portability>code{color:#ddd;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);color:black;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#ffb900;}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results td span.alias{color:#fff;}.search-results td span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/down-arrow.svg b/api-docs/pow_sha256/0.2.0/down-arrow.svg new file mode 100644 index 0000000..35437e7 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/down-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/favicon-16x16.png b/api-docs/pow_sha256/0.2.0/favicon-16x16.png new file mode 100644 index 0000000..7cfe6c1 Binary files /dev/null and b/api-docs/pow_sha256/0.2.0/favicon-16x16.png differ diff --git a/api-docs/pow_sha256/0.2.0/favicon-32x32.png b/api-docs/pow_sha256/0.2.0/favicon-32x32.png new file mode 100644 index 0000000..5109c1d Binary files /dev/null and b/api-docs/pow_sha256/0.2.0/favicon-32x32.png differ diff --git a/api-docs/pow_sha256/0.2.0/favicon.svg b/api-docs/pow_sha256/0.2.0/favicon.svg new file mode 100644 index 0000000..8b34b51 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/favicon.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/api-docs/pow_sha256/0.2.0/implementors/core/clone/trait.Clone.js b/api-docs/pow_sha256/0.2.0/implementors/core/clone/trait.Clone.js new file mode 100644 index 0000000..b2161aa --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/implementors/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T: Clone> Clone for PoWBuilder<T>","synthetic":false,"types":[]},{"text":"impl<T: Clone> Clone for PoW<T>","synthetic":false,"types":[]},{"text":"impl Clone for ConfigBuilder","synthetic":false,"types":[]},{"text":"impl Clone for Config","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/implementors/core/cmp/trait.PartialEq.js b/api-docs/pow_sha256/0.2.0/implementors/core/cmp/trait.PartialEq.js new file mode 100644 index 0000000..dad600e --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/implementors/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T: PartialEq> PartialEq<PoW<T>> for PoW<T>","synthetic":false,"types":[]},{"text":"impl PartialEq<Config> for Config","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/implementors/core/default/trait.Default.js b/api-docs/pow_sha256/0.2.0/implementors/core/default/trait.Default.js new file mode 100644 index 0000000..b50dbb3 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/implementors/core/default/trait.Default.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T: Default> Default for PoWBuilder<T>","synthetic":false,"types":[]},{"text":"impl Default for ConfigBuilder","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/implementors/core/fmt/trait.Debug.js b/api-docs/pow_sha256/0.2.0/implementors/core/fmt/trait.Debug.js new file mode 100644 index 0000000..35cd8fa --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/implementors/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T: Debug> Debug for PoW<T>","synthetic":false,"types":[]},{"text":"impl Debug for Config","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.Freeze.js b/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.Freeze.js new file mode 100644 index 0000000..a287155 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Freeze for PoW<T>","synthetic":true,"types":[]},{"text":"impl<T> Freeze for PoWBuilder<T>","synthetic":true,"types":[]},{"text":"impl Freeze for Config","synthetic":true,"types":[]},{"text":"impl Freeze for ConfigBuilder","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.Send.js b/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.Send.js new file mode 100644 index 0000000..eccc4de --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Send for PoW<T> where
    T: Send, 
","synthetic":true,"types":[]},{"text":"impl<T> Send for PoWBuilder<T> where
    T: Send, 
","synthetic":true,"types":[]},{"text":"impl Send for Config","synthetic":true,"types":[]},{"text":"impl Send for ConfigBuilder","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.StructuralPartialEq.js b/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 0000000..0c28180 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> StructuralPartialEq for PoW<T>","synthetic":false,"types":[]},{"text":"impl StructuralPartialEq for Config","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.Sync.js b/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.Sync.js new file mode 100644 index 0000000..74e89a3 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Sync for PoW<T> where
    T: Sync, 
","synthetic":true,"types":[]},{"text":"impl<T> Sync for PoWBuilder<T> where
    T: Sync, 
","synthetic":true,"types":[]},{"text":"impl Sync for Config","synthetic":true,"types":[]},{"text":"impl Sync for ConfigBuilder","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.Unpin.js b/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.Unpin.js new file mode 100644 index 0000000..2674676 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/implementors/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Unpin for PoW<T> where
    T: Unpin, 
","synthetic":true,"types":[]},{"text":"impl<T> Unpin for PoWBuilder<T> where
    T: Unpin, 
","synthetic":true,"types":[]},{"text":"impl Unpin for Config","synthetic":true,"types":[]},{"text":"impl Unpin for ConfigBuilder","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/implementors/serde/de/trait.Deserialize.js b/api-docs/pow_sha256/0.2.0/implementors/serde/de/trait.Deserialize.js new file mode 100644 index 0000000..0580d3b --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/implementors/serde/de/trait.Deserialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<'de, T> Deserialize<'de> for PoW<T>","synthetic":false,"types":[]},{"text":"impl<'de> Deserialize<'de> for Config","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/implementors/serde/ser/trait.Serialize.js b/api-docs/pow_sha256/0.2.0/implementors/serde/ser/trait.Serialize.js new file mode 100644 index 0000000..adfc372 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/implementors/serde/ser/trait.Serialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Serialize for PoW<T>","synthetic":false,"types":[]},{"text":"impl Serialize for Config","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/implementors/std/panic/trait.RefUnwindSafe.js b/api-docs/pow_sha256/0.2.0/implementors/std/panic/trait.RefUnwindSafe.js new file mode 100644 index 0000000..ee487eb --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/implementors/std/panic/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> RefUnwindSafe for PoW<T> where
    T: RefUnwindSafe, 
","synthetic":true,"types":[]},{"text":"impl<T> RefUnwindSafe for PoWBuilder<T> where
    T: RefUnwindSafe, 
","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for Config","synthetic":true,"types":[]},{"text":"impl RefUnwindSafe for ConfigBuilder","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/implementors/std/panic/trait.UnwindSafe.js b/api-docs/pow_sha256/0.2.0/implementors/std/panic/trait.UnwindSafe.js new file mode 100644 index 0000000..26e2c00 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/implementors/std/panic/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> UnwindSafe for PoW<T> where
    T: UnwindSafe, 
","synthetic":true,"types":[]},{"text":"impl<T> UnwindSafe for PoWBuilder<T> where
    T: UnwindSafe, 
","synthetic":true,"types":[]},{"text":"impl UnwindSafe for Config","synthetic":true,"types":[]},{"text":"impl UnwindSafe for ConfigBuilder","synthetic":true,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/light.css b/api-docs/pow_sha256/0.2.0/light.css new file mode 100644 index 0000000..fa73fe2 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/light.css @@ -0,0 +1 @@ + body{background-color:white;color:black;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.content .highlighted{color:#000 !important;background-color:#ccc;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted.trait{background-color:#c7b6ff;}.content .highlighted.traitalias{background-color:#c7b6ff;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.enum{background-color:#b4d1b9;}.content .highlighted.struct{background-color:#e7b1a0;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#c6afb3;}.content .highlighted.type{background-color:#ffc891;}.content .highlighted.foreigntype{background-color:#f5c4ff;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#8ce488;}.content .highlighted.constant,.content .highlighted.static{background-color:#c3e0ff;}.content .highlighted.primitive{background-color:#9aecff;}.content .highlighted.keyword{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}.collapse-toggle{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-focus:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;}.stab.portability>code{color:#000;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:#FDFFD3;border-right:3px solid #ffb44c;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#717171;}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results td span.alias{color:#000;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/main.js b/api-docs/pow_sha256/0.2.0/main.js new file mode 100644 index 0000000..03cfb2c --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/main.js @@ -0,0 +1,8 @@ +if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}function getSearchInput(){return document.getElementsByClassName("search-input")[0]}function getSearchElement(){return document.getElementById("search")}function getThemesElement(){return document.getElementById("theme-choices")}function getThemePickerElement(){return document.getElementById("theme-picker")}function focusSearchBar(){getSearchInput().focus()}function defocusSearchBar(){getSearchInput().blur()}(function(){"use strict";var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var disableShortcuts=getSettingValue("disable-shortcuts")==="true";var search_input=getSearchInput();var searchTimeout=null;var toggleAllDocsId="toggle-all-docs";var currentTab=0;var mouseMovedAfterSearch=true;var titleBeforeSearch=document.title;var searchTitle=null;function clearInputTimeout(){if(searchTimeout!==null){clearTimeout(searchTimeout);searchTimeout=null}}function getPageId(){if(window.location.hash){var tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}function showSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(main,"hidden");removeClass(search,"hidden");mouseMovedAfterSearch=false;document.title=searchTitle}function hideSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=titleBeforeSearch}var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function getQueryStringParams(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function isHidden(elem){return elem.offsetHeight===0}var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=getSearchElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){hideSearchResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(hash,"","?search=#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}elem=document.getElementById(savedHash.slice(1));if(!elem||!isHidden(elem)){return}var parent=elem.parentNode;if(parent&&hasClass(parent,"impl-items")){onEachLazy(parent.getElementsByClassName("collapsed"),function(e){if(e.parentNode===parent){e.click();return true}});if(isHidden(elem)){if(hasClass(parent.lastElementChild,"collapse-toggle")){parent.lastElementChild.click()}}}}}function highlightSourceLines(match,ev){if(typeof match==="undefined"){hideSidebar();match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to0){collapseDocs(collapses[0],"show")}}}}function getHelpElement(){buildHelperPopup();return document.getElementById("help")}function displayHelp(display,ev,help){help=help?help:getHelpElement();if(display===true){if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else if(hasClass(help,"hidden")===false){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}function handleEscape(ev){var help=getHelpElement();var search=getSearchElement();if(hasClass(help,"hidden")===false){displayHelp(false,ev,help)}else if(hasClass(search,"hidden")===false){clearInputTimeout();ev.preventDefault();hideSearchResults(search)}defocusSearchBar();hideThemeButtonState()}function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts===true){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();focusSearchBar();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:var themePicker=getThemePickerElement();if(themePicker.parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!=="theme-picker"){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!=="theme-picker"){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id==="theme-picker"&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}function findParentElement(elem,tagName){do{if(elem&&elem.tagName===tagName){return elem}elem=elem.parentNode}while(elem);return null}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function resetMouseMoved(ev){mouseMovedAfterSearch=true}document.addEventListener("mousemove",resetMouseMoved);var handleSourceHighlight=(function(){var prev_line_id=0;var set_fragment=function(name){var x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return function(ev){var cur_line_id=parseInt(ev.target.id,10);ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());document.addEventListener("click",function(ev){if(hasClass(ev.target,"help-button")){displayHelp(true,ev)}else if(hasClass(ev.target,"collapse-toggle")){collapseDocs(ev.target,"toggle")}else if(hasClass(ev.target.parentNode,"collapse-toggle")){collapseDocs(ev.target.parentNode,"toggle")}else if(ev.target.tagName==="SPAN"&&hasClass(ev.target.parentNode,"line-numbers")){handleSourceHighlight(ev)}else if(hasClass(getHelpElement(),"hidden")===false){var help=getHelpElement();var is_inside_help_popup=ev.target!==help&&help.contains(ev.target);if(is_inside_help_popup===false){addClass(help,"hidden");removeClass(document.body,"blur")}}else{var a=findParentElement(ev.target,"A");if(a&&a.hash){expandSection(a.hash.replace(/^#/,""))}}});(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=rootPath.match(/\.\.\//g).length+1;for(i=0;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;if(isType!==true||obj.type){var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnProperty(results,entry)){ar.push(results[entry])}}results=ar;var i;var nresults=results.length;for(i=0;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});var length=results.length;for(i=0;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function getObjectFromId(id){if(typeof id==="number"){return searchIndex[id]}return{'name':id}}function checkGenerics(obj,val){var lev_distance=MAX_LEV_DISTANCE+1;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var total=0;var done=0;var vlength=val.generics.length;for(var y=0;yGENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var allFound=true;for(var y=0;allFound===true&&yGENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch===true){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var length=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(aborted===false){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function generateId(ty){if(ty.parent&&ty.parent.name){return itemTypes[ty.ty]+ty.path+ty.parent.name+ty.name}return itemTypes[ty.ty]+ty.path+ty.name}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];var i;if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){for(i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i;var ty;var fullId;var returned;var in_args;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0;i1?paths.length-1:1);var lev;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=generateId(ty);if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||searchWords[j].replace(/_/g,"").indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=searchWords[j].replace(/_/g,"").indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){lev=MAX_LEV_DISTANCE+1}else{lev+=1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function initSearchNav(){var hoverTimeout;var click_func=function(e){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}var dst=e.target.getElementsByTagName("a");if(dst.length<1){return}dst=dst[0];if(window.location.pathname===dst.pathname){hideSearchResults();document.location.href=dst.href}};var mouseover_func=function(e){if(mouseMovedAfterSearch){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}clearTimeout(hoverTimeout);hoverTimeout=setTimeout(function(){onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){removeClass(i_e,"highlighted")})});addClass(el,"highlighted")},20)}};onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){i_e.onclick=click_func;i_e.onmouseover=mouseover_func})});search_input.onkeydown=function(e){var actives=[[],[],[]];var current=0;onEachLazy(document.getElementById("results").childNodes,function(e){onEachLazy(e.getElementsByClassName("highlighted"),function(h_e){actives[current].push(h_e)});current+=1});if(e.which===38){if(e.ctrlKey){printTab(currentTab>0?currentTab-1:2)}else{if(!actives[currentTab].length||!actives[currentTab][0].previousElementSibling){return}addClass(actives[currentTab][0].previousElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===40){if(e.ctrlKey){printTab(currentTab>1?0:currentTab+1)}else if(!actives[currentTab].length){var results=document.getElementById("results").childNodes;if(results.length>0){var res=results[currentTab].getElementsByClassName("result");if(res.length>0){addClass(res[0],"highlighted")}}}else if(actives[currentTab][0].nextElementSibling){addClass(actives[currentTab][0].nextElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===13){if(actives[currentTab].length){document.location.href=actives[currentTab][0].getElementsByTagName("a")[0].href}}else if(e.which===16){}else if(actives[currentTab].length>0){removeClass(actives[currentTab][0],"highlighted")}}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var splitPath=item.path.split("::");var enumName=splitPath.pop();path=splitPath.join("::");displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraStyle="";if(display===false){extraStyle=" style=\"display: none;\""}var output="";var duplicates={};var length=0;if(array.length>0){output="";array.forEach(function(item){var name,type;name=item.name;type=itemTypes[item.ty];if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}length+=1;output+=""});output+="
"+""+(item.is_alias===true?(""+item.alias+"  - see "):"")+item.displayPath+""+name+""+""+""+item.desc+" 
"}else{output="
No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:
"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(currentTab===tabNb){return""}return""}function showResults(results){var search=getSearchElement();if(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==getSearchLoadingText())){var elem=document.createElement("a");elem.href=results.others[0].href;elem.style.display="none";document.body.appendChild(elem);elem.click();return}var query=getQuery(search_input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var output="

Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"+ret_others[0]+ret_in_args[0]+ret_returned[0]+"
";search.innerHTML=output;showSearchResults(search);var tds=search.getElementsByTagName("td");var td_width=0;if(tds.length>0){td_width=tds[0].offsetWidth}var width=search.offsetWidth-40-td_width;onEachLazy(search.getElementsByClassName("desc"),function(e){e.style.width=width+"px"});initSearchNav();var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnProperty(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=getQueryStringParams();var query=getQuery(search_input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(forced!==true&&query.id===currentResults){if(query.query.length>0){putBackSearch(search_input)}return}searchTitle="Results for "+query.query+" - Rust";if(browserSupportsHistoryApi()){if(!history.state&&!params.search){history.pushState(query,"","?search="+encodeURIComponent(query.raw))}else{history.replaceState(query,"","?search="+encodeURIComponent(query.raw))}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates))}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i;var currentIndex=0;for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);searchIndex.push({crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,type:null,});currentIndex+=1;var items=rawSearchIndex[crate].i;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i0){search_input.value=params.search;search(e)}else{search_input.value="";hideSearchResults()}})}search()}index=buildIndex(rawSearchIndex);startSearch();if(rootPath==="../"||rootPath==="./"){var sidebar=document.getElementsByClassName("sidebar-elems")[0];if(sidebar){var div=document.createElement("div");div.className="block crate";div.innerHTML="

Crates

";var ul=document.createElement("ul");div.appendChild(ul);var crates=[];for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}crates.push(crate)}crates.sort();for(var i=0;i','`').replace('','`');return x.innerText}window.initSidebarItems=function(items){var sidebar=document.getElementsByClassName("sidebar-elems")[0];var current=window.sidebarCurrent;function block(shortty,longty){var filtered=items[shortty];if(!filtered){return}var div=document.createElement("div");div.className="block "+shortty;var h3=document.createElement("h3");h3.textContent=longty;div.appendChild(h3);var ul=document.createElement("ul");var length=filtered.length;for(var i=0;i"+""+"
"+code.outerHTML+"
";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function onEveryMatchingChild(elem,className,func){if(elem&&className&&func){var length=elem.childNodes.length;var nodes=elem.childNodes;for(var i=0;i"+labelForToggleButton(sectionIsCollapsed)+"
]";return toggle}function createToggle(toggle,otherMessage,fontSize,extraClass,show){var span=document.createElement("span");span.className="toggle-label";if(show){span.style.display="none"}if(!otherMessage){span.innerHTML=" Expand description"}else{span.innerHTML=otherMessage}if(fontSize){span.style.fontSize=fontSize}var mainToggle=toggle.cloneNode(true);mainToggle.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper";if(!show){addClass(wrapper,"collapsed");var inner=mainToggle.getElementsByClassName("inner");if(inner&&inner.length>0){inner[0].innerHTML="+"}}if(extraClass){addClass(wrapper,extraClass)}wrapper.appendChild(mainToggle);return wrapper}(function(){var toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}var toggle=createSimpleToggle(false);var hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";var hideImplementors=getSettingValue("auto-collapse-implementors")!=="false";var pageId=getPageId();var func=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(!next){return}if(hasClass(next,"docblock")){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideMethodDocs===true&&hasClass(e,"method")===true){collapseDocs(newToggle,"hide",pageId)}}};var funcImpl=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(next&&hasClass(next,"docblock")){next=next.nextElementSibling}if(!next){return}if(hasClass(e,"impl")&&(next.getElementsByClassName("method").length>0||next.getElementsByClassName("associatedconstant").length>0)){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideImplementors===true&&e.parentNode.id==="implementors-list"){collapseDocs(newToggle,"hide",pageId)}}};onEachLazy(document.getElementsByClassName("method"),func);onEachLazy(document.getElementsByClassName("associatedconstant"),func);onEachLazy(document.getElementsByClassName("impl"),funcImpl);var impl_call=function(){};if(hideMethodDocs===true){impl_call=function(e,newToggle){if(e.id.match(/^impl(?:-\d+)?$/)===null){if(hasClass(e,"impl")===true){collapseDocs(newToggle,"hide",pageId)}}}}var newToggle=document.createElement("a");newToggle.href="javascript:void(0)";newToggle.className="collapse-toggle hidden-default collapsed";newToggle.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items";function toggleClicked(){if(hasClass(this,"collapsed")){removeClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("hidden"),function(x){if(hasClass(x,"content")===false){removeClass(x,"hidden");addClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(false)+"] Hide undocumented items"}else{addClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("x"),function(x){if(hasClass(x,"content")===false){addClass(x,"hidden");removeClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items"}}onEachLazy(document.getElementsByClassName("impl-items"),function(e){onEachLazy(e.getElementsByClassName("associatedconstant"),func);var hiddenElems=e.getElementsByClassName("hidden");var needToggle=false;var hlength=hiddenElems.length;for(var i=0;i"+getSearchLoadingText()+"";showSearchResults(search)}var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")===true){hideSidebar()}else{showSidebar()}}}if(main){onEachLazy(main.getElementsByClassName("loading-content"),function(e){e.remove()});onEachLazy(main.childNodes,function(e){if(e.tagName==="H2"||e.tagName==="H3"){var nextTagName=e.nextElementSibling.tagName;if(nextTagName=="H2"||nextTagName=="H3"){e.nextElementSibling.style.display="flex"}else{e.nextElementSibling.style.display="block"}}})}function enableSearchInput(){if(search_input){search_input.removeAttribute('disabled')}}window.addSearchOptions=function(crates){var elem=document.getElementById("crate-search");if(!elem){enableSearchInput();return}var crates_text=[];if(Object.keys(crates).length>1){for(var crate in crates){if(hasOwnProperty(crates,crate)){crates_text.push(crate)}}}crates_text.sort(function(a,b){var lower_a=a.toLowerCase();var lower_b=b.toLowerCase();if(lower_alower_b){return 1}return 0});var savedCrate=getSettingValue("saved-filter-crate");for(var i=0;ithe rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["ctrl + ↑ / ↓","Switch result tab"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>(index&1)===0?""+y+"":y).join("")+"
"+x[1]+"
").join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";var infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + * -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ + str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);popup.appendChild(container);insertAfter(popup,getSearchElement());buildHelperPopup=function(){}}onHashChange(null);window.onhashchange=onHashChange}());window.onunload=function(){} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/normalize.css b/api-docs/pow_sha256/0.2.0/normalize.css new file mode 100644 index 0000000..6d692b5 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/normalize.css @@ -0,0 +1,2 @@ + /*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/noscript.css b/api-docs/pow_sha256/0.2.0/noscript.css new file mode 100644 index 0000000..5cbcb90 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/noscript.css @@ -0,0 +1 @@ + #main>h2+div,#main>h2+h3,#main>h3+div{display:block;}.loading-content{display:none;}#main>h2+div,#main>h3+div{display:block;}#main>h2+h3{display:flex;}#main .impl-items .hidden{display:block !important;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/pow_sha256/all.html b/api-docs/pow_sha256/0.2.0/pow_sha256/all.html new file mode 100644 index 0000000..01feacd --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/pow_sha256/all.html @@ -0,0 +1,6 @@ +List of all items in this crate + +

[] + + List of all items

Structs

\ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/pow_sha256/index.html b/api-docs/pow_sha256/0.2.0/pow_sha256/index.html new file mode 100644 index 0000000..3b7ff6b --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/pow_sha256/index.html @@ -0,0 +1,31 @@ +pow_sha256 - Rust + +

[][src]Crate pow_sha256

MCaptch's SHA256 based Proof of Work library

+

Example:

+
+  use pow_sha256::{ConfigBuilder, PoW};
+
+  fn main() {
+      let config = ConfigBuilder::default()
+        .salt("myrandomsaltisnotlongenoug".into())
+        .build()
+        .unwrap();
+
+      let phrase = "ironmansucks";
+
+      const DIFFICULTY: u32 = 1000;
+
+      let work = config.prove_work(&phrase, DIFFICULTY).unwrap();
+      assert!(config.is_valid_proof(&work, &phrase));
+      assert!(config.is_sufficient_difficulty(&work, DIFFICULTY));
+  }    
+

Structs

+
Config

Configuration for generting proof of work +Please choose a long, unique value for salt +Resistance to dictionary/rainbow attacks depend on uniqueness +of the salt

+
ConfigBuilder

Builder for Config.

+
PoW

Proof of Work over concrete type T. T can be any type that implements serde::Serialize.

+
PoWBuilder

Builder for PoW.

+
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/pow_sha256/sidebar-items.js b/api-docs/pow_sha256/0.2.0/pow_sha256/sidebar-items.js new file mode 100644 index 0000000..320b71c --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/pow_sha256/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Config","Configuration for generting proof of work Please choose a long, unique value for salt Resistance to dictionary/rainbow attacks depend on uniqueness of the salt"],["ConfigBuilder","Builder for `Config`."],["PoW","Proof of Work over concrete type T. T can be any type that implements serde::Serialize."],["PoWBuilder","Builder for `PoW`."]]}); \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/pow_sha256/struct.Config.html b/api-docs/pow_sha256/0.2.0/pow_sha256/struct.Config.html new file mode 100644 index 0000000..e8d4a2d --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/pow_sha256/struct.Config.html @@ -0,0 +1,46 @@ +pow_sha256::Config - Rust + +

[][src]Struct pow_sha256::Config

pub struct Config {
+    pub salt: String,
+}

Configuration for generting proof of work +Please choose a long, unique value for salt +Resistance to dictionary/rainbow attacks depend on uniqueness +of the salt

+

+ Fields

salt: String

Implementations

impl Config[src]

pub fn prove_work<T>(&self, t: &T, difficulty: u32) -> Result<PoW<T>> where
    T: Serialize
[src]

Create Proof of Work over item of type T.

+

Make sure difficulty is not too high. A 64 bit difficulty, +for example, takes a long time on a general purpose processor. +Returns bincode::Error if serialization fails.

+

pub fn prove_work_serialized<T>(&self, prefix: &[u8], difficulty: u32) -> PoW<T> where
    T: Serialize
[src]

Create Proof of Work on an already serialized item of type T. +The input is assumed to be serialized using network byte order.

+

Make sure difficulty is not too high. A 64 bit difficulty, +for example, takes a long time on a general purpose processor.

+

pub fn calculate<T>(&self, pow: &PoW<T>, t: &T) -> Result<u128> where
    T: Serialize
[src]

Calculate the PoW score with the provided input T.

+

pub fn calculate_serialized<T>(&self, pow: &PoW<T>, target: &[u8]) -> u128 where
    T: Serialize
[src]

Calculate the PoW score of an already serialized T and self. +The input is assumed to be serialized using network byte order.

+

pub fn is_valid_proof<T>(&self, pow: &PoW<T>, t: &T) -> bool where
    T: Serialize
[src]

Verifies that the PoW is indeed generated out of the phrase provided.

+

pub fn is_sufficient_difficulty<T>(
    &self,
    pow: &PoW<T>,
    target_diff: u32
) -> bool where
    T: Serialize
[src]

Checks if the PoW result is of sufficient difficulty

+

Trait Implementations

impl Clone for Config[src]

impl Debug for Config[src]

impl<'de> Deserialize<'de> for Config[src]

impl PartialEq<Config> for Config[src]

impl Serialize for Config[src]

impl StructuralPartialEq for Config[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/pow_sha256/struct.ConfigBuilder.html b/api-docs/pow_sha256/0.2.0/pow_sha256/struct.ConfigBuilder.html new file mode 100644 index 0000000..7d2e654 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/pow_sha256/struct.ConfigBuilder.html @@ -0,0 +1,25 @@ +pow_sha256::ConfigBuilder - Rust + +

[][src]Struct pow_sha256::ConfigBuilder

pub struct ConfigBuilder { /* fields omitted */ }

Builder for Config.

+

Implementations

impl ConfigBuilder[src]

pub fn salt(&mut self, value: String) -> &mut Self[src]

pub fn build(&self) -> Result<Config, String>[src]

Builds a new Config.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for ConfigBuilder[src]

impl Default for ConfigBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/pow_sha256/struct.PoW.html b/api-docs/pow_sha256/0.2.0/pow_sha256/struct.PoW.html new file mode 100644 index 0000000..c754440 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/pow_sha256/struct.PoW.html @@ -0,0 +1,32 @@ +pow_sha256::PoW - Rust + +

[][src]Struct pow_sha256::PoW

pub struct PoW<T> {
+    pub nonce: u64,
+    pub result: String,
+    // some fields omitted
+}

Proof of Work over concrete type T. T can be any type that implements serde::Serialize.

+

+ Fields

nonce: u64result: String

Trait Implementations

impl<T: Clone> Clone for PoW<T>[src]

impl<T: Debug> Debug for PoW<T>[src]

impl<'de, T> Deserialize<'de> for PoW<T>[src]

impl<T: PartialEq> PartialEq<PoW<T>> for PoW<T>[src]

impl<T> Serialize for PoW<T>[src]

impl<T> StructuralPartialEq for PoW<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for PoW<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for PoW<T> where
    T: Send
[src]

impl<T> Sync for PoW<T> where
    T: Sync
[src]

impl<T> Unpin for PoW<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for PoW<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/pow_sha256/struct.PoWBuilder.html b/api-docs/pow_sha256/0.2.0/pow_sha256/struct.PoWBuilder.html new file mode 100644 index 0000000..4760e55 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/pow_sha256/struct.PoWBuilder.html @@ -0,0 +1,25 @@ +pow_sha256::PoWBuilder - Rust + +

[][src]Struct pow_sha256::PoWBuilder

pub struct PoWBuilder<T> { /* fields omitted */ }

Builder for PoW.

+

Implementations

impl<T: Clone> PoWBuilder<T>[src]

pub fn nonce(&mut self, value: u64) -> &mut Self[src]

pub fn result(&mut self, value: String) -> &mut Self[src]

pub fn build(&self) -> Result<PoW<T>, String>[src]

Builds a new PoW.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl<T: Clone> Clone for PoWBuilder<T>[src]

impl<T: Default> Default for PoWBuilder<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for PoWBuilder<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for PoWBuilder<T> where
    T: Send
[src]

impl<T> Sync for PoWBuilder<T> where
    T: Sync
[src]

impl<T> Unpin for PoWBuilder<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for PoWBuilder<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/rust-logo.png b/api-docs/pow_sha256/0.2.0/rust-logo.png new file mode 100644 index 0000000..74b4bd6 Binary files /dev/null and b/api-docs/pow_sha256/0.2.0/rust-logo.png differ diff --git a/api-docs/pow_sha256/0.2.0/rustdoc.css b/api-docs/pow_sha256/0.2.0/rustdoc.css new file mode 100644 index 0000000..757de19 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/rustdoc.css @@ -0,0 +1 @@ + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff") format('woff');}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:400;src:local('Source Serif Pro'),url("SourceSerifPro-Regular.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:italic;font-weight:400;src:local('Source Serif Pro Italic'),url("SourceSerifPro-It.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:700;src:local('Source Serif Pro Bold'),url("SourceSerifPro-Bold.ttf.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.woff") format('woff');}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif Pro",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.notable),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{border-bottom:1px dashed;margin-top:0;}h1.fqn>.in-band>a:hover{text-decoration:underline;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border-bottom:1px solid;}h3.impl,h3.method,h4.method,h3.type,h4.type,h4.associatedconstant{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}h3.impl,h3.method,h3.type{padding-left:15px;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.content table td:first-child>a,.collapse-toggle,div.item-list .out-of-band,#source-sidebar,#sidebar-toggle{font-family:"Fira Sans",sans-serif;}.content ul.crate a.crate{font:16px/1.6 "Fira Sans";}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}code,pre,a.test-arrow{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code,.docblock code.spotlight{padding:0;}.docblock code.spotlight :last-child{padding-bottom:0.6em;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;min-width:70em;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-child{font-weight:500;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{margin-top:0;margin-bottom:8px;text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc:not(.source) .example-wrap{display:inline-flex;margin-bottom:10px;position:relative;}.example-wrap{width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;border-top-left-radius:5px;border-bottom-left-radius:5px;padding:13px 8px;text-align:right;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results{position:absolute;right:0;left:0;overflow:auto;}#results>table{width:100%;table-layout:fixed;margin-bottom:40px;}.content pre.line-numbers{float:left;border:none;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock code,.docblock-short code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}#main>.docblock h1{font-size:1.3em;}#main>.docblock h2{font-size:1.15em;}#main>.docblock h3,#main>.docblock h4,#main>.docblock h5{font-size:1em;}#main>h2+div,#main>h2+h3,#main>h3+div{display:none;flex-wrap:wrap;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{float:right;font-size:23px;margin:0px;padding:0px;font-weight:normal;}h3.impl>.out-of-band{font-size:21px;}h4.method>.out-of-band{font-size:19px;}h4>code,h3>code,.invisible>code{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{margin:0px;padding:0px;}.in-band>code{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content .method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items>h4{border-bottom:0;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.toggle-wrapper.marg-left>.collapse-toggle{left:-24px;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;margin-top:-13px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:-6px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,h4>code+.srclink,h3>code+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results .desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results a{display:block;}.content .search-results td:first-child{padding-right:0;width:50%;}.content .search-results td:first-child a{padding-right:10px;}.content .search-results td:first-child a:after{clear:both;content:"";display:block;}.content .search-results td:first-child a span{float:left;}tr.result span.primitive::after{content:' (primitive type)';font-style:italic;}tr.result span.keyword::after{content:' (keyword)';font-style:italic;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;}#help>div>span{text-align:center;display:block;margin:10px 0;font-size:18px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.module-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since,.methods .since{flex-grow:0;padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code,.methods code{flex-grow:1;}.impl-items h4,h4.impl,h3.impl,.methods h3{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.collapse-toggle{font-weight:300;position:absolute;left:-23px;top:0;}h3>.collapse-toggle,h4>.collapse-toggle{font-size:0.8em;top:5px;}.toggle-wrapper>.collapse-toggle{left:-24px;margin-top:0px;}.toggle-wrapper{position:relative;margin-top:0;}.toggle-wrapper.collapsed{height:25px;transition:height .2s;margin-bottom:.6em;}.collapse-toggle>.inner{display:inline-block;width:1.2ch;text-align:center;}.collapse-toggle.hidden-default{position:relative;margin-left:20px;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.toggle-wrapper>.collapse-toggle{left:0;}.variant+.toggle-wrapper+.docblock>p{margin-top:5px;}.sub-variant,.sub-variant>h3{margin-top:1px !important;}#main>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.enum>.toggle-wrapper+.docblock,.struct>.toggle-wrapper+.docblock{margin-left:30px;margin-bottom:20px;margin-top:5px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}.enum>.collapsed,.struct>.collapsed{margin-bottom:25px;}#main>.variant,#main>.structfield{display:block;}.attributes{display:block;margin-top:0px !important;margin-right:0px;margin-bottom:0px !important;margin-left:30px;}.toggle-attributes.collapsed{margin-bottom:0;}.impl-items>.toggle-attributes{margin-left:20px;}.impl-items .attributes{font-weight:500;}:target>code{opacity:1;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}h4>.notable-traits{position:absolute;left:-44px;top:2px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,.help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}.help-button{right:30px;font-family:"Fira Sans",sans-serif;text-align:center;font-size:17px;}#theme-picker,#settings-menu,.help-button{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}@media (min-width:701px){.information:first-child>.tooltip{margin-top:16px;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;left:0;top:45px;bottom:0;overflow-y:auto;border-right:1px solid;display:none;}.sidebar>.block.version{border-bottom:none;margin-top:12px;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main{margin-top:45px;padding:0;}.content .in-band{width:100%;}.content h4>.out-of-band{position:inherit;}.toggle-wrapper>.collapse-toggle{left:0px;}.toggle-wrapper{height:1.5em;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{display:flex;}.anchor{display:none !important;}h1.fqn{overflow:initial;}.theme-picker{left:10px;top:54px;z-index:1;}h4>.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar{width:calc(100% + 30px);}.show-it{display:block;width:246px;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}.collapse-toggle{left:-20px;}.impl>.collapse-toggle{left:-10px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}.help-button{display:none;}.search-container>div{width:calc(100% - 32px);}}@media print{nav.sub,.content .out-of-band,.collapse-toggle{display:none;}}@media (max-width:416px){#titles,#titles>button{height:73px;}#main{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}}h3.notable{margin:0;margin-bottom:13px;font-size:19px;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}.type-decl>pre>.toggle-wrapper.toggle-attributes.top-attr{margin-left:0 !important;}.type-decl>pre>.docblock.attributes.top-attr{margin-left:1.8em !important;}.type-decl>pre>.toggle-attributes{margin-left:2.2em;}.type-decl>pre>.docblock.attributes{margin-left:4em;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/search-index.js b/api-docs/pow_sha256/0.2.0/search-index.js new file mode 100644 index 0000000..b091b7c --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/search-index.js @@ -0,0 +1,4 @@ +var searchIndex = JSON.parse('{\ +"pow_sha256":{"doc":"MCaptch\'s SHA256 based Proof of Work library","i":[[3,"PoW","pow_sha256","Proof of Work over concrete type T. T can be any type …",null,null],[12,"nonce","","",0,null],[12,"result","","",0,null],[3,"PoWBuilder","","Builder for PoW.",null,null],[11,"nonce","","",1,[[]]],[11,"result","","",1,[[["string",3]]]],[11,"build","","Builds a new PoW.",1,[[],[["pow",3],["string",3],["result",4]]]],[3,"Config","","Configuration for generting proof of work Please choose a …",null,null],[12,"salt","","",2,null],[3,"ConfigBuilder","","Builder for Config.",null,null],[11,"salt","","",3,[[["string",3]]]],[11,"build","","Builds a new Config.",3,[[],[["result",4],["string",3],["config",3]]]],[11,"prove_work","","Create Proof of Work over item of type T.",2,[[],[["result",6],["pow",3]]]],[11,"prove_work_serialized","","Create Proof of Work on an already serialized item of …",2,[[],["pow",3]]],[11,"calculate","","Calculate the PoW score with the provided input T.",2,[[["pow",3]],["result",6]]],[11,"calculate_serialized","","Calculate the PoW score of an already serialized T and …",2,[[["pow",3]]]],[11,"is_valid_proof","","Verifies that the PoW is indeed generated out of the …",2,[[["pow",3]]]],[11,"is_sufficient_difficulty","","Checks if the PoW result is of sufficient difficulty",2,[[["pow",3]]]],[11,"from","","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"from","","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_owned","","",1,[[]]],[11,"clone_into","","",1,[[]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"from","","",2,[[]]],[11,"into","","",2,[[]]],[11,"to_owned","","",2,[[]]],[11,"clone_into","","",2,[[]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"from","","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"clone","","",1,[[],["powbuilder",3]]],[11,"clone","","",0,[[],["pow",3]]],[11,"clone","","",3,[[],["configbuilder",3]]],[11,"clone","","",2,[[],["config",3]]],[11,"default","","",1,[[],["powbuilder",3]]],[11,"default","","",3,[[],["configbuilder",3]]],[11,"eq","","",0,[[["pow",3]]]],[11,"ne","","",0,[[["pow",3]]]],[11,"eq","","",2,[[["config",3]]]],[11,"ne","","",2,[[["config",3]]]],[11,"fmt","","",0,[[["formatter",3]],["result",6]]],[11,"fmt","","",2,[[["formatter",3]],["result",6]]],[11,"serialize","","",0,[[],["result",4]]],[11,"serialize","","",2,[[],["result",4]]],[11,"deserialize","","",0,[[],["result",4]]],[11,"deserialize","","",2,[[],["result",4]]]],"p":[[3,"PoW"],[3,"PoWBuilder"],[3,"Config"],[3,"ConfigBuilder"]]}\ +}'); +addSearchOptions(searchIndex);initSearch(searchIndex); \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/settings.css b/api-docs/pow_sha256/0.2.0/settings.css new file mode 100644 index 0000000..6709865 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/settings.css @@ -0,0 +1 @@ +.setting-line{padding:5px;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.select-wrapper{float:right;position:relative;height:27px;min-width:25%;}.select-wrapper select{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:2px solid #ccc;padding-right:28px;width:100%;}.select-wrapper img{pointer-events:none;position:absolute;right:0;bottom:0;background:#ccc;height:100%;width:28px;padding:0px 4px;}.select-wrapper select option{color:initial;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/settings.html b/api-docs/pow_sha256/0.2.0/settings.html new file mode 100644 index 0000000..334fa30 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/settings.html @@ -0,0 +1,6 @@ +Rustdoc settings + +

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
+
Auto-hide item declarations
Auto-hide structs declaration
Auto-hide enums declaration
Auto-hide unions declaration
Auto-hide traits declaration
Auto-hide macros declaration
+
Auto-hide item attributes.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Auto-hide implementors of a trait
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/settings.js b/api-docs/pow_sha256/0.2.0/settings.js new file mode 100644 index 0000000..b4d6fdc --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/settings.js @@ -0,0 +1 @@ +(function(){function changeSetting(settingName,value){updateLocalStorage("rustdoc-"+settingName,value);switch(settingName){case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function setEvents(){onEachLazy(document.getElementsByClassName("slider"),function(elem){var toggle=elem.previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(document.getElementsByClassName("select-wrapper"),function(elem){var select=elem.getElementsByTagName("select")[0];var settingId=select.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}})}window.addEventListener("DOMContentLoaded",setEvents)})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/source-files.js b/api-docs/pow_sha256/0.2.0/source-files.js new file mode 100644 index 0000000..c682f6c --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/source-files.js @@ -0,0 +1,3 @@ +var N = null;var sourcesIndex = {}; +sourcesIndex["pow_sha256"] = {"name":"","files":["lib.rs"]}; +createSourceSidebar(); diff --git a/api-docs/pow_sha256/0.2.0/source-script.js b/api-docs/pow_sha256/0.2.0/source-script.js new file mode 100644 index 0000000..de663ca --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/source-script.js @@ -0,0 +1 @@ +function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0;i"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(window.rootPath.endsWith("/")===false){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/src/pow_sha256/lib.rs.html b/api-docs/pow_sha256/0.2.0/src/pow_sha256/lib.rs.html new file mode 100644 index 0000000..a8e9545 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/src/pow_sha256/lib.rs.html @@ -0,0 +1,448 @@ +lib.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+
+//! MCaptch's SHA256 based Proof of Work library
+//!
+//! # Example:
+//! ```rust
+//!   use pow_sha256::{ConfigBuilder, PoW};
+//!
+//!   fn main() {
+//!       let config = ConfigBuilder::default()
+//!         .salt("myrandomsaltisnotlongenoug".into())
+//!         .build()
+//!         .unwrap();
+//!
+//!       let phrase = "ironmansucks";
+//!
+//!       const DIFFICULTY: u32 = 1000;
+//!
+//!       let work = config.prove_work(&phrase, DIFFICULTY).unwrap();
+//!       assert!(config.is_valid_proof(&work, &phrase));
+//!       assert!(config.is_sufficient_difficulty(&work, DIFFICULTY));
+//!   }    
+//! ```
+
+use std::marker::PhantomData;
+
+use derive_builder::Builder;
+use serde::{Deserialize, Serialize};
+use sha2::{Digest, Sha256};
+
+/// Proof of Work over concrete type T. T can be any type that implements serde::Serialize.
+#[derive(Serialize, Builder, Deserialize, PartialEq, Clone, Debug)]
+pub struct PoW<T> {
+    pub nonce: u64,
+    pub result: String,
+    #[builder(default = "PhantomData", setter(skip))]
+    _spook: PhantomData<T>,
+}
+
+/// Configuration for generting proof of work
+/// Please choose a long, unique value for salt
+/// Resistance to dictionary/rainbow attacks depend on uniqueness
+/// of the salt
+#[derive(Serialize, Deserialize, Builder, PartialEq, Clone, Debug)]
+pub struct Config {
+    pub salt: String,
+}
+
+impl Config {
+    /// Create Proof of Work over item of type T.
+    ///
+    /// Make sure difficulty is not too high. A 64 bit difficulty,
+    /// for example, takes a long time on a general purpose processor.
+    /// Returns bincode::Error if serialization fails.
+    pub fn prove_work<T>(&self, t: &T, difficulty: u32) -> bincode::Result<PoW<T>>
+    where
+        T: Serialize,
+    {
+        bincode::serialize(t).map(|v| self.prove_work_serialized(&v, difficulty))
+    }
+
+    /// Create Proof of Work on an already serialized item of type T.
+    /// The input is assumed to be serialized using network byte order.
+    ///
+    /// Make sure difficulty is not too high. A 64 bit difficulty,
+    /// for example, takes a long time on a general purpose processor.
+    pub fn prove_work_serialized<T>(&self, prefix: &[u8], difficulty: u32) -> PoW<T>
+    where
+        T: Serialize,
+    {
+        let prefix_sha = Sha256::new().chain(&self.salt).chain(prefix);
+        let mut n = 0;
+        let mut result = 0;
+        while result < get_difficulty(difficulty) {
+            n += 1;
+            result = score(prefix_sha.clone(), n);
+        }
+        PoW {
+            nonce: n,
+            result: result.to_string(),
+            _spook: PhantomData,
+        }
+    }
+
+    /// Calculate the PoW score with the provided input T.
+    pub fn calculate<T>(&self, pow: &PoW<T>, t: &T) -> bincode::Result<u128>
+    where
+        T: Serialize,
+    {
+        bincode::serialize(t).map(|v| self.calculate_serialized(pow, &v))
+    }
+
+    /// Calculate the PoW score of an already serialized T and self.
+    /// The input is assumed to be serialized using network byte order.
+    pub fn calculate_serialized<T>(&self, pow: &PoW<T>, target: &[u8]) -> u128
+    where
+        T: Serialize,
+    {
+        score(Sha256::new().chain(&self.salt).chain(target), pow.nonce)
+    }
+
+    /// Verifies that the PoW is indeed generated out of the phrase provided.
+    pub fn is_valid_proof<T>(&self, pow: &PoW<T>, t: &T) -> bool
+    where
+        T: Serialize,
+    {
+        match self.calculate(pow, t) {
+            Ok(res) => {
+                return if pow.result == res.to_string() {
+                    true
+                } else {
+                    false
+                }
+            }
+            Err(_) => return false,
+        }
+    }
+
+    /// Checks if the PoW result is of sufficient difficulty
+    pub fn is_sufficient_difficulty<T>(&self, pow: &PoW<T>, target_diff: u32) -> bool
+    where
+        T: Serialize,
+    {
+        match pow.result.parse::<u128>() {
+            Ok(res) => return res >= get_difficulty(target_diff),
+            Err(_) => return false,
+        }
+    }
+}
+
+fn score(prefix_sha: Sha256, nonce: u64) -> u128 {
+    first_bytes_as_u128(
+        prefix_sha
+            .chain(&nonce.to_be_bytes()) // to_be_bytes() converts to network endian
+            .finalize()
+            .as_slice(),
+    )
+}
+
+/// # Panics
+///
+/// panics if inp.len() < 16
+fn first_bytes_as_u128(inp: &[u8]) -> u128 {
+    bincode::deserialize(&inp).unwrap()
+}
+
+// utility function to get u128 difficulty factor from u32
+// javacript isn't capable of represnting u128 so
+fn get_difficulty(difficulty_factor: u32) -> u128 {
+    u128::max_value() - u128::max_value() / difficulty_factor as u128
+}
+
+#[cfg(test)]
+mod test {
+    use super::*;
+
+    const DIFFICULTY: u32 = 1000;
+
+    fn get_config() -> Config {
+        ConfigBuilder::default()
+            .salt(
+                "79ziepia7vhjgviiwjhnend3ofjqocsi2winc4ptqhmkvcajihywxcizewvckg9h6gs4j83v9".into(),
+            )
+            .build()
+            .unwrap()
+    }
+
+    #[test]
+    fn base_functionality() {
+        // Let's prove we did work targeting a phrase.
+        let phrase = b"Ex nihilo nihil fit.".to_vec();
+        let config = get_config();
+        let pw = config.prove_work(&phrase, DIFFICULTY).unwrap();
+        assert!(config.calculate(&pw, &phrase).unwrap() >= get_difficulty(DIFFICULTY));
+        assert!(config.is_valid_proof(&pw, &phrase));
+        assert!(config.is_sufficient_difficulty(&pw, DIFFICULTY));
+    }
+
+    #[test]
+    fn double_pow() {
+        let phrase = "Ex nihilo nihil fit.".to_owned();
+        let config = get_config();
+
+        let pw = config.prove_work(&phrase, DIFFICULTY).unwrap();
+        let pwpw = config.prove_work(&pw, DIFFICULTY).unwrap();
+
+        assert!(config.calculate(&pw, &phrase).unwrap() >= get_difficulty(DIFFICULTY));
+        assert!(config.is_valid_proof(&pw, &phrase));
+        assert!(config.is_sufficient_difficulty(&pw, DIFFICULTY));
+
+        assert!(config.calculate(&pwpw, &pw).unwrap() >= get_difficulty(DIFFICULTY));
+        assert!(config.is_valid_proof(&pwpw, &pw));
+        assert!(config.is_sufficient_difficulty(&pwpw, DIFFICULTY));
+    }
+
+    #[test]
+    fn is_not_valid_proof() {
+        let phrase = "Ex nihilo nihil fit.".to_owned();
+        let phrase2 = "Omne quod movetur ab alio movetur.".to_owned();
+
+        let config = get_config();
+        let pw = config.prove_work(&phrase, DIFFICULTY).unwrap();
+
+        let pw2 = config.prove_work(&phrase2, DIFFICULTY).unwrap();
+
+        assert!(!config.is_valid_proof(&pw, &phrase2));
+        assert!(!config.is_valid_proof(&pw2, &phrase));
+    }
+
+    #[test]
+    fn serialization_test() {
+        let target: u8 = 1;
+        let config = get_config();
+        let pw = config.prove_work(&target, DIFFICULTY).unwrap();
+
+        let message: (u8, PoW<u8>) = (target, pw);
+        let message_ser = bincode::serialize(&message).unwrap();
+        let recieved_message: (u8, PoW<u8>) = bincode::deserialize(&message_ser).unwrap();
+        assert_eq!(recieved_message, message);
+        assert!(config.is_sufficient_difficulty(&message.1, DIFFICULTY));
+        assert!(config.is_valid_proof(&message.1, &target));
+    }
+}
+
+
\ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/storage.js b/api-docs/pow_sha256/0.2.0/storage.js new file mode 100644 index 0000000..318275e --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/storage.js @@ -0,0 +1 @@ +var resourcesSuffix="";var darkThemes=["dark","ayu"];var currentTheme=document.getElementById("themeStyle");var mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed!==true){for(i=0;i=0;--i){if(func(arr[i])===true){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function hasOwnProperty(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function usableLocalStorage(){if(typeof Storage==="undefined"){return false}try{return window.localStorage!==null&&window.localStorage!==undefined}catch(err){return false}}function updateLocalStorage(name,value){if(usableLocalStorage()){localStorage[name]=value}else{}}function getCurrentValue(name){if(usableLocalStorage()&&localStorage[name]!==undefined){return localStorage[name]}return null}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){var fullBasicCss="rustdoc"+resourcesSuffix+".css";var fullNewTheme=newTheme+resourcesSuffix+".css";var newHref=mainStyleElem.href.replace(fullBasicCss,fullNewTheme);if(saveTheme===true){updateLocalStorage("rustdoc-theme",newTheme)}if(styleElem.href===newHref){return}var found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),function(el){savedHref.push(el.href)})}onEach(savedHref,function(el){if(el===newHref){found=true;return true}});if(found===true){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("rustdoc-use-system-theme",value);var toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}var updateSystemTheme=(function(){if(!window.matchMedia){return function(){let cssTheme=getComputedStyle(document.documentElement).getPropertyValue('content');switchTheme(currentTheme,mainTheme,JSON.parse(cssTheme)||light,true)}}var mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){if(getSettingValue("use-system-theme")!=="false"){var lightTheme=getSettingValue("preferred-light-theme")||"light";var darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){switchTheme(currentTheme,mainTheme,darkTheme,true)}else{switchTheme(currentTheme,mainTheme,lightTheme,true)}}}mql.addListener(handlePreferenceChange);return function(){handlePreferenceChange(mql)}})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(currentTheme,mainTheme,getSettingValue("theme")||"light",false)} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/theme.js b/api-docs/pow_sha256/0.2.0/theme.js new file mode 100644 index 0000000..8f9c49a --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/theme.js @@ -0,0 +1 @@ +var themes=document.getElementById("theme-choices");var themePicker=document.getElementById("theme-picker");function showThemeButtonState(){themes.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){themes.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}function switchThemeButtonState(){if(themes.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}};function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!=="theme-picker"&&(!active.parentNode||active.parentNode.id!=="theme-choices")&&(!related||(related.id!=="theme-picker"&&(!related.parentNode||related.parentNode.id!=="theme-choices")))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;["ayu","dark","light"].forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(el){switchTheme(currentTheme,mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themes.appendChild(but)}) \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.0/wheel.svg b/api-docs/pow_sha256/0.2.0/wheel.svg new file mode 100644 index 0000000..01da3b2 --- /dev/null +++ b/api-docs/pow_sha256/0.2.0/wheel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/COPYRIGHT.txt b/api-docs/pow_sha256/0.2.1/COPYRIGHT.txt new file mode 100644 index 0000000..af77776 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/COPYRIGHT.txt @@ -0,0 +1,45 @@ +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif Pro (SourceSerifPro-Regular.ttf.woff, + SourceSerifPro-Bold.ttf.woff, SourceSerifPro-It.ttf.woff): + + Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with + Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of + Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerifPro-LICENSE.txt. + +This copyright file is intended to be distributed with rustdoc output. diff --git a/api-docs/pow_sha256/0.2.1/FiraSans-LICENSE.txt b/api-docs/pow_sha256/0.2.1/FiraSans-LICENSE.txt new file mode 100644 index 0000000..d444ea9 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/FiraSans-LICENSE.txt @@ -0,0 +1,94 @@ +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/pow_sha256/0.2.1/FiraSans-Medium.woff b/api-docs/pow_sha256/0.2.1/FiraSans-Medium.woff new file mode 100644 index 0000000..7d742c5 Binary files /dev/null and b/api-docs/pow_sha256/0.2.1/FiraSans-Medium.woff differ diff --git a/api-docs/pow_sha256/0.2.1/FiraSans-Regular.woff b/api-docs/pow_sha256/0.2.1/FiraSans-Regular.woff new file mode 100644 index 0000000..d8e0363 Binary files /dev/null and b/api-docs/pow_sha256/0.2.1/FiraSans-Regular.woff differ diff --git a/api-docs/pow_sha256/0.2.1/LICENSE-APACHE.txt b/api-docs/pow_sha256/0.2.1/LICENSE-APACHE.txt new file mode 100644 index 0000000..16fe87b --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/LICENSE-APACHE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/api-docs/pow_sha256/0.2.1/LICENSE-MIT.txt b/api-docs/pow_sha256/0.2.1/LICENSE-MIT.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/LICENSE-MIT.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/api-docs/pow_sha256/0.2.1/SourceCodePro-LICENSE.txt b/api-docs/pow_sha256/0.2.1/SourceCodePro-LICENSE.txt new file mode 100644 index 0000000..0754257 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/SourceCodePro-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/pow_sha256/0.2.1/SourceCodePro-Regular.woff b/api-docs/pow_sha256/0.2.1/SourceCodePro-Regular.woff new file mode 100644 index 0000000..5576670 Binary files /dev/null and b/api-docs/pow_sha256/0.2.1/SourceCodePro-Regular.woff differ diff --git a/api-docs/pow_sha256/0.2.1/SourceCodePro-Semibold.woff b/api-docs/pow_sha256/0.2.1/SourceCodePro-Semibold.woff new file mode 100644 index 0000000..ca972a1 Binary files /dev/null and b/api-docs/pow_sha256/0.2.1/SourceCodePro-Semibold.woff differ diff --git a/api-docs/pow_sha256/0.2.1/SourceSerifPro-Bold.ttf.woff b/api-docs/pow_sha256/0.2.1/SourceSerifPro-Bold.ttf.woff new file mode 100644 index 0000000..ca25431 Binary files /dev/null and b/api-docs/pow_sha256/0.2.1/SourceSerifPro-Bold.ttf.woff differ diff --git a/api-docs/pow_sha256/0.2.1/SourceSerifPro-It.ttf.woff b/api-docs/pow_sha256/0.2.1/SourceSerifPro-It.ttf.woff new file mode 100644 index 0000000..a287bbe Binary files /dev/null and b/api-docs/pow_sha256/0.2.1/SourceSerifPro-It.ttf.woff differ diff --git a/api-docs/pow_sha256/0.2.1/SourceSerifPro-LICENSE.md b/api-docs/pow_sha256/0.2.1/SourceSerifPro-LICENSE.md new file mode 100644 index 0000000..22cb755 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/SourceSerifPro-LICENSE.md @@ -0,0 +1,93 @@ +Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api-docs/pow_sha256/0.2.1/SourceSerifPro-Regular.ttf.woff b/api-docs/pow_sha256/0.2.1/SourceSerifPro-Regular.ttf.woff new file mode 100644 index 0000000..a3d55cf Binary files /dev/null and b/api-docs/pow_sha256/0.2.1/SourceSerifPro-Regular.ttf.woff differ diff --git a/api-docs/pow_sha256/0.2.1/ayu.css b/api-docs/pow_sha256/0.2.1/ayu.css new file mode 100644 index 0000000..096f6f3 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/ayu.css @@ -0,0 +1 @@ + body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod){border-bottom-color:#5c6773;}h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}code{color:#ffb454;}h3>code,h4>code,h5>code{color:#e6e1cf;}pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#5c6773;}.docblock table,.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.content .highlighted{color:#000 !important;background-color:#c6afb3;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted{background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a span.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}.collapse-toggle{color:#999;}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-focus:disabled{color:#929292;}.module-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background-color:transparent;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help>div>span{border-bottom-color:#5c6773;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.content .highlighted.mod,.content .highlighted.externcrate{}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content .highlighted.trait{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content .highlighted.traitalias{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}.content .highlighted.foreigntype{}pre.rust .lifetime{}.content .highlighted.primitive{}.content .highlighted.constant,.content .highlighted.static{}.stab.unstable{}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content .highlighted.enum{}.content .highlighted.struct{}.content .highlighted.keyword{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{}.stab.portability{}.content .highlighted.union{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}.content .highlighted.type{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results td span.alias{color:#c5c5c5;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/brush.svg b/api-docs/pow_sha256/0.2.1/brush.svg new file mode 100644 index 0000000..ea266e8 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/brush.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/dark.css b/api-docs/pow_sha256/0.2.1/dark.css new file mode 100644 index 0000000..57e76d0 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/dark.css @@ -0,0 +1 @@ +body{background-color:#353535;color:#ddd;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.content .highlighted{color:#eee !important;background-color:#616161;}.content .highlighted a,.content .highlighted span{color:#eee !important;}.content .highlighted.trait{background-color:#013191;}.content .highlighted.traitalias{background-color:#013191;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.mod{background-color:#803a1b;}.content .highlighted.externcrate{background-color:#396bac;}.content .highlighted.enum{background-color:#5b4e68;}.content .highlighted.struct{background-color:#194e9f;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#4950ed;}.content .highlighted.type{background-color:#38902c;}.content .highlighted.foreigntype{background-color:#b200d6;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#217d1c;}.content .highlighted.constant,.content .highlighted.static{background-color:#0063cc;}.content .highlighted.primitive{background-color:#00708a;}.content .highlighted.keyword{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}.collapse-toggle{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-focus:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;color:#2f2f2f;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;color:#2f2f2f;}.stab.portability>code{color:#ddd;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#ffb900;}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results td span.alias{color:#fff;}.search-results td span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/down-arrow.svg b/api-docs/pow_sha256/0.2.1/down-arrow.svg new file mode 100644 index 0000000..35437e7 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/down-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/favicon-16x16.png b/api-docs/pow_sha256/0.2.1/favicon-16x16.png new file mode 100644 index 0000000..7cfe6c1 Binary files /dev/null and b/api-docs/pow_sha256/0.2.1/favicon-16x16.png differ diff --git a/api-docs/pow_sha256/0.2.1/favicon-32x32.png b/api-docs/pow_sha256/0.2.1/favicon-32x32.png new file mode 100644 index 0000000..5109c1d Binary files /dev/null and b/api-docs/pow_sha256/0.2.1/favicon-32x32.png differ diff --git a/api-docs/pow_sha256/0.2.1/favicon.svg b/api-docs/pow_sha256/0.2.1/favicon.svg new file mode 100644 index 0000000..8b34b51 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/favicon.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/api-docs/pow_sha256/0.2.1/implementors/core/clone/trait.Clone.js b/api-docs/pow_sha256/0.2.1/implementors/core/clone/trait.Clone.js new file mode 100644 index 0000000..113be25 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T: Clone> Clone for PoWBuilder<T>","synthetic":false,"types":["pow_sha256::PoWBuilder"]},{"text":"impl<T: Clone> Clone for PoW<T>","synthetic":false,"types":["pow_sha256::PoW"]},{"text":"impl Clone for ConfigBuilder","synthetic":false,"types":["pow_sha256::ConfigBuilder"]},{"text":"impl Clone for Config","synthetic":false,"types":["pow_sha256::Config"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/core/cmp/trait.PartialEq.js b/api-docs/pow_sha256/0.2.1/implementors/core/cmp/trait.PartialEq.js new file mode 100644 index 0000000..3bf4cee --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T: PartialEq> PartialEq<PoW<T>> for PoW<T>","synthetic":false,"types":["pow_sha256::PoW"]},{"text":"impl PartialEq<Config> for Config","synthetic":false,"types":["pow_sha256::Config"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/core/convert/trait.From.js b/api-docs/pow_sha256/0.2.1/implementors/core/convert/trait.From.js new file mode 100644 index 0000000..8d5444f --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/core/convert/trait.From.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl From<UninitializedFieldError> for PoWBuilderError","synthetic":false,"types":["pow_sha256::PoWBuilderError"]},{"text":"impl From<String> for PoWBuilderError","synthetic":false,"types":["pow_sha256::PoWBuilderError"]},{"text":"impl From<UninitializedFieldError> for ConfigBuilderError","synthetic":false,"types":["pow_sha256::ConfigBuilderError"]},{"text":"impl From<String> for ConfigBuilderError","synthetic":false,"types":["pow_sha256::ConfigBuilderError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/core/default/trait.Default.js b/api-docs/pow_sha256/0.2.1/implementors/core/default/trait.Default.js new file mode 100644 index 0000000..5c36622 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/core/default/trait.Default.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T: Clone> Default for PoWBuilder<T>","synthetic":false,"types":["pow_sha256::PoWBuilder"]},{"text":"impl Default for ConfigBuilder","synthetic":false,"types":["pow_sha256::ConfigBuilder"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/core/fmt/trait.Debug.js b/api-docs/pow_sha256/0.2.1/implementors/core/fmt/trait.Debug.js new file mode 100644 index 0000000..0ecc15c --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl Debug for PoWBuilderError","synthetic":false,"types":["pow_sha256::PoWBuilderError"]},{"text":"impl<T: Debug> Debug for PoW<T>","synthetic":false,"types":["pow_sha256::PoW"]},{"text":"impl Debug for ConfigBuilderError","synthetic":false,"types":["pow_sha256::ConfigBuilderError"]},{"text":"impl Debug for Config","synthetic":false,"types":["pow_sha256::Config"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/core/fmt/trait.Display.js b/api-docs/pow_sha256/0.2.1/implementors/core/fmt/trait.Display.js new file mode 100644 index 0000000..6a4fcf0 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/core/fmt/trait.Display.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl Display for PoWBuilderError","synthetic":false,"types":["pow_sha256::PoWBuilderError"]},{"text":"impl Display for ConfigBuilderError","synthetic":false,"types":["pow_sha256::ConfigBuilderError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.Freeze.js b/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.Freeze.js new file mode 100644 index 0000000..e8d5082 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Freeze for PoW<T>","synthetic":true,"types":["pow_sha256::PoW"]},{"text":"impl<T> Freeze for PoWBuilder<T>","synthetic":true,"types":["pow_sha256::PoWBuilder"]},{"text":"impl Freeze for PoWBuilderError","synthetic":true,"types":["pow_sha256::PoWBuilderError"]},{"text":"impl Freeze for Config","synthetic":true,"types":["pow_sha256::Config"]},{"text":"impl Freeze for ConfigBuilder","synthetic":true,"types":["pow_sha256::ConfigBuilder"]},{"text":"impl Freeze for ConfigBuilderError","synthetic":true,"types":["pow_sha256::ConfigBuilderError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.Send.js b/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.Send.js new file mode 100644 index 0000000..6a691a3 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Send for PoW<T> where
    T: Send
","synthetic":true,"types":["pow_sha256::PoW"]},{"text":"impl<T> Send for PoWBuilder<T> where
    T: Send
","synthetic":true,"types":["pow_sha256::PoWBuilder"]},{"text":"impl Send for PoWBuilderError","synthetic":true,"types":["pow_sha256::PoWBuilderError"]},{"text":"impl Send for Config","synthetic":true,"types":["pow_sha256::Config"]},{"text":"impl Send for ConfigBuilder","synthetic":true,"types":["pow_sha256::ConfigBuilder"]},{"text":"impl Send for ConfigBuilderError","synthetic":true,"types":["pow_sha256::ConfigBuilderError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.StructuralPartialEq.js b/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 0000000..3f51400 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> StructuralPartialEq for PoW<T>","synthetic":false,"types":["pow_sha256::PoW"]},{"text":"impl StructuralPartialEq for Config","synthetic":false,"types":["pow_sha256::Config"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.Sync.js b/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.Sync.js new file mode 100644 index 0000000..93ecd28 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Sync for PoW<T> where
    T: Sync
","synthetic":true,"types":["pow_sha256::PoW"]},{"text":"impl<T> Sync for PoWBuilder<T> where
    T: Sync
","synthetic":true,"types":["pow_sha256::PoWBuilder"]},{"text":"impl Sync for PoWBuilderError","synthetic":true,"types":["pow_sha256::PoWBuilderError"]},{"text":"impl Sync for Config","synthetic":true,"types":["pow_sha256::Config"]},{"text":"impl Sync for ConfigBuilder","synthetic":true,"types":["pow_sha256::ConfigBuilder"]},{"text":"impl Sync for ConfigBuilderError","synthetic":true,"types":["pow_sha256::ConfigBuilderError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.Unpin.js b/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.Unpin.js new file mode 100644 index 0000000..50ba295 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Unpin for PoW<T> where
    T: Unpin
","synthetic":true,"types":["pow_sha256::PoW"]},{"text":"impl<T> Unpin for PoWBuilder<T> where
    T: Unpin
","synthetic":true,"types":["pow_sha256::PoWBuilder"]},{"text":"impl Unpin for PoWBuilderError","synthetic":true,"types":["pow_sha256::PoWBuilderError"]},{"text":"impl Unpin for Config","synthetic":true,"types":["pow_sha256::Config"]},{"text":"impl Unpin for ConfigBuilder","synthetic":true,"types":["pow_sha256::ConfigBuilder"]},{"text":"impl Unpin for ConfigBuilderError","synthetic":true,"types":["pow_sha256::ConfigBuilderError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/serde/de/trait.Deserialize.js b/api-docs/pow_sha256/0.2.1/implementors/serde/de/trait.Deserialize.js new file mode 100644 index 0000000..f211726 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/serde/de/trait.Deserialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<'de, T> Deserialize<'de> for PoW<T>","synthetic":false,"types":["pow_sha256::PoW"]},{"text":"impl<'de> Deserialize<'de> for Config","synthetic":false,"types":["pow_sha256::Config"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/serde/ser/trait.Serialize.js b/api-docs/pow_sha256/0.2.1/implementors/serde/ser/trait.Serialize.js new file mode 100644 index 0000000..bf6cfde --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/serde/ser/trait.Serialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> Serialize for PoW<T>","synthetic":false,"types":["pow_sha256::PoW"]},{"text":"impl Serialize for Config","synthetic":false,"types":["pow_sha256::Config"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/std/error/trait.Error.js b/api-docs/pow_sha256/0.2.1/implementors/std/error/trait.Error.js new file mode 100644 index 0000000..ac62006 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/std/error/trait.Error.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl Error for PoWBuilderError","synthetic":false,"types":["pow_sha256::PoWBuilderError"]},{"text":"impl Error for ConfigBuilderError","synthetic":false,"types":["pow_sha256::ConfigBuilderError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/std/panic/trait.RefUnwindSafe.js b/api-docs/pow_sha256/0.2.1/implementors/std/panic/trait.RefUnwindSafe.js new file mode 100644 index 0000000..044005a --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/std/panic/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> RefUnwindSafe for PoW<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["pow_sha256::PoW"]},{"text":"impl<T> RefUnwindSafe for PoWBuilder<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["pow_sha256::PoWBuilder"]},{"text":"impl RefUnwindSafe for PoWBuilderError","synthetic":true,"types":["pow_sha256::PoWBuilderError"]},{"text":"impl RefUnwindSafe for Config","synthetic":true,"types":["pow_sha256::Config"]},{"text":"impl RefUnwindSafe for ConfigBuilder","synthetic":true,"types":["pow_sha256::ConfigBuilder"]},{"text":"impl RefUnwindSafe for ConfigBuilderError","synthetic":true,"types":["pow_sha256::ConfigBuilderError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/implementors/std/panic/trait.UnwindSafe.js b/api-docs/pow_sha256/0.2.1/implementors/std/panic/trait.UnwindSafe.js new file mode 100644 index 0000000..1f45ea5 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/implementors/std/panic/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["pow_sha256"] = [{"text":"impl<T> UnwindSafe for PoW<T> where
    T: UnwindSafe
","synthetic":true,"types":["pow_sha256::PoW"]},{"text":"impl<T> UnwindSafe for PoWBuilder<T> where
    T: UnwindSafe
","synthetic":true,"types":["pow_sha256::PoWBuilder"]},{"text":"impl UnwindSafe for PoWBuilderError","synthetic":true,"types":["pow_sha256::PoWBuilderError"]},{"text":"impl UnwindSafe for Config","synthetic":true,"types":["pow_sha256::Config"]},{"text":"impl UnwindSafe for ConfigBuilder","synthetic":true,"types":["pow_sha256::ConfigBuilder"]},{"text":"impl UnwindSafe for ConfigBuilderError","synthetic":true,"types":["pow_sha256::ConfigBuilderError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/light.css b/api-docs/pow_sha256/0.2.1/light.css new file mode 100644 index 0000000..fa73fe2 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/light.css @@ -0,0 +1 @@ + body{background-color:white;color:black;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.content .highlighted{color:#000 !important;background-color:#ccc;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted.trait{background-color:#c7b6ff;}.content .highlighted.traitalias{background-color:#c7b6ff;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.enum{background-color:#b4d1b9;}.content .highlighted.struct{background-color:#e7b1a0;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#c6afb3;}.content .highlighted.type{background-color:#ffc891;}.content .highlighted.foreigntype{background-color:#f5c4ff;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#8ce488;}.content .highlighted.constant,.content .highlighted.static{background-color:#c3e0ff;}.content .highlighted.primitive{background-color:#9aecff;}.content .highlighted.keyword{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}.collapse-toggle{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-focus:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;}.stab.portability>code{color:#000;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help>div>span{border-bottom-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:#FDFFD3;border-right:3px solid #ffb44c;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,.help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,.help-button:hover,.help-button:focus{border-color:#717171;}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results td span.alias{color:#000;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/main.js b/api-docs/pow_sha256/0.2.1/main.js new file mode 100644 index 0000000..7217fe8 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/main.js @@ -0,0 +1,8 @@ +if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}(function(){var rustdocVars=document.getElementById("rustdoc-vars");if(rustdocVars){window.rootPath=rustdocVars.attributes["data-root-path"].value;window.currentCrate=rustdocVars.attributes["data-current-crate"].value}var sidebarVars=document.getElementById("sidebar-vars");if(sidebarVars){window.sidebarCurrent={name:sidebarVars.attributes["data-name"].value,ty:sidebarVars.attributes["data-ty"].value,relpath:sidebarVars.attributes["data-relpath"].value,}}}());function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}function getSearchInput(){return document.getElementsByClassName("search-input")[0]}function getSearchElement(){return document.getElementById("search")}function getThemesElement(){return document.getElementById("theme-choices")}function getThemePickerElement(){return document.getElementById("theme-picker")}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function focusSearchBar(){getSearchInput().focus()}function defocusSearchBar(){getSearchInput().blur()}(function(){"use strict";var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var disableShortcuts=getSettingValue("disable-shortcuts")==="true";var search_input=getSearchInput();var searchTimeout=null;var toggleAllDocsId="toggle-all-docs";var currentTab=0;var mouseMovedAfterSearch=true;var titleBeforeSearch=document.title;var searchTitle=null;function clearInputTimeout(){if(searchTimeout!==null){clearTimeout(searchTimeout);searchTimeout=null}}function getPageId(){if(window.location.hash){var tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}function showSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(main,"hidden");removeClass(search,"hidden");mouseMovedAfterSearch=false;document.title=searchTitle}function hideSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=titleBeforeSearch}var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function getQueryStringParams(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function isHidden(elem){return elem.offsetHeight===0}var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=getSearchElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){hideSearchResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(hash,"",getNakedUrl()+window.location.search+"#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}elem=document.getElementById(savedHash.slice(1));if(!elem||!isHidden(elem)){return}var parent=elem.parentNode;if(parent&&hasClass(parent,"impl-items")){onEachLazy(parent.getElementsByClassName("collapsed"),function(e){if(e.parentNode===parent){e.click();return true}});if(isHidden(elem)){if(hasClass(parent.lastElementChild,"collapse-toggle")){parent.lastElementChild.click()}}}}}function highlightSourceLines(match,ev){if(typeof match==="undefined"){hideSidebar();match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to0){collapseDocs(collapses[0],"show")}}}}function getHelpElement(){buildHelperPopup();return document.getElementById("help")}function displayHelp(display,ev,help){help=help?help:getHelpElement();if(display===true){if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else if(hasClass(help,"hidden")===false){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}function handleEscape(ev){var help=getHelpElement();var search=getSearchElement();if(hasClass(help,"hidden")===false){displayHelp(false,ev,help)}else if(hasClass(search,"hidden")===false){clearInputTimeout();ev.preventDefault();hideSearchResults(search)}defocusSearchBar();hideThemeButtonState()}function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts===true){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();focusSearchBar();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:var themePicker=getThemePickerElement();if(themePicker.parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!=="theme-picker"){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!=="theme-picker"){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id==="theme-picker"&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}function findParentElement(elem,tagName){do{if(elem&&elem.tagName===tagName){return elem}elem=elem.parentNode}while(elem);return null}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);document.addEventListener("mousemove",function(){mouseMovedAfterSearch=true});var handleSourceHighlight=(function(){var prev_line_id=0;var set_fragment=function(name){var x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return function(ev){var cur_line_id=parseInt(ev.target.id,10);ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());document.addEventListener("click",function(ev){if(hasClass(ev.target,"help-button")){displayHelp(true,ev)}else if(hasClass(ev.target,"collapse-toggle")){collapseDocs(ev.target,"toggle")}else if(hasClass(ev.target.parentNode,"collapse-toggle")){collapseDocs(ev.target.parentNode,"toggle")}else if(ev.target.tagName==="SPAN"&&hasClass(ev.target.parentNode,"line-numbers")){handleSourceHighlight(ev)}else if(hasClass(getHelpElement(),"hidden")===false){var help=getHelpElement();var is_inside_help_popup=ev.target!==help&&help.contains(ev.target);if(is_inside_help_popup===false){addClass(help,"hidden");removeClass(document.body,"blur")}}else{var a=findParentElement(ev.target,"A");if(a&&a.hash){expandSection(a.hash.replace(/^#/,""))}}});(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=window.rootPath.match(/\.\.\//g).length+1;for(i=0;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;if(isType!==true||obj.type){var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnProperty(results,entry)){ar.push(results[entry])}}results=ar;var i,len,result;for(i=0,len=results.length;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});for(i=0,len=results.length;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function getObjectFromId(id){if(typeof id==="number"){return searchIndex[id]}return{'name':id}}function checkGenerics(obj,val){var lev_distance=MAX_LEV_DISTANCE+1;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var total=0;var done=0;var vlength=val.generics.length;for(var y=0;yGENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var allFound=true;len=val.generics.length;for(y=0;allFound===true&&yGENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch===true){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){return obj[GENERICS_DATA].some(function(name){return name===val.name})}return false}lev_distance=Math.min(levenshtein(obj[NAME],val.name),lev_distance);if(lev_distance<=MAX_LEV_DISTANCE){lev_distance=Math.ceil((checkGenerics(obj,val)+lev_distance)/2)}else if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0,len=ret.length;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(aborted===false){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function generateId(ty){if(ty.parent&&ty.parent.name){return itemTypes[ty.ty]+ty.path+ty.parent.name+ty.name}return itemTypes[ty.ty]+ty.path+ty.name}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){var query_aliases=ALIASES[filterCrates][query.search];var len=query_aliases.length;for(var i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i,it;var ty;var fullId;var returned;var in_args;var len;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0,len=inputs.length;i1?paths.length-1:1);var lev;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=generateId(ty);if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||searchWords[j].replace(/_/g,"").indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=searchWords[j].replace(/_/g,"").indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){lev=MAX_LEV_DISTANCE+1}else{lev+=1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0,len=keys.length;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function initSearchNav(){var hoverTimeout;var click_func=function(e){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}var dst=e.target.getElementsByTagName("a");if(dst.length<1){return}dst=dst[0];if(window.location.pathname===dst.pathname){hideSearchResults();document.location.href=dst.href}};var mouseover_func=function(e){if(mouseMovedAfterSearch){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}clearTimeout(hoverTimeout);hoverTimeout=setTimeout(function(){onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){removeClass(i_e,"highlighted")})});addClass(el,"highlighted")},20)}};onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){i_e.onclick=click_func;i_e.onmouseover=mouseover_func})});search_input.onkeydown=function(e){var actives=[[],[],[]];var current=0;onEachLazy(document.getElementById("results").childNodes,function(e){onEachLazy(e.getElementsByClassName("highlighted"),function(h_e){actives[current].push(h_e)});current+=1});if(e.which===38){if(e.ctrlKey){printTab(currentTab>0?currentTab-1:2)}else{if(!actives[currentTab].length||!actives[currentTab][0].previousElementSibling){return}addClass(actives[currentTab][0].previousElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===40){if(e.ctrlKey){printTab(currentTab>1?0:currentTab+1)}else if(!actives[currentTab].length){var results=document.getElementById("results").childNodes;if(results.length>0){var res=results[currentTab].getElementsByClassName("result");if(res.length>0){addClass(res[0],"highlighted")}}}else if(actives[currentTab][0].nextElementSibling){addClass(actives[currentTab][0].nextElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}e.preventDefault()}else if(e.which===13){if(actives[currentTab].length){document.location.href=actives[currentTab][0].getElementsByTagName("a")[0].href}}else if(e.which===16){}else if(actives[currentTab].length>0){removeClass(actives[currentTab][0],"highlighted")}}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=window.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=window.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=window.rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var splitPath=item.path.split("::");var enumName=splitPath.pop();path=splitPath.join("::");displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=window.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=window.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraStyle="";if(display===false){extraStyle=" style=\"display: none;\""}var output="";var duplicates={};var length=0;if(array.length>0){output="";array.forEach(function(item){var name,type;name=item.name;type=itemTypes[item.ty];if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}length+=1;output+=""});output+="
"+""+(item.is_alias===true?(""+item.alias+"  - see "):"")+item.displayPath+""+name+""+""+""+item.desc+" 
"}else{output="
No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:
"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(currentTab===tabNb){return""}return""}function showResults(results){var search=getSearchElement();if(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==getSearchLoadingText())){var elem=document.createElement("a");elem.href=results.others[0].href;elem.style.display="none";document.body.appendChild(elem);elem.click();return}var query=getQuery(search_input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}var output="

Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"+ret_others[0]+ret_in_args[0]+ret_returned[0]+"
";search.innerHTML=output;showSearchResults(search);initSearchNav();var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0,len=positions.length;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0,arrays_len=arrays.length;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0,len=queries.length;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnProperty(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=getQueryStringParams();var query=getQuery(search_input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(forced!==true&&query.id===currentResults){if(query.query.length>0){putBackSearch(search_input)}return}searchTitle="Results for "+query.query+" - Rust";if(browserSupportsHistoryApi()){var newURL=getNakedUrl()+"?search="+encodeURIComponent(query.raw)+window.location.hash;if(!history.state&&!params.search){history.pushState(query,"",newURL)}else{history.replaceState(query,"",newURL)}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates))}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i;var currentIndex=0;for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);searchIndex.push({crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,type:null,});currentIndex+=1;var items=rawSearchIndex[crate].i;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i0){search_input.value=params.search;search(e)}else{search_input.value="";hideSearchResults()}})}search()}index=buildIndex(rawSearchIndex);startSearch();if(window.rootPath==="../"||window.rootPath==="./"){var sidebar=document.getElementsByClassName("sidebar-elems")[0];if(sidebar){var div=document.createElement("div");div.className="block crate";div.innerHTML="

Crates

";var ul=document.createElement("ul");div.appendChild(ul);var crates=[];for(var crate in rawSearchIndex){if(!hasOwnProperty(rawSearchIndex,crate)){continue}crates.push(crate)}crates.sort();for(var i=0;i','`').replace('','`');return x.innerText}window.initSidebarItems=function(items){var sidebar=document.getElementsByClassName("sidebar-elems")[0];var current=window.sidebarCurrent;function block(shortty,longty){var filtered=items[shortty];if(!filtered){return}var div=document.createElement("div");div.className="block "+shortty;var h3=document.createElement("h3");h3.textContent=longty;div.appendChild(h3);var ul=document.createElement("ul");for(var i=0,len=filtered.length;i"+""+"
"+code.outerHTML+"
";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function onEveryMatchingChild(elem,className,func){if(elem&&className&&func){var length=elem.childNodes.length;var nodes=elem.childNodes;for(var i=0;i"+labelForToggleButton(sectionIsCollapsed)+"
]";return toggle}function createToggle(toggle,otherMessage,fontSize,extraClass,show){var span=document.createElement("span");span.className="toggle-label";if(show){span.style.display="none"}if(!otherMessage){span.innerHTML=" Expand description"}else{span.innerHTML=otherMessage}if(fontSize){span.style.fontSize=fontSize}var mainToggle=toggle.cloneNode(true);mainToggle.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper";if(!show){addClass(wrapper,"collapsed");var inner=mainToggle.getElementsByClassName("inner");if(inner&&inner.length>0){inner[0].innerHTML="+"}}if(extraClass){addClass(wrapper,extraClass)}wrapper.appendChild(mainToggle);return wrapper}(function(){var toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}var toggle=createSimpleToggle(false);var hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";var hideImplementors=getSettingValue("auto-collapse-implementors")!=="false";var func=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(!next){return}if(hasClass(next,"docblock")){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideMethodDocs===true&&hasClass(e,"method")===true){collapseDocs(newToggle,"hide")}}};var funcImpl=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"item-info")){next=next.nextElementSibling}if(next&&hasClass(next,"docblock")){next=next.nextElementSibling}if(!next){return}if(hasClass(e,"impl")&&(next.getElementsByClassName("method").length>0||next.getElementsByClassName("associatedconstant").length>0)){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideImplementors===true&&e.parentNode.id==="implementors-list"){collapseDocs(newToggle,"hide")}}};onEachLazy(document.getElementsByClassName("method"),func);onEachLazy(document.getElementsByClassName("associatedconstant"),func);onEachLazy(document.getElementsByClassName("impl"),funcImpl);var impl_call=function(){};if(hideMethodDocs===true){impl_call=function(e,newToggle){if(e.id.match(/^impl(?:-\d+)?$/)===null){if(hasClass(e,"impl")===true){collapseDocs(newToggle,"hide")}}}}var newToggle=document.createElement("a");newToggle.href="javascript:void(0)";newToggle.className="collapse-toggle hidden-default collapsed";newToggle.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items";function toggleClicked(){if(hasClass(this,"collapsed")){removeClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("hidden"),function(x){if(hasClass(x,"content")===false){removeClass(x,"hidden");addClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(false)+"] Hide undocumented items"}else{addClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("x"),function(x){if(hasClass(x,"content")===false){addClass(x,"hidden");removeClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items"}}onEachLazy(document.getElementsByClassName("impl-items"),function(e){onEachLazy(e.getElementsByClassName("associatedconstant"),func);var hiddenElems=Array.prototype.slice.call(e.getElementsByClassName("hidden"));var needToggle=hiddenElems.some(function(hiddenElem){return hasClass(hiddenElem,"content")===false&&hasClass(hiddenElem,"docblock")===false});if(needToggle===true){var inner_toggle=newToggle.cloneNode(true);inner_toggle.onclick=toggleClicked;e.insertBefore(inner_toggle,e.firstChild);impl_call(e.previousSibling,inner_toggle)}});var currentType=document.getElementsByClassName("type-decl")[0];var className=null;if(currentType){currentType=currentType.getElementsByClassName("rust")[0];if(currentType){currentType.classList.forEach(function(item){if(item!=="main"){className=item;return true}})}}var showItemDeclarations=getSettingValue("auto-hide-"+className);if(showItemDeclarations===null){if(className==="enum"||className==="macro"){showItemDeclarations="false"}else if(className==="struct"||className==="union"||className==="trait"){showItemDeclarations="true"}else{showItemDeclarations=getSettingValue("auto-hide-declarations")}}showItemDeclarations=showItemDeclarations==="false";function buildToggleWrapper(e){if(hasClass(e,"autohide")){var wrap=e.previousElementSibling;if(wrap&&hasClass(wrap,"toggle-wrapper")){var inner_toggle=wrap.childNodes[0];var extra=e.childNodes[0].tagName==="H3";e.style.display="none";addClass(wrap,"collapsed");onEachLazy(inner_toggle.getElementsByClassName("inner"),function(e){e.innerHTML=labelForToggleButton(true)});onEachLazy(inner_toggle.getElementsByClassName("toggle-label"),function(e){e.style.display="inline-block";if(extra===true){e.innerHTML=" Show "+e.childNodes[0].innerHTML}})}}if(e.parentNode.id==="main"){var otherMessage="";var fontSize;var extraClass;if(hasClass(e,"type-decl")){fontSize="20px";otherMessage=" Show declaration";if(showItemDeclarations===false){extraClass="collapsed"}}else if(hasClass(e,"sub-variant")){otherMessage=" Show fields"}else if(hasClass(e,"non-exhaustive")){otherMessage=" This ";if(hasClass(e,"non-exhaustive-struct")){otherMessage+="struct"}else if(hasClass(e,"non-exhaustive-enum")){otherMessage+="enum"}else if(hasClass(e,"non-exhaustive-variant")){otherMessage+="enum variant"}else if(hasClass(e,"non-exhaustive-type")){otherMessage+="type"}otherMessage+=" is marked as non-exhaustive"}else if(hasClass(e.childNodes[0],"impl-items")){extraClass="marg-left"}e.parentNode.insertBefore(createToggle(toggle,otherMessage,fontSize,extraClass,hasClass(e,"type-decl")===false||showItemDeclarations===true),e);if(hasClass(e,"type-decl")===true&&showItemDeclarations===true){collapseDocs(e.previousSibling.childNodes[0],"toggle")}if(hasClass(e,"non-exhaustive")===true){collapseDocs(e.previousSibling.childNodes[0],"toggle")}}}onEachLazy(document.getElementsByClassName("docblock"),buildToggleWrapper);onEachLazy(document.getElementsByClassName("sub-variant"),buildToggleWrapper);autoCollapse(getSettingValue("collapse")==="true");var pageId=getPageId();if(pageId!==null){expandSection(pageId)}}());function createToggleWrapper(tog){var span=document.createElement("span");span.className="toggle-label";span.style.display="none";span.innerHTML=" Expand attributes";tog.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper toggle-attributes";wrapper.appendChild(tog);return wrapper}(function(){var itemAttributesFunc=function(){};if(getSettingValue("auto-hide-attributes")!=="false"){itemAttributesFunc=function(x){collapseDocs(x.previousSibling.childNodes[0],"toggle")}}var attributesToggle=createToggleWrapper(createSimpleToggle(false));onEachLazy(main.getElementsByClassName("attributes"),function(i_e){var attr_tog=attributesToggle.cloneNode(true);if(hasClass(i_e,"top-attr")===true){addClass(attr_tog,"top-attr")}i_e.parentNode.insertBefore(attr_tog,i_e);itemAttributesFunc(i_e)})}());(function(){var lineNumbersFunc=function(){};if(getSettingValue("line-numbers")==="true"){lineNumbersFunc=function(x){var count=x.textContent.split("\n").length;var elems=[];for(var i=0;i"+getSearchLoadingText()+"";showSearchResults(search)}var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")===true){hideSidebar()}else{showSidebar()}}}if(main){onEachLazy(main.getElementsByClassName("loading-content"),function(e){e.remove()});onEachLazy(main.childNodes,function(e){if(e.tagName==="H2"||e.tagName==="H3"){var nextTagName=e.nextElementSibling.tagName;if(nextTagName=="H2"||nextTagName=="H3"){e.nextElementSibling.style.display="flex"}else{e.nextElementSibling.style.display="block"}}})}function enableSearchInput(){if(search_input){search_input.removeAttribute('disabled')}}window.addSearchOptions=function(crates){var elem=document.getElementById("crate-search");if(!elem){enableSearchInput();return}var crates_text=[];if(Object.keys(crates).length>1){for(var crate in crates){if(hasOwnProperty(crates,crate)){crates_text.push(crate)}}}crates_text.sort(function(a,b){var lower_a=a.toLowerCase();var lower_b=b.toLowerCase();if(lower_alower_b){return 1}return 0});var savedCrate=getSettingValue("saved-filter-crate");for(var i=0,len=crates_text.length;ithe rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["ctrl + ↑ / ↓","Switch result tab"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>(index&1)===0?""+y+"":" "+y+" ").join("")+"
"+x[1]+"
").join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";var infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + * -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ + str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);popup.appendChild(container);insertAfter(popup,getSearchElement());buildHelperPopup=function(){}}onHashChange(null);window.onhashchange=onHashChange}());window.onunload=function(){} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/normalize.css b/api-docs/pow_sha256/0.2.1/normalize.css new file mode 100644 index 0000000..6d692b5 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/normalize.css @@ -0,0 +1,2 @@ + /*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/noscript.css b/api-docs/pow_sha256/0.2.1/noscript.css new file mode 100644 index 0000000..5cbcb90 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/noscript.css @@ -0,0 +1 @@ + #main>h2+div,#main>h2+h3,#main>h3+div{display:block;}.loading-content{display:none;}#main>h2+div,#main>h3+div{display:block;}#main>h2+h3{display:flex;}#main .impl-items .hidden{display:block !important;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/pow_sha256/all.html b/api-docs/pow_sha256/0.2.1/pow_sha256/all.html new file mode 100644 index 0000000..7eeaa14 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/pow_sha256/all.html @@ -0,0 +1,7 @@ +List of all items in this crate + +

List of all items[] + +

Structs

Enums

+ \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/pow_sha256/enum.ConfigBuilderError.html b/api-docs/pow_sha256/0.2.1/pow_sha256/enum.ConfigBuilderError.html new file mode 100644 index 0000000..71204c3 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/pow_sha256/enum.ConfigBuilderError.html @@ -0,0 +1,32 @@ +pow_sha256::ConfigBuilderError - Rust + +

Enum pow_sha256::ConfigBuilderError[][src]

#[non_exhaustive]pub enum ConfigBuilderError {
+    UninitializedField(&'static str),
+    ValidationError(String),
+}

Error type for ConfigBuilder

+

+ Variants (Non-exhaustive)

+
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UninitializedField(&'static str)

Uninitialized field

+
ValidationError(String)

Custom validation error

+

Trait Implementations

impl Debug for ConfigBuilderError[src]

impl Display for ConfigBuilderError[src]

impl Error for ConfigBuilderError[src]

impl From<String> for ConfigBuilderError[src]

impl From<UninitializedFieldError> for ConfigBuilderError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
+ \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/pow_sha256/enum.PoWBuilderError.html b/api-docs/pow_sha256/0.2.1/pow_sha256/enum.PoWBuilderError.html new file mode 100644 index 0000000..f42826d --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/pow_sha256/enum.PoWBuilderError.html @@ -0,0 +1,32 @@ +pow_sha256::PoWBuilderError - Rust + +

Enum pow_sha256::PoWBuilderError[][src]

#[non_exhaustive]pub enum PoWBuilderError {
+    UninitializedField(&'static str),
+    ValidationError(String),
+}

Error type for PoWBuilder

+

+ Variants (Non-exhaustive)

+
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UninitializedField(&'static str)

Uninitialized field

+
ValidationError(String)

Custom validation error

+

Trait Implementations

impl Debug for PoWBuilderError[src]

impl Display for PoWBuilderError[src]

impl Error for PoWBuilderError[src]

impl From<String> for PoWBuilderError[src]

impl From<UninitializedFieldError> for PoWBuilderError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
+ \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/pow_sha256/index.html b/api-docs/pow_sha256/0.2.1/pow_sha256/index.html new file mode 100644 index 0000000..8fc95e5 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/pow_sha256/index.html @@ -0,0 +1,35 @@ +pow_sha256 - Rust + +

Crate pow_sha256[][src]

MCaptch's SHA256 based Proof of Work library

+

Example:

+
+  use pow_sha256::{ConfigBuilder, PoW};
+
+  fn main() {
+      let config = ConfigBuilder::default()
+        .salt("myrandomsaltisnotlongenoug".into())
+        .build()
+        .unwrap();
+
+      let phrase = "ironmansucks";
+
+      const DIFFICULTY: u32 = 1000;
+
+      let work = config.prove_work(&phrase, DIFFICULTY).unwrap();
+      assert!(config.is_valid_proof(&work, &phrase));
+      assert!(config.is_sufficient_difficulty(&work, DIFFICULTY));
+  }    
+

Structs

+
Config

Configuration for generting proof of work +Please choose a long, unique value for salt +Resistance to dictionary/rainbow attacks depend on uniqueness +of the salt

+
ConfigBuilder

Builder for Config.

+
PoW

Proof of Work over concrete type T. T can be any type that implements serde::Serialize.

+
PoWBuilder

Builder for PoW.

+

Enums

+
ConfigBuilderError

Error type for ConfigBuilder

+
PoWBuilderError

Error type for PoWBuilder

+
+ \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/pow_sha256/sidebar-items.js b/api-docs/pow_sha256/0.2.1/pow_sha256/sidebar-items.js new file mode 100644 index 0000000..762b340 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/pow_sha256/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["ConfigBuilderError","Error type for ConfigBuilder"],["PoWBuilderError","Error type for PoWBuilder"]],"struct":[["Config","Configuration for generting proof of work Please choose a long, unique value for salt Resistance to dictionary/rainbow attacks depend on uniqueness of the salt"],["ConfigBuilder","Builder for `Config`."],["PoW","Proof of Work over concrete type T. T can be any type that implements serde::Serialize."],["PoWBuilder","Builder for `PoW`."]]}); \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/pow_sha256/struct.Config.html b/api-docs/pow_sha256/0.2.1/pow_sha256/struct.Config.html new file mode 100644 index 0000000..4366ffd --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/pow_sha256/struct.Config.html @@ -0,0 +1,47 @@ +pow_sha256::Config - Rust + +

Struct pow_sha256::Config[][src]

pub struct Config {
+    pub salt: String,
+}

Configuration for generting proof of work +Please choose a long, unique value for salt +Resistance to dictionary/rainbow attacks depend on uniqueness +of the salt

+

+ Fields

salt: String

Implementations

impl Config[src]

pub fn prove_work<T>(&self, t: &T, difficulty: u32) -> Result<PoW<T>> where
    T: Serialize
[src]

Create Proof of Work over item of type T.

+

Make sure difficulty is not too high. A 64 bit difficulty, +for example, takes a long time on a general purpose processor. +Returns bincode::Error if serialization fails.

+

pub fn prove_work_serialized<T>(&self, prefix: &[u8], difficulty: u32) -> PoW<T> where
    T: Serialize
[src]

Create Proof of Work on an already serialized item of type T. +The input is assumed to be serialized using network byte order.

+

Make sure difficulty is not too high. A 64 bit difficulty, +for example, takes a long time on a general purpose processor.

+

pub fn calculate<T>(&self, pow: &PoW<T>, t: &T) -> Result<u128> where
    T: Serialize
[src]

Calculate the PoW score with the provided input T.

+

pub fn calculate_serialized<T>(&self, pow: &PoW<T>, target: &[u8]) -> u128 where
    T: Serialize
[src]

Calculate the PoW score of an already serialized T and self. +The input is assumed to be serialized using network byte order.

+

pub fn is_valid_proof<T>(&self, pow: &PoW<T>, t: &T) -> bool where
    T: Serialize
[src]

Verifies that the PoW is indeed generated out of the phrase provided.

+

pub fn is_sufficient_difficulty<T>(
    &self,
    pow: &PoW<T>,
    target_diff: u32
) -> bool where
    T: Serialize
[src]

Checks if the PoW result is of sufficient difficulty

+

Trait Implementations

impl Clone for Config[src]

impl Debug for Config[src]

impl<'de> Deserialize<'de> for Config[src]

impl PartialEq<Config> for Config[src]

impl Serialize for Config[src]

impl StructuralPartialEq for Config[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
+ \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/pow_sha256/struct.ConfigBuilder.html b/api-docs/pow_sha256/0.2.1/pow_sha256/struct.ConfigBuilder.html new file mode 100644 index 0000000..ce242f1 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/pow_sha256/struct.ConfigBuilder.html @@ -0,0 +1,26 @@ +pow_sha256::ConfigBuilder - Rust + +

Struct pow_sha256::ConfigBuilder[][src]

pub struct ConfigBuilder { /* fields omitted */ }

Builder for Config.

+

Implementations

impl ConfigBuilder[src]

pub fn salt(&mut self, value: String) -> &mut Self[src]

pub fn build(&self) -> Result<Config, ConfigBuilderError>[src]

Builds a new Config.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl Clone for ConfigBuilder[src]

impl Default for ConfigBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
+ \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/pow_sha256/struct.PoW.html b/api-docs/pow_sha256/0.2.1/pow_sha256/struct.PoW.html new file mode 100644 index 0000000..3ca72e7 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/pow_sha256/struct.PoW.html @@ -0,0 +1,33 @@ +pow_sha256::PoW - Rust + +

Struct pow_sha256::PoW[][src]

pub struct PoW<T> {
+    pub nonce: u64,
+    pub result: String,
+    // some fields omitted
+}

Proof of Work over concrete type T. T can be any type that implements serde::Serialize.

+

+ Fields

nonce: u64result: String

Trait Implementations

impl<T: Clone> Clone for PoW<T>[src]

impl<T: Debug> Debug for PoW<T>[src]

impl<'de, T> Deserialize<'de> for PoW<T>[src]

impl<T: PartialEq> PartialEq<PoW<T>> for PoW<T>[src]

impl<T> Serialize for PoW<T>[src]

impl<T> StructuralPartialEq for PoW<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for PoW<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for PoW<T> where
    T: Send
[src]

impl<T> Sync for PoW<T> where
    T: Sync
[src]

impl<T> Unpin for PoW<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for PoW<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
+ \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/pow_sha256/struct.PoWBuilder.html b/api-docs/pow_sha256/0.2.1/pow_sha256/struct.PoWBuilder.html new file mode 100644 index 0000000..07d9793 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/pow_sha256/struct.PoWBuilder.html @@ -0,0 +1,26 @@ +pow_sha256::PoWBuilder - Rust + +

Struct pow_sha256::PoWBuilder[][src]

pub struct PoWBuilder<T> { /* fields omitted */ }

Builder for PoW.

+

Implementations

impl<T: Clone> PoWBuilder<T>[src]

pub fn nonce(&mut self, value: u64) -> &mut Self[src]

pub fn result(&mut self, value: String) -> &mut Self[src]

pub fn build(&self) -> Result<PoW<T>, PoWBuilderError>[src]

Builds a new PoW.

+

Errors

+

If a required field has not been initialized.

+

Trait Implementations

impl<T: Clone> Clone for PoWBuilder<T>[src]

impl<T: Clone> Default for PoWBuilder<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for PoWBuilder<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for PoWBuilder<T> where
    T: Send
[src]

impl<T> Sync for PoWBuilder<T> where
    T: Sync
[src]

impl<T> Unpin for PoWBuilder<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for PoWBuilder<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
+ \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/rust-logo.png b/api-docs/pow_sha256/0.2.1/rust-logo.png new file mode 100644 index 0000000..74b4bd6 Binary files /dev/null and b/api-docs/pow_sha256/0.2.1/rust-logo.png differ diff --git a/api-docs/pow_sha256/0.2.1/rustdoc.css b/api-docs/pow_sha256/0.2.1/rustdoc.css new file mode 100644 index 0000000..ecb81ce --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/rustdoc.css @@ -0,0 +1 @@ + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff") format('woff');}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:400;src:local('Source Serif Pro'),url("SourceSerifPro-Regular.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:italic;font-weight:400;src:local('Source Serif Pro Italic'),url("SourceSerifPro-It.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:700;src:local('Source Serif Pro Bold'),url("SourceSerifPro-Bold.ttf.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.woff") format('woff');}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif Pro",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.notable),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{border-bottom:1px dashed;margin-top:0;}h1.fqn>.in-band>a:hover{text-decoration:underline;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border-bottom:1px solid;}h3.impl,h3.method,h4.method,h3.type,h4.type,h4.associatedconstant{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}h3.impl,h3.method,h3.type{padding-left:15px;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.content table td:first-child>a,.collapse-toggle,div.item-list .out-of-band,#source-sidebar,#sidebar-toggle,#main>ul.docblock>li>a{font-family:"Fira Sans",sans-serif;}.content ul.crate a.crate{font:16px/1.6 "Fira Sans";}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}code,pre,a.test-arrow{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code,.docblock code.spotlight{padding:0;padding-right:1ex;}.docblock code.spotlight :last-child{padding-bottom:0.6em;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;min-width:70em;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-child{font-weight:500;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{margin-top:0;margin-bottom:8px;text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc:not(.source) .example-wrap{display:inline-flex;margin-bottom:10px;position:relative;}.example-wrap{width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;border-top-left-radius:5px;border-bottom-left-radius:5px;padding:13px 8px;text-align:right;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results{position:absolute;right:0;left:0;overflow:auto;}#results>table{width:100%;table-layout:fixed;margin-bottom:40px;}.content pre.line-numbers{float:left;border:none;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock-short code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}#main>.docblock h1{font-size:1.3em;}#main>.docblock h2{font-size:1.15em;}#main>.docblock h3,#main>.docblock h4,#main>.docblock h5{font-size:1em;}#main>h2+div,#main>h2+h3,#main>h3+div{display:none;flex-wrap:wrap;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{float:right;font-size:23px;margin:0px;padding:0px;font-weight:normal;}h3.impl>.out-of-band{font-size:21px;}h4.method>.out-of-band{font-size:19px;}h4>code,h3>code,.invisible>code{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{margin:0px;padding:0px;}.in-band>code{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content .method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.notable-traits){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items>h4{border-bottom:0;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.toggle-wrapper.marg-left>.collapse-toggle{left:-24px;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .item-info code{font-size:90%;}.content .item-info{position:relative;margin-left:33px;margin-top:-13px;}.sub-variant>div>.item-info{margin-top:initial;}.content .item-info::before{content:'⬑';font-size:25px;position:absolute;top:-6px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.item-info{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.item-info a{text-decoration:underline;}.invisible>.srclink,h4>code+.srclink,h3>code+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 63px);}#crate-search{margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results .desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results a{display:block;}.content .search-results td:first-child{padding-right:0;width:50%;}.content .search-results td:first-child a{padding-right:10px;}.content .search-results td:first-child a:after{clear:both;content:"";display:block;}.content .search-results td:first-child a span{float:left;}tr.result span.primitive::after{content:' (primitive type)';font-style:italic;}tr.result span.keyword::after{content:' (keyword)';font-style:italic;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help>div>span{text-align:center;display:block;margin:10px 0;font-size:18px;border-bottom:1px solid #ccc;padding-bottom:4px;margin-bottom:6px;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.module-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since,.methods .since{flex-grow:0;padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code,.methods code{flex-grow:1;}.impl-items h4,h4.impl,h3.impl,.methods h3{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.collapse-toggle{font-weight:300;position:absolute;left:-23px;top:0;}h3>.collapse-toggle,h4>.collapse-toggle{font-size:0.8em;top:5px;}.toggle-wrapper>.collapse-toggle{left:-24px;margin-top:0px;}.toggle-wrapper{position:relative;margin-top:0;}.toggle-wrapper.collapsed{height:25px;transition:height .2s;margin-bottom:.6em;}.collapse-toggle>.inner{display:inline-block;width:1.2ch;text-align:center;}.collapse-toggle.hidden-default{position:relative;margin-left:20px;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.toggle-wrapper>.collapse-toggle{left:0;}.variant+.toggle-wrapper+.docblock>p{margin-top:5px;}.sub-variant,.sub-variant>h3{margin-top:1px !important;}#main>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.enum>.toggle-wrapper+.docblock,.struct>.toggle-wrapper+.docblock{margin-left:30px;margin-bottom:20px;margin-top:5px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}.enum>.collapsed,.struct>.collapsed{margin-bottom:25px;}#main>.variant,#main>.structfield{display:block;}.attributes{display:block;margin-top:0px !important;margin-right:0px;margin-bottom:0px !important;margin-left:30px;}.toggle-attributes.collapsed{margin-bottom:0;}.impl-items>.toggle-attributes{margin-left:20px;}.impl-items .attributes{font-weight:500;}:target>code{opacity:1;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:16px;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:20px;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:16px;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:20px;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border:0;border-top:2px solid;}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:16px;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}h4>.notable-traits{position:absolute;left:-44px;top:2px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu,.help-button{position:absolute;top:10px;}#settings-menu{right:0;outline:none;}.help-button{right:30px;font-family:"Fira Sans",sans-serif;text-align:center;font-size:17px;}#theme-picker,#settings-menu,.help-button{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}@media (min-width:701px){.information:first-child>.tooltip{margin-top:16px;}}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;left:0;top:45px;bottom:0;overflow-y:auto;border-right:1px solid;display:none;}.sidebar>.block.version{border-bottom:none;margin-top:12px;margin-bottom:0;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main,#search{margin-top:45px;padding:0;}.content .in-band{width:100%;}.content h4>.out-of-band{position:inherit;}.toggle-wrapper>.collapse-toggle{left:0px;}.toggle-wrapper{height:1.5em;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{display:flex;}.anchor{display:none !important;}h1.fqn{overflow:initial;}.theme-picker{left:10px;top:54px;z-index:1;}h4>.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar.mobile>div.version{overflow:hidden;max-height:33px;}.sidebar{width:calc(100% + 30px);}.show-it{display:block;width:246px;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}.collapse-toggle{left:-20px;}.impl>.collapse-toggle{left:-10px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}.help-button{display:none;}.search-container>div{width:calc(100% - 32px);}}@media print{nav.sub,.content .out-of-band,.collapse-toggle{display:none;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main,#search{margin-top:100px;}#main>table:not(.table-display) td{word-break:break-word;width:50%;}.search-container>div{display:block;width:calc(100% - 37px);}#crate-search{width:100%;border-radius:4px;border:0;}#crate-search+.search-input{width:calc(100% + 71px);margin-left:-36px;}#theme-picker,#settings-menu{padding:5px;width:31px;height:31px;}#theme-picker{margin-top:-2px;}#settings-menu{top:7px;}.docblock{margin-left:12px;}}h3.notable{margin:0;margin-bottom:13px;font-size:19px;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}.type-decl>pre>.toggle-wrapper.toggle-attributes.top-attr{margin-left:0 !important;}.type-decl>pre>.docblock.attributes.top-attr{margin-left:1.8em !important;}.type-decl>pre>.toggle-attributes{margin-left:2.2em;}.type-decl>pre>.docblock.attributes{margin-left:4em;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/search-index.js b/api-docs/pow_sha256/0.2.1/search-index.js new file mode 100644 index 0000000..efa6ca5 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/search-index.js @@ -0,0 +1,4 @@ +var searchIndex = JSON.parse('{\ +"pow_sha256":{"doc":"MCaptch\'s SHA256 based Proof of Work library","i":[[3,"PoW","pow_sha256","Proof of Work over concrete type T. T can be any type …",null,null],[12,"nonce","","",0,null],[12,"result","","",0,null],[3,"PoWBuilder","","Builder for PoW.",null,null],[11,"nonce","","",1,[[["u64",15]]]],[11,"result","","",1,[[["string",3]]]],[11,"build","","Builds a new PoW.",1,[[],[["pow",3],["powbuildererror",4],["result",4]]]],[4,"PoWBuilderError","","Error type for PoWBuilder",null,null],[13,"UninitializedField","","Uninitialized field",2,null],[13,"ValidationError","","Custom validation error",2,null],[3,"Config","","Configuration for generting proof of work Please choose a …",null,null],[12,"salt","","",3,null],[3,"ConfigBuilder","","Builder for Config.",null,null],[11,"salt","","",4,[[["string",3]]]],[11,"build","","Builds a new Config.",4,[[],[["config",3],["configbuildererror",4],["result",4]]]],[4,"ConfigBuilderError","","Error type for ConfigBuilder",null,null],[13,"UninitializedField","","Uninitialized field",5,null],[13,"ValidationError","","Custom validation error",5,null],[11,"prove_work","","Create Proof of Work over item of type T.",3,[[["u32",15]],[["pow",3],["result",6]]]],[11,"prove_work_serialized","","Create Proof of Work on an already serialized item of …",3,[[["u32",15]],["pow",3]]],[11,"calculate","","Calculate the PoW score with the provided input T.",3,[[["pow",3]],[["u128",15],["result",6]]]],[11,"calculate_serialized","","Calculate the PoW score of an already serialized T and …",3,[[["pow",3]],["u128",15]]],[11,"is_valid_proof","","Verifies that the PoW is indeed generated out of the …",3,[[["pow",3]],["bool",15]]],[11,"is_sufficient_difficulty","","Checks if the PoW result is of sufficient difficulty",3,[[["u32",15],["pow",3]],["bool",15]]],[11,"from","","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"from","","",1,[[]]],[11,"into","","",1,[[]]],[11,"to_owned","","",1,[[]]],[11,"clone_into","","",1,[[]]],[11,"borrow","","",1,[[]]],[11,"borrow_mut","","",1,[[]]],[11,"try_from","","",1,[[],["result",4]]],[11,"try_into","","",1,[[],["result",4]]],[11,"type_id","","",1,[[],["typeid",3]]],[11,"from","","",2,[[]]],[11,"into","","",2,[[]]],[11,"to_string","","",2,[[],["string",3]]],[11,"borrow","","",2,[[]]],[11,"borrow_mut","","",2,[[]]],[11,"try_from","","",2,[[],["result",4]]],[11,"try_into","","",2,[[],["result",4]]],[11,"type_id","","",2,[[],["typeid",3]]],[11,"from","","",3,[[]]],[11,"into","","",3,[[]]],[11,"to_owned","","",3,[[]]],[11,"clone_into","","",3,[[]]],[11,"borrow","","",3,[[]]],[11,"borrow_mut","","",3,[[]]],[11,"try_from","","",3,[[],["result",4]]],[11,"try_into","","",3,[[],["result",4]]],[11,"type_id","","",3,[[],["typeid",3]]],[11,"from","","",4,[[]]],[11,"into","","",4,[[]]],[11,"to_owned","","",4,[[]]],[11,"clone_into","","",4,[[]]],[11,"borrow","","",4,[[]]],[11,"borrow_mut","","",4,[[]]],[11,"try_from","","",4,[[],["result",4]]],[11,"try_into","","",4,[[],["result",4]]],[11,"type_id","","",4,[[],["typeid",3]]],[11,"from","","",5,[[]]],[11,"into","","",5,[[]]],[11,"to_string","","",5,[[],["string",3]]],[11,"borrow","","",5,[[]]],[11,"borrow_mut","","",5,[[]]],[11,"try_from","","",5,[[],["result",4]]],[11,"try_into","","",5,[[],["result",4]]],[11,"type_id","","",5,[[],["typeid",3]]],[11,"from","","",2,[[["uninitializedfielderror",3]]]],[11,"from","","",2,[[["string",3]]]],[11,"from","","",5,[[["uninitializedfielderror",3]]]],[11,"from","","",5,[[["string",3]]]],[11,"clone","","",1,[[],["powbuilder",3]]],[11,"clone","","",0,[[],["pow",3]]],[11,"clone","","",4,[[],["configbuilder",3]]],[11,"clone","","",3,[[],["config",3]]],[11,"default","","",1,[[]]],[11,"default","","",4,[[]]],[11,"eq","","",0,[[["pow",3]],["bool",15]]],[11,"ne","","",0,[[["pow",3]],["bool",15]]],[11,"eq","","",3,[[["config",3]],["bool",15]]],[11,"ne","","",3,[[["config",3]],["bool",15]]],[11,"fmt","","",2,[[["formatter",3]],["result",6]]],[11,"fmt","","",0,[[["formatter",3]],["result",6]]],[11,"fmt","","",5,[[["formatter",3]],["result",6]]],[11,"fmt","","",3,[[["formatter",3]],["result",6]]],[11,"fmt","","",2,[[["formatter",3]],["result",6]]],[11,"fmt","","",5,[[["formatter",3]],["result",6]]],[11,"serialize","","",0,[[],["result",4]]],[11,"serialize","","",3,[[],["result",4]]],[11,"deserialize","","",0,[[],["result",4]]],[11,"deserialize","","",3,[[],["result",4]]]],"p":[[3,"PoW"],[3,"PoWBuilder"],[4,"PoWBuilderError"],[3,"Config"],[3,"ConfigBuilder"],[4,"ConfigBuilderError"]]}\ +}'); +addSearchOptions(searchIndex);initSearch(searchIndex); \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/settings.css b/api-docs/pow_sha256/0.2.1/settings.css new file mode 100644 index 0000000..6709865 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/settings.css @@ -0,0 +1 @@ +.setting-line{padding:5px;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.select-wrapper{float:right;position:relative;height:27px;min-width:25%;}.select-wrapper select{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:2px solid #ccc;padding-right:28px;width:100%;}.select-wrapper img{pointer-events:none;position:absolute;right:0;bottom:0;background:#ccc;height:100%;width:28px;padding:0px 4px;}.select-wrapper select option{color:initial;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/settings.html b/api-docs/pow_sha256/0.2.1/settings.html new file mode 100644 index 0000000..a7872cd --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/settings.html @@ -0,0 +1,7 @@ +Rustdoc settings + +

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
+
Auto-hide item declarations
Auto-hide structs declaration
Auto-hide enums declaration
Auto-hide unions declaration
Auto-hide traits declaration
Auto-hide macros declaration
+
Auto-hide item attributes.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Auto-hide implementors of a trait
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
+ \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/settings.js b/api-docs/pow_sha256/0.2.1/settings.js new file mode 100644 index 0000000..b4d6fdc --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/settings.js @@ -0,0 +1 @@ +(function(){function changeSetting(settingName,value){updateLocalStorage("rustdoc-"+settingName,value);switch(settingName){case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function setEvents(){onEachLazy(document.getElementsByClassName("slider"),function(elem){var toggle=elem.previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(document.getElementsByClassName("select-wrapper"),function(elem){var select=elem.getElementsByTagName("select")[0];var settingId=select.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}})}window.addEventListener("DOMContentLoaded",setEvents)})() \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/source-files.js b/api-docs/pow_sha256/0.2.1/source-files.js new file mode 100644 index 0000000..c682f6c --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/source-files.js @@ -0,0 +1,3 @@ +var N = null;var sourcesIndex = {}; +sourcesIndex["pow_sha256"] = {"name":"","files":["lib.rs"]}; +createSourceSidebar(); diff --git a/api-docs/pow_sha256/0.2.1/source-script.js b/api-docs/pow_sha256/0.2.1/source-script.js new file mode 100644 index 0000000..67f62a1 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/source-script.js @@ -0,0 +1 @@ +function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0,len=rootPathParts.length;i"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(window.rootPath.endsWith("/")===false){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/src/pow_sha256/lib.rs.html b/api-docs/pow_sha256/0.2.1/src/pow_sha256/lib.rs.html new file mode 100644 index 0000000..170459a --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/src/pow_sha256/lib.rs.html @@ -0,0 +1,465 @@ +lib.rs - source + +
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+
+//! MCaptch's SHA256 based Proof of Work library
+//!
+//! # Example:
+//! ```rust
+//!   use pow_sha256::{ConfigBuilder, PoW};
+//!
+//!   fn main() {
+//!       let config = ConfigBuilder::default()
+//!         .salt("myrandomsaltisnotlongenoug".into())
+//!         .build()
+//!         .unwrap();
+//!
+//!       let phrase = "ironmansucks";
+//!
+//!       const DIFFICULTY: u32 = 1000;
+//!
+//!       let work = config.prove_work(&phrase, DIFFICULTY).unwrap();
+//!       assert!(config.is_valid_proof(&work, &phrase));
+//!       assert!(config.is_sufficient_difficulty(&work, DIFFICULTY));
+//!   }    
+//! ```
+
+use std::marker::PhantomData;
+
+use derive_builder::Builder;
+use serde::{Deserialize, Serialize};
+use sha2::{Digest, Sha256};
+
+/// Proof of Work over concrete type T. T can be any type that implements serde::Serialize.
+#[derive(Serialize, Builder, Deserialize, PartialEq, Clone, Debug)]
+pub struct PoW<T> {
+    pub nonce: u64,
+    pub result: String,
+    #[builder(default = "PhantomData", setter(skip))]
+    _spook: PhantomData<T>,
+}
+
+/// Configuration for generting proof of work
+/// Please choose a long, unique value for salt
+/// Resistance to dictionary/rainbow attacks depend on uniqueness
+/// of the salt
+#[derive(Serialize, Deserialize, Builder, PartialEq, Clone, Debug)]
+pub struct Config {
+    pub salt: String,
+}
+
+impl Config {
+    /// Create Proof of Work over item of type T.
+    ///
+    /// Make sure difficulty is not too high. A 64 bit difficulty,
+    /// for example, takes a long time on a general purpose processor.
+    /// Returns bincode::Error if serialization fails.
+    pub fn prove_work<T>(&self, t: &T, difficulty: u32) -> bincode::Result<PoW<T>>
+    where
+        T: Serialize,
+    {
+        bincode::serialize(t).map(|v| self.prove_work_serialized(&v, difficulty))
+    }
+
+    /// Create Proof of Work on an already serialized item of type T.
+    /// The input is assumed to be serialized using network byte order.
+    ///
+    /// Make sure difficulty is not too high. A 64 bit difficulty,
+    /// for example, takes a long time on a general purpose processor.
+    pub fn prove_work_serialized<T>(&self, prefix: &[u8], difficulty: u32) -> PoW<T>
+    where
+        T: Serialize,
+    {
+        let prefix_sha = Sha256::new().chain(&self.salt).chain(prefix);
+        let mut n = 0;
+        let mut result = 0;
+        let difficulty = get_difficulty(difficulty);
+        while result < difficulty {
+            n += 1;
+            result = score(prefix_sha.clone(), n);
+        }
+        PoW {
+            nonce: n,
+            result: result.to_string(),
+            _spook: PhantomData,
+        }
+    }
+
+    /// Calculate the PoW score with the provided input T.
+    pub fn calculate<T>(&self, pow: &PoW<T>, t: &T) -> bincode::Result<u128>
+    where
+        T: Serialize,
+    {
+        bincode::serialize(t).map(|v| self.calculate_serialized(pow, &v))
+    }
+
+    /// Calculate the PoW score of an already serialized T and self.
+    /// The input is assumed to be serialized using network byte order.
+    pub fn calculate_serialized<T>(&self, pow: &PoW<T>, target: &[u8]) -> u128
+    where
+        T: Serialize,
+    {
+        score(Sha256::new().chain(&self.salt).chain(target), pow.nonce)
+    }
+
+    /// Verifies that the PoW is indeed generated out of the phrase provided.
+    pub fn is_valid_proof<T>(&self, pow: &PoW<T>, t: &T) -> bool
+    where
+        T: Serialize,
+    {
+        match self.calculate(pow, t) {
+            Ok(res) => {
+                return if pow.result == res.to_string() {
+                    true
+                } else {
+                    false
+                }
+            }
+            Err(_) => return false,
+        }
+    }
+
+    /// Checks if the PoW result is of sufficient difficulty
+    pub fn is_sufficient_difficulty<T>(&self, pow: &PoW<T>, target_diff: u32) -> bool
+    where
+        T: Serialize,
+    {
+        match pow.result.parse::<u128>() {
+            Ok(res) => return res >= get_difficulty(target_diff),
+            Err(_) => return false,
+        }
+    }
+}
+
+fn score(prefix_sha: Sha256, nonce: u64) -> u128 {
+    first_bytes_as_u128(
+        prefix_sha
+            .chain(&nonce.to_be_bytes()) // to_be_bytes() converts to network endian
+            .finalize()
+            .as_slice(),
+    )
+}
+
+/// # Panics
+///
+/// panics if inp.len() < 16
+fn first_bytes_as_u128(inp: &[u8]) -> u128 {
+    use bincode::config::*;
+    DefaultOptions::new()
+        .with_fixint_encoding()
+        .allow_trailing_bytes()
+        .with_no_limit()
+        .with_big_endian()
+        .deserialize(&inp)
+        .unwrap()
+}
+
+// utility function to get u128 difficulty factor from u32
+// javacript isn't capable of represnting u128 so
+fn get_difficulty(difficulty_factor: u32) -> u128 {
+    u128::max_value() - u128::max_value() / difficulty_factor as u128
+}
+
+#[cfg(test)]
+mod test {
+    use super::*;
+
+    const DIFFICULTY: u32 = 1000;
+
+    fn get_config() -> Config {
+        ConfigBuilder::default()
+            .salt(
+                "79ziepia7vhjgviiwjhnend3ofjqocsi2winc4ptqhmkvcajihywxcizewvckg9h6gs4j83v9".into(),
+            )
+            .build()
+            .unwrap()
+    }
+
+    #[test]
+    fn base_functionality() {
+        // Let's prove we did work targeting a phrase.
+        let phrase = b"Ex nihilo nihil fit.".to_vec();
+        let config = get_config();
+        let pw = config.prove_work(&phrase, DIFFICULTY).unwrap();
+        assert!(config.calculate(&pw, &phrase).unwrap() >= get_difficulty(DIFFICULTY));
+        assert!(config.is_valid_proof(&pw, &phrase));
+        assert!(config.is_sufficient_difficulty(&pw, DIFFICULTY));
+    }
+
+    #[test]
+    fn double_pow() {
+        let phrase = "Ex nihilo nihil fit.".to_owned();
+        let config = get_config();
+
+        let pw = config.prove_work(&phrase, DIFFICULTY).unwrap();
+        let pwpw = config.prove_work(&pw, DIFFICULTY).unwrap();
+
+        assert!(config.calculate(&pw, &phrase).unwrap() >= get_difficulty(DIFFICULTY));
+        assert!(config.is_valid_proof(&pw, &phrase));
+        assert!(config.is_sufficient_difficulty(&pw, DIFFICULTY));
+
+        assert!(config.calculate(&pwpw, &pw).unwrap() >= get_difficulty(DIFFICULTY));
+        assert!(config.is_valid_proof(&pwpw, &pw));
+        assert!(config.is_sufficient_difficulty(&pwpw, DIFFICULTY));
+    }
+
+    #[test]
+    fn is_not_valid_proof() {
+        let phrase = "Ex nihilo nihil fit.".to_owned();
+        let phrase2 = "Omne quod movetur ab alio movetur.".to_owned();
+
+        let config = get_config();
+        let pw = config.prove_work(&phrase, DIFFICULTY).unwrap();
+
+        let pw2 = config.prove_work(&phrase2, DIFFICULTY).unwrap();
+
+        assert!(!config.is_valid_proof(&pw, &phrase2));
+        assert!(!config.is_valid_proof(&pw2, &phrase));
+    }
+
+    #[test]
+    fn serialization_test() {
+        let target: u8 = 1;
+        let config = get_config();
+        let pw = config.prove_work(&target, DIFFICULTY).unwrap();
+
+        let message: (u8, PoW<u8>) = (target, pw);
+        let message_ser = bincode::serialize(&message).unwrap();
+        let recieved_message: (u8, PoW<u8>) = bincode::deserialize(&message_ser).unwrap();
+        assert_eq!(recieved_message, message);
+        assert!(config.is_sufficient_difficulty(&message.1, DIFFICULTY));
+        assert!(config.is_valid_proof(&message.1, &target));
+    }
+}
+
+
+ \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/storage.js b/api-docs/pow_sha256/0.2.1/storage.js new file mode 100644 index 0000000..ff361c6 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/storage.js @@ -0,0 +1 @@ +var resourcesSuffix="";var darkThemes=["dark","ayu"];var currentTheme=document.getElementById("themeStyle");var mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed!==true){for(i=0;i=0;--i){if(func(arr[i])===true){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function hasOwnProperty(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function usableLocalStorage(){if(typeof Storage==="undefined"){return false}try{return window.localStorage!==null&&window.localStorage!==undefined}catch(err){return false}}function updateLocalStorage(name,value){if(usableLocalStorage()){localStorage[name]=value}else{}}function getCurrentValue(name){if(usableLocalStorage()&&localStorage[name]!==undefined){return localStorage[name]}return null}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){var fullBasicCss="rustdoc"+resourcesSuffix+".css";var fullNewTheme=newTheme+resourcesSuffix+".css";var newHref=mainStyleElem.href.replace(fullBasicCss,fullNewTheme);if(saveTheme===true){updateLocalStorage("rustdoc-theme",newTheme)}if(styleElem.href===newHref){return}var found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),function(el){savedHref.push(el.href)})}onEach(savedHref,function(el){if(el===newHref){found=true;return true}});if(found===true){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("rustdoc-use-system-theme",value);var toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}var updateSystemTheme=(function(){if(!window.matchMedia){return function(){let cssTheme=getComputedStyle(document.documentElement).getPropertyValue('content');switchTheme(currentTheme,mainTheme,JSON.parse(cssTheme)||"light",true)}}var mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){if(getSettingValue("use-system-theme")!=="false"){var lightTheme=getSettingValue("preferred-light-theme")||"light";var darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){switchTheme(currentTheme,mainTheme,darkTheme,true)}else{switchTheme(currentTheme,mainTheme,lightTheme,true)}}}mql.addListener(handlePreferenceChange);return function(){handlePreferenceChange(mql)}})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(currentTheme,mainTheme,getSettingValue("theme")||"light",false)} \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/theme.js b/api-docs/pow_sha256/0.2.1/theme.js new file mode 100644 index 0000000..8f9c49a --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/theme.js @@ -0,0 +1 @@ +var themes=document.getElementById("theme-choices");var themePicker=document.getElementById("theme-picker");function showThemeButtonState(){themes.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){themes.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}function switchThemeButtonState(){if(themes.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}};function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!=="theme-picker"&&(!active.parentNode||active.parentNode.id!=="theme-choices")&&(!related||(related.id!=="theme-picker"&&(!related.parentNode||related.parentNode.id!=="theme-choices")))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;["ayu","dark","light"].forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(el){switchTheme(currentTheme,mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themes.appendChild(but)}) \ No newline at end of file diff --git a/api-docs/pow_sha256/0.2.1/wheel.svg b/api-docs/pow_sha256/0.2.1/wheel.svg new file mode 100644 index 0000000..01da3b2 --- /dev/null +++ b/api-docs/pow_sha256/0.2.1/wheel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apple-icon-114x114.png b/apple-icon-114x114.png new file mode 100644 index 0000000..d1d4d49 Binary files /dev/null and b/apple-icon-114x114.png differ diff --git a/apple-icon-120x120.png b/apple-icon-120x120.png new file mode 100644 index 0000000..139bad9 Binary files /dev/null and b/apple-icon-120x120.png differ diff --git a/apple-icon-144x144.png b/apple-icon-144x144.png new file mode 100644 index 0000000..0f16a0b Binary files /dev/null and b/apple-icon-144x144.png differ diff --git a/apple-icon-152x152.png b/apple-icon-152x152.png new file mode 100644 index 0000000..a156554 Binary files /dev/null and b/apple-icon-152x152.png differ diff --git a/apple-icon-180x180.png b/apple-icon-180x180.png new file mode 100644 index 0000000..74ecfef Binary files /dev/null and b/apple-icon-180x180.png differ diff --git a/apple-icon-57x57.png b/apple-icon-57x57.png new file mode 100644 index 0000000..c38be39 Binary files /dev/null and b/apple-icon-57x57.png differ diff --git a/apple-icon-60x60.png b/apple-icon-60x60.png new file mode 100644 index 0000000..10eeb50 Binary files /dev/null and b/apple-icon-60x60.png differ diff --git a/apple-icon-72x72.png b/apple-icon-72x72.png new file mode 100644 index 0000000..e670441 Binary files /dev/null and b/apple-icon-72x72.png differ diff --git a/apple-icon-76x76.png b/apple-icon-76x76.png new file mode 100644 index 0000000..fb54e26 Binary files /dev/null and b/apple-icon-76x76.png differ diff --git a/apple-icon-precomposed.png b/apple-icon-precomposed.png new file mode 100644 index 0000000..096844d Binary files /dev/null and b/apple-icon-precomposed.png differ diff --git a/apple-icon.png b/apple-icon.png new file mode 100644 index 0000000..096844d Binary files /dev/null and b/apple-icon.png differ diff --git a/apple-touch-icon.png b/apple-touch-icon.png new file mode 100644 index 0000000..225acef Binary files /dev/null and b/apple-touch-icon.png differ diff --git a/aravinth.asc b/aravinth.asc new file mode 100644 index 0000000..40b2b37 --- /dev/null +++ b/aravinth.asc @@ -0,0 +1,156 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGNBF7jJtMBDADwoO98P31bTkBmWlkICljq8o+S9ltFab9f9l6Npox+qbCnZUCd +Y+p1jCmRc+6iBh4N2p5kP/02z6BkW7BhVtPKU9Zg1nvkhluCUSMixUlpn/dUYw2J +j41lqqmvpytI5Gr9xwFbPuLxzccMge1hqlVli1eZJTQyhZnv3Og2xj6kmThgaCDO +U0lMDwT4n1AjjdLT/FX5APssw9v2fgmClmHl8YC1ojZ2msPfHd85q90YdzB5G4Q6 +g3zAgv9ADkYkkvy4ElFl1ePwrUtD+EcszWZgYnqVRt1NBoo4J200fJSRmkq9qYh9 +4WDLIeX+DnB2ofqJrxJFX5P7elsn3ic4WVxtpkpoCbwuVsMWi8vBBU3fyxxqwGIv +aOErCGy9Vd4iuDUu7GymDjMxJi+uYvjGncjasPRmBToCZzY94FIHgn8cxJdkrPaV +FbyE8BkxLlbaiRNLcu79EHYqs2UxygGWlglMA9Z/QmuGcHsAzUtlkcFdPLg7+KvU +xzMiBFmdh0Eabn8AEQEAAbQsQXJhdmludGggTWFuaXZhbm5hbiA8YXJhdmludGg3 +ODIwQGdtYWlsLmNvbT6JAcQEEwEIAC4ECwkIBwIVCgIWAQKeAQKbAxYhBO3wOyzk +G1g2vjW6O62fDwjoVe2IBQJe7G0jAAoJEK2fDwjoVe2IPLkL/icH+eresFyQrv7S +qSUWLkTlK+Ht7qURBeb4TV+nkJshcvnxHoaDiov1ZFyvyhzLi3Ncw17ntRD+tIlr +IYZ6YWekpkYIjWRcyU0DWJI2u6OAcT/l7EbxKJzywRLi8cGJQyLxSQMFK2GsU6dt +7VSOshoXpUGApxJ0tkRZX2xQ+3LSvCNKK0VCFnT+MyJW+4/r9+NCjxyEw0FR5Rka +28kIaq8E4MwP1O1cyFAXmT9FVBAEEoAwLM7GRFguacr8EHi0W/NZKNsu87e4/oL3 +lh2vetIv7+rUdH5hf2WRZcNxNJllJc7povrdUl8+5mLlRB0JAogz5nLfacr2affw +0esNL/g+Futgip3I5lLla4izMy62EsRIjqaafHpZZPfl0FmUchCZKMKaG38dyAN+ +yPvxpoQuqCp/+Mch5aSijOb7tcXIzTDev38dYBW+0afrzKlMubvWTOMfwj6bo1qS +sTtxYNRt2DPOD4/ZVOSz0Flx4VxfZJ5E/a82bw3UPQaBvrk7XokBsAQTAQoAGgQL +CQgHAhUKAhYBAhkABYJe573AAp4BApsDAAoJEK2fDwjoVe2I2/QL+QHs5QblIP4C +2tPj0hE+stU5EjXipLdkO5KuLEe3qn+QtfxFFXRmsGolaWxypWIzX5A7RE28XJ+i +aaULK/YeqVzuF/UcpGuJ771v8cvJYgUcAUsQfHOubwKltxRfCzRBBVcDLG0BUOiO +alYZKZriN7R5Y/Jx14roQcC5k/RnJCLu1W3bxi/0mdmqE3fj7fkCTQeJQKNoUggt +w4uzXMqEwy0SRZeGvhZI6Mdw5TOdJO8NAy08tK4vLGVYQpQD/iOyj5NLg7PgSQTk +vt7ejl6ff7TTCcW/nEq+lymDGktxrRBeb4A1LMlSy59LSTJhk96+RXyTpmSYDmAx +T/tIL7PEjj9byzWJUrBAOeT47q0dwNMqL8Bn1mICf3OHg/dVtT61Zd/qp86vBYXx +2WZwGVKA64qJgrsFxeRfjhJHTet6SCgPygC+/k7H+YGSQ5kwwrbaTS/YOwjtgobL +pnNHKi/yoCr4cS/NUEpOeHx7+MNxf3bvz+Qk40UUEgzeqINUsQKIGIkBsAQTAQoA +GgQLCQgHAhUKAhYBAhkBBYJe4ybTAp4BApsDAAoJEK2fDwjoVe2IA54MAOe1eX6V +k3Lyse0pOdfRmaTdctLyRd3ERZecxPh8RVXoIv1U1AhoQQLfFMSUiniJvGNInWp1 +qY0iPnXgLDU51mRuGw06YuBxWIEGy1oTJQ2KQ+ClA1tF75e7eX6N5PVxioKvDLSN +lzIugJIIHTeOy8uIf9vZJrduTMOADtjXKbJIh6cDyCU+t3rdPOcNrqspEVOgKpN1 +2XmsD2xBkkmWpiL+CU47ZkJ49r9y6F2ojBnymceFtwc3OXKsoamzUY75cBEW+Gcm +kFVcWmffaf1VHjXCYfpki+YKxJEq7u2UwtbqAWBjGLVAC6SBPbQGUxa5tTb3MuSP +PtWF4j8LqD5ZlbNxvv/c/zOh8o0Vb2jQLUBMsaxUB6RQU1D+zSbQMr0nBJmc2Gkt +OKib/v83iM/+XfVRFy8eurPAHRIhYPuKKxHbkhUYFAqQ32sb2Y4gR8UBLsBIZj5J +TJdDSaZ36e/knxfg80GLQEBD2FF/yHlSTipeDAjF/hq7kfazRNwx5ePHubQ0QXJh +dmludGggTWFuaXZhbm5hbiA8YXJhdmludGguMTliY2U3NDE1QHZpdGFwLmFjLmlu +PokBsAQTAQoAGgQLCQgHAhUKAhYBAhkABYJe4ybTAp4BApsDAAoJEK2fDwjoVe2I +ougL/AtxgTK591CPdbb4n0J0i7raWZABJD/kjZ/5HmdypCj8l2utyw405pJsAZrg +F7QOuJ6UjLyd6hIbtTXNdC6rp1ayXudTEeJSYJzvkeWCxuY6yjDjcfKInv9/Sr3q +1XfA7N3uRIiDmyewE1scOttA8BAqGYcHYi6fPoLioHDM+yrgJUeBxSW1BpLp4jZ6 +zGof4uRrFX7NtQdNJJ1A6M/+oMVxnnGDA9BN4CjQBxMfAHFVGXLNfVVhJ9g+995f +OjntCtS+fWW/PwPN5OO5mHfMleexigrx6Ju79qC69pMKGef+rVuzQBH9reg1QeSt +x7hHOoSXC/YMl8GvItqhhR84xb9EFF6WsCWlg5LwMet2vS9TYY/zbY4SO2FUvWZz +CgvxnWNasNfzMS08U1tvUH4k+Gt1m2toPacSIx1DyNExseY8FaRoXOHB8ojRcmNe +jAbpWx7tOk8hhiyvQkVFXpU/U3mzzKWNMrVIQX/ZZV4W1XQA5pIvbvgNVoSoC36C +lT8Ck7QvQXJhdmludGggTWFuaXZhbm5hbiA8cmVhbGFyYXZpbnRoQGJhdHNlbnNl +Lm5ldD6JAccEEwEIADEECwkIBwIVCgIWAQKeAQKbAxYhBO3wOyzkG1g2vjW6O62f +DwjoVe2IBQJe7G0qAhkBAAoJEK2fDwjoVe2IiusMAJYC7hrMnJFKp7JOhpj12H1H +JDKSyrok7uRCCBLCTDbKx0nDvqQqYjIlM3/ZyQruezBxgh92o6ti8wXSuygtLvmf +qQbSOzugw1nCis5WxW1g2pmZbbnTgq9KBR4dQnjSB8AVy1l6EU6bUJiQPwT5/TWo +cSPEmlycLSCNgZkUsgOSJDqb10P0PmKXbr8U0VVtUlmODDDgXtjGnvTEa76Dyryp +9uGFG+vBt6r51xn3Qdbx/fRsQMhsYZkxFlh3Uh5LgVOOCTbCUJON7mj8G6Mfl/Ek +y2zpF9+xAbpRcbgADas5hLDsoPZ6D5XglRek3lWmYjYLEYt5WOCjLgoAbLuYzH5P +1L1BAJaaXMvgxw62YA6sPnlopfglctopL0cCHo3N8TlSuYiL1p3C9jqPXc/y6zfi +4Gxq7e/y9L+TZr1BQMoWpqkzDq1ruLL3GgIairs+byHZN8vA3L5UkqsN14SLwmLb +dr50QW9vDyrHGJIPKf0W2CG25RO87RpW2QIZMdYNt4kBsAQTAQoAGgQLCQgHAhUK +AhYBAhkABYJe4ybTAp4BApsDAAoJEK2fDwjoVe2IArQL/AwOsQJUIyni9v7DhQsl +CVTGmB05xRVF7wHjuwEuFR4R8sVCqNRcFL1JcRDGjGZ+ir+VvTA1Z5a7FA+tpEFR +TVt6wZH0ewDNd47anKFJadkbdnI2fVKLZ0AIGtiohB0LWMw4LWKmfi0BZkJQnL5E +E1dvkM0oQx/KItkO+19ykTLivUyuy/cVPb3rLS4elmztxRSrjqTd3Ti7JB/FbK1X +noso7i79L63k31j8tGL1nhMF+q+0trZXWv/1iQwD+8o6WnON02VmyOpVrWnoxRos +BB7XpkDxkCreF5pU5yl5F8c9jYXyssfiyQM/37O3LLoivfzlgRC+3lW3glfO6ykt +6tggEi5wm24ojmcrlhrL0qJvwaD/5x5aOgXtgbUu7IR7smyt+l4r0xQg3Z8fTBxb +yn3FoVod97shg3X2Sq4Fo15N3TP53vRXQmVGXtwWwOPeFI0ro2aR3cjgURUrhYlm +GpfS1Sv4FMsYLWqqhdr//TsL8WI71zUoLMTuYOeqB+hDQYkBsAQTAQoAGgQLCQgH +AhUKAhYBAhkBBYJe573AAp4BApsDAAoJEK2fDwjoVe2Iu10L/1sI0nbA6GRc2BgA +dRtCTLSg809Zn1CD+6Iju4o3conFYsmRri2sbP2yVx6yJyn0004TRwqNaSx6pGWc +KLmjLDwc9WQ4CQ1FLrwxGFXs0DV3Mrgo2PuQsKzPDZ6sEh/RQutoa4aC94ShddQC +ywJ5nu2vlqnU1uchERzuwRlvLzbC0yPVz7WXhNGxji4KNs2t9r079iiTYyRYZqic +LQIHwsbmPIMo4/bqSrz3lPuft2ZZYILya/PSvfjmQC7Lz6HG/VE42yGg3iCQqMSI +WZJrVkJBxrkAbad6vf/t/FYppDrlTGtYKck+jA0UFDXSAVHKAPdJO31K4oQ2igyA +a6Db5a1AUo9Z4m9gJs/SC2+7JNusF/OR6+fLEMgOsuBgxNIIKdRGaJV2SW7wMGZY +ywUOsJA0IXw5UvJvyn0uZ5pEMKgkw0J5mhLvZPmLqwNIvuFoVdLSkofA4wzP8AaO +qr46XoZsbNfba1Rle6llEvuzUT7gjBmN4dkSbRORT9H7WcnXYbQwQXJhdmludGgg +TWFuaXZhbm5hbiA8YXJhdmludGhyZWNlaXB0c0BnbWFpbC5jb20+iQGwBBMBCgAa +BAsJCAcCFQoCFgECGQAFgl7jJtMCngECmwMACgkQrZ8PCOhV7YjJuQv9FIineflp +Yxf+Qam6thJbjY4n6N5U48s5SKx35bkFCD9YlkDsGyhNx0aTSmMSHUNTbBov/l5/ +F4h7omCPVL1hSFjlzqttupsTaQKD76Z5qFRAcj2osOUOiieVOqRaCElUSERI45DA +LIHiwAFSczJ5wpkQg2gGEbH7BBWBqceLPBbxrcb82QfiKR7jUg+lpXONVZd1Sbph +VMocsPEX4mdetZNDZaodJ8nX8yEhOZGIuBrfQFpscyE3Ydg3JrZq+a+K32CKk1l6 +PxXfJJh48wKePt9NmezkcJ1Gw/ITZywlufXMQj8Sqfto1fLzkMsmCFt1T9VQ6HNR +E4uw8QOSnHCnaRRPAbdFYY3rB0EIfqtM2WDV4M/4IVtVL4OGDQ9AmAp1R6j5W2Pz +EPitMteTo/0L28aB5PbAxpA+P0RROHPpqqrHtbWZ03jF4ev8NBA8DE82GkNIJlio ++MCs4QeSge1OcPAb8aMJ+7+KYOYlPDYFLb/1ubiVGcmmQjwhNIM6fo/YtCxBcmF2 +aW50aCBNYW5pdmFubmFuIDxhcmF2bnRoQHByb3Rvbm1haWwuY29tPokBsAQTAQoA +GgQLCQgHAhUKAhYBAhkABYJe4ybTAp4BApsDAAoJEK2fDwjoVe2IdGAL/00PcW0k +M2PqzJXogxWBELPTTaP4Yd4vEuGZfAoXlUsAFqmgqnM8GGEWnVA2Axr6f1i8IEV/ +vRgpEd9HBka8Uftv5luVU9SS9KXExALqfai19/R1AE0QNTAm/2ZsWAb6fWC1o9yQ +l7HaBsX3DPtKYwwOJGwdbdStqRlH90T/+VoVLLVdrewo2Gk0k/37pExl0v04Wt3m +JR1+Gh6nFDRDRlZkuX0EGLhWIoOn9F/HFpNElVwkuSIToTASTZhM+WgX2PxAyw9t +Gb9u2vavvWrR0bnhlrn5kmnW8O633bzwL4WdnP0bhOhSH6l/rQob5QnEU4Ur4/HS +F+yw8lCjF3gS7U3NlXgD3IMxBzKuAXgEF69NKYJEd4a2P3MWVRuy7eQz21v1dEot +KuUsRbe5BU4Ya20nKU102Z63dIdRXi3Z1XazKmwSTPYaS/Rt1GUeU3cZ0b6u8DL4 +TgjfrEZXYp+4/UWVa6l+B44fmfiyBgialyZnhwluq56UeWr6t+NtPnuUcbQxQXJh +dmludGggTWFuaXZhbm5hbiA8cmVhbGFyYXZpbnRoQHByb3Rvbm1haWwuY29uPokB +sAQTAQoAGgQLCQgHAhUKAhYBAhkABYJe4ybTAp4BApsDAAoJEK2fDwjoVe2IV90M +AL4u9dGEZcOY9HqPduqv+i/IWlY/ws3BSQyihR0HTobtWq0u/5Hti60HOqQ+Kenj +9fVwzraEyub6BheajU86iqACKnkTSV32fQGe2ccnioLTNXsyPWTSI8iaJdJIJVhg +5K+3bScKE/spjH38fQWtyy2myZyGZASj6DEjpbbKIqJBjcWNJ3/byXRmg94mfS1P +H+hXZ3BbbhTklQ6iZS+X6B1tlvdEHd3I7zXDcT4nqUt0VqdSjX+ivfWYJqwkMDw4 +GmcACHqATurJMmFX+INFbdtM7IASpfCsHuVMoibifyb+YpGcS9IgB/qOfWmicCl8 +HvJ7hKV1MfZQtwSos63tbg3R37aQbSsebvfE+Vqs2vVUB1VkmYvDsqZQwy/ek+yB +pvKP0gAUOoOziIfr3nxtKEEQwNuJkb9d+Ef3+cEPBdt8R+oQpiw194QPFDsLvXW6 +DoJzcJ8kt8V0JCEEkbkLa2NX9xZ89TqnVopaWd8IZueqR4eLAcgBorwDYpq13+ix +dIkBnwQwAQoACQIdAAWCXuORlgAKCRCtnw8I6FXtiPrzDAC9m3dUOPwXTXv1qCst ++Cd/h3mwlwKaGNbQkqP498vG4BNGeOmGkFl3TI17yaK7T1jCaxNmvnoX6b2IE+uO +CCNq4t98dsvVw5M8K3SX9NRO6hUZRKq1l7/9MhsATpSus7jfJIkFs4++6MngHzA2 +F0fLcuVpeWNtp8kE4hPFQvvNl1kAQc0IQ+tzJeLG5j1K8BUX68HmiSj/ZzoYjNGc +IF/XlXyJXnrtoId1SmFk8iBvmwkEfzs5uZNd/jqLoWj3JDgfxGBOzC8n+V5jlQAP +7PHedw2TX+iCs2KDdSatbY09GXi1mTfYxqFmLlxSFeuB7GqerwpqmIR2n7iJxh1q +O5121cR4xY1WR+LjTpGUJ3c0oKwbDi/RYq2KEzH5zt1Wz5rEq/Rch8coo+q0gn/n +a3Ab6OB8Y4JJ8lFlM0oO0dInT3nmdFA9hxFtwLBlmZkmB0wtq1gM3uwTc1yMDknW +iqVD7gRaw0audTs7c0OxopyI58e+5qdk9BWKwLIkpGHz13K0LEFyYXZpbnRoIE1h +bml2YW5uYW4gPHJlYWxhcmF2aW50aEBnbWFpbC5jb20+iQGwBBMBCgAaBAsJCAcC +FQoCFgECGQAFgl7jkZYCngECmwMACgkQrZ8PCOhV7YgayAv/dEbOEAbW2qGcT46Y +PJe1mjNkc6ll4CER5Pa8armuM0a+XAKrKOyfejlN6vbKCe/yV8elGWau6P8D2QbF +/dmm4yzm7qNiCND932e3skqloR8xu3jSfscc7tH07aZaxDtEa7f0na4/n/PYBHV9 +LQN/8OdeZbWSYtEQiX6iD5w5sw74wdOKZbPXgkJPOQ5dn5RFAsqvRfZiHWnHwQnT +RbtBsWbQA2nCdPgm36Jd6L3WzLOg0OD8dS0xQKvApg4+zzYsemB+E0tevko4ywld +nogdo83buiqh5Q3XlqK5SSlJtEVW5mF/kxxIGIzcpsalMvM5pmHxDquDM8+f6mE2 +AYHza0nBERvaeG8bJ7DvGAGlIz40aiy1LlSwqYSDy8sR813sAPBpxgoevUQ1hEQ/ +p1LtlRY/WANFuY3oOxSMQ1m1zG8E1yMiMfC+mQHxEkCONeOfYbk3k+/a0YOKepZq +ixNf5XiUnEa6zWehtB9WEAWvDIqmJaF9k8Wt9UWgpfnx1LGbtDFBcmF2aW50aCBN +YW5pdmFubmFuIDxyZWFsYXJhdmludGhAcHJvdG9ubWFpbC5jb20+iQGwBBMBCgAa +BAsJCAcCFQoCFgECGQAFgl7jkZYCngECmwMACgkQrZ8PCOhV7YjxKgwAm4BThlJI +JIcDFuqfDDQQEwRR3ZVIPw9hnO5Z2xQp+uJndMSVSKs31GddYW5M69ksjkm9kcLQ +oTZc/z/paSIRjPc1RUTPSNwtjmP7LN1h4v9lHahQD++FnoA61vrwWPN74U1rhYPI +8vs+0pKDcShHIikv0a9hz13VTQls7QWOnCDB3xtyVn1mCRQdTN4Nk6fNZL0WYVGP +K5UhFOiXD2YC+9bxkp66bSyngriftCb4v/BONaNEydYYQLRcFje8S5oomdCUyHbX +YhdIzucAK3nPfHITHNdjTSe1iE3mDOWmu04KM/BMIXtzv7T4/B0YaZ2MrrC+8kdE +I2QtOKm4FpOvn1LK6ZopOzi5oB/Ffg5nGesBmP7CDxFVjo+z9Yyg3dnrzvD2OmZ0 +603m6z5PGs2q1bLDcPAU+cy7X0A5va98VvsqKybgeSjrNR61Jlp4iJdUXxmRML7J +PRfq891t+saJDivhtvmpwShqILGv5qDBCqS2bYYdwFfqPTIBJtdIneWCuQGNBF7j +JtMBDACbpNg346AJzKI2unuBlR2OtTKra7jtEJTxDSZg0HhiDz752gCguA2UV2Kl +qmXhTycIwYD+gYyz0ly3l/dKyHDItF4DHRT7ba8+wQcnWyiGX7WZepIcj8KJfDvJ +dTtpZUauPhNEPH0qZEFL9waOZIbFUdpv9zmcAJ/NAAVDFbn9NQlyKskbNrNMjA8u +JnzYMN3fP1pNAJRJ5UX9aBsYONhagUBCSj6AdZc8YFENCz9ZznBNqjVyqHQyixA1 +5xLs715hgWA8BlKLOvowTWYGQUeVpzEaA05DBo33XnQzfDRb5JecC7vmLJld7RWs +e3KrGTANskM1NffGnmBmujiQGXJiU5flzN0pCwPJexsZGXkd10Y3SKB7lrz/Sac0 +/L9ORSiGNre/rx7W0H+7vJwYSuZjI3gg5w9UADwLxMQ68Hu6zgSi/Y3hEdUbMcrn +nbuZC7irjCtiXRuyQCWD6an/SFZsG6fnVfYVqcLb8GIb24uLMBnW+xX62aPaxszC +eFkQpb0AEQEAAYkBnwQYAQoACQWCXuMm0wKbDAAKCRCtnw8I6FXtiC6xC/4xQqBq +n1x53JxF938xiZMYxWXOELZk106/prs7F5/vM6XvZ+ZSnqa1/IrdUYjwXYRx27A0 +DkfFqXeREBQDxEWZlaNH615MGfF+tg1F/IN0ERI187sbezLhRFXf2srqyQh2WvHm +htE+DVgnYhv+aqJxNxTPT0lpgu5M6bSWdj938mruLoyo/wFamWlokuZmHEf4uuV+ +Xc9ZaOWY0Q50vk675OXJyH8haaewt2aN28JS7dNY5ArohRj6r4spxrik5VfLtei1 +KcJGwB4O3/VbRh9OfzPqK/ZnYpWrrz2PDlqpcvJiXeFWEf4MIjbAEHte1YbAJ3CE +yLhn0Ut5RSd7zCg8DMXTWdMr1hoUSshiF71F/Wxji1TN5vYZGGHykhjfeubl21dV +NXxBvA5ABkcHzULubZWLB3QoKDP5DgEXB4cA7kMDryFPnN2shSdBsWt69g1E3gVo +zKdOEDuIPIv4f7HhhCDCylGwfwqar5XJwnHQrBXLpwlTm4neDsnEOvOzyd8= +=gpUQ +-----END PGP PUBLIC KEY BLOCK----- diff --git a/blog/december-2021-monthly-report/captcha-advanced-config.jpg b/blog/december-2021-monthly-report/captcha-advanced-config.jpg new file mode 100644 index 0000000..00bc3bf Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-advanced-config.jpg differ diff --git a/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_20x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_20x0_resize_q75_box.jpg new file mode 100644 index 0000000..0f85d81 Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_20x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_500x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_500x0_resize_q75_box.jpg new file mode 100644 index 0000000..ebf3324 Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_500x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_600x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_600x0_resize_q75_box.jpg new file mode 100644 index 0000000..0375882 Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_600x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_700x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_700x0_resize_q75_box.jpg new file mode 100644 index 0000000..7237f30 Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_700x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_800x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_800x0_resize_q75_box.jpg new file mode 100644 index 0000000..1fec99c Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_800x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_900x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_900x0_resize_q75_box.jpg new file mode 100644 index 0000000..73217e6 Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-advanced-config_hu83b247380bbc427ee7cad0c8f4eadaf3_44711_900x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/captcha-easy-config.jpg b/blog/december-2021-monthly-report/captcha-easy-config.jpg new file mode 100644 index 0000000..5f31205 Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-easy-config.jpg differ diff --git a/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_20x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_20x0_resize_q75_box.jpg new file mode 100644 index 0000000..2916251 Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_20x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_500x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_500x0_resize_q75_box.jpg new file mode 100644 index 0000000..2863eec Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_500x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_600x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_600x0_resize_q75_box.jpg new file mode 100644 index 0000000..1615cab Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_600x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_700x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_700x0_resize_q75_box.jpg new file mode 100644 index 0000000..b20cc48 Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_700x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_800x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_800x0_resize_q75_box.jpg new file mode 100644 index 0000000..024845d Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_800x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_900x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_900x0_resize_q75_box.jpg new file mode 100644 index 0000000..2945708 Binary files /dev/null and b/blog/december-2021-monthly-report/captcha-easy-config_hue77a6c4a0bac5cb1e9727416c4edcb91_41711_900x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/index.html b/blog/december-2021-monthly-report/index.html new file mode 100644 index 0000000..ccdc141 --- /dev/null +++ b/blog/december-2021-monthly-report/index.html @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + December, 2021: Monthly Report - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ +
+ +
+
+

December, 2021: Monthly Report

+

Posted December 23, 2021 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+ +

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

Hello and welcome to the first edition of the monthly report!

+

I believe free software like mCaptcha is critical to a healthy internet +but being a one-person show, there’s hardly any accountability in the +way software is built. I hope, through monthly reports, I can explain +the logic and intentions behind decisions taken in the development +process.

+

This month, the following things were accomplished:

+

1. Full LibreJS Compliance

+

The CAPTCHA widget and the admin dashboard are 100% LibreJS compliant!

+
+ Screenshot of mCaptcha admin dashboard with GNU LibreJS extension's report in frame.LibreJS reports that all scripts in this webpage are accepted(and hence free software) and are licensed under the AGPL license. + +
LibreJS report of the dashboard webpage
+
+
+ Screenshot of mCaptcha client-side widget(I'm-not-a-robot widget) with GNU LibreJS extension's report in frame. LibreJS reports that all scripts in this webpage are accepted(and hence free software) and are licensed under the X11(aka MIT license). It should also detect the Apache licensing but I probably botched it up. + +
LibreJS report of the CAPTCHA widget webpage
+
+

2. JavaScript PolyFill

+

mCaptcha relied on a WebAssembly(WASM) port of the proof-of-work +algorithm used in mCaptcha. This meanth browsers without WASM support +couldn’t process CAPTCHAs. This month, a pure JavaScript(TypeScript, +technically) implementation + was released to +overcome this limitation.

+

3. Integration libraries for Vanilla JS, React and Svelte:

+

To make migration from existing CAPTCHA deployments to mCaptha, +integration libraries for Vanilla +JS, React +Js and +Svelte with +similar APIs very similar to that of Google’s reCAPTCHA and Cloudflare’s +hCaptcha.

+ +

4. Beginner friendly CAPTCHA configuration options.

+

The original configuration panel offers a comprehensive but daunting +task for folks that are justgetting started with mCaptcha.

+
+ Screenshot of mCaptcha admin dashboard CAPTCHA creation form with advance configuration options + +
CAPTCHA creation with advance configuration options
+
+

A new CAPTCHA creation format is rolled out which generates a +configuration from familiar metrics like average, peak and traffic that +took the user’s website down.

+
+ Screenshot of mCaptcha admin dashboard CAPTCHA creation form with easy configuration options + +
CAPTCHA creation with easy configuration options
+
+

Of course, the advance option is available and can always be swished to +at any moment!

+ +
+ + +

Edit this page on GitHub

+ +
+
+ +
+
+ + + + + + + + + diff --git a/blog/december-2021-monthly-report/librejs-dashboard.jpg b/blog/december-2021-monthly-report/librejs-dashboard.jpg new file mode 100644 index 0000000..b720584 Binary files /dev/null and b/blog/december-2021-monthly-report/librejs-dashboard.jpg differ diff --git a/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_20x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_20x0_resize_q75_box.jpg new file mode 100644 index 0000000..86a95eb Binary files /dev/null and b/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_20x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_500x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_500x0_resize_q75_box.jpg new file mode 100644 index 0000000..3c9ee6a Binary files /dev/null and b/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_500x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_600x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_600x0_resize_q75_box.jpg new file mode 100644 index 0000000..f79d180 Binary files /dev/null and b/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_600x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_700x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_700x0_resize_q75_box.jpg new file mode 100644 index 0000000..ebffbab Binary files /dev/null and b/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_700x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_800x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_800x0_resize_q75_box.jpg new file mode 100644 index 0000000..ac43223 Binary files /dev/null and b/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_800x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_900x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_900x0_resize_q75_box.jpg new file mode 100644 index 0000000..631e9b4 Binary files /dev/null and b/blog/december-2021-monthly-report/librejs-dashboard_hu856cef05000f9a4e09e1cd208f2ef170_101197_900x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/librejs-widget.jpg b/blog/december-2021-monthly-report/librejs-widget.jpg new file mode 100644 index 0000000..b9f7497 Binary files /dev/null and b/blog/december-2021-monthly-report/librejs-widget.jpg differ diff --git a/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_20x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_20x0_resize_q75_box.jpg new file mode 100644 index 0000000..fab0e6c Binary files /dev/null and b/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_20x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_500x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_500x0_resize_q75_box.jpg new file mode 100644 index 0000000..568fa4b Binary files /dev/null and b/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_500x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_600x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_600x0_resize_q75_box.jpg new file mode 100644 index 0000000..ca11f4f Binary files /dev/null and b/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_600x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_700x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_700x0_resize_q75_box.jpg new file mode 100644 index 0000000..1cd769e Binary files /dev/null and b/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_700x0_resize_q75_box.jpg differ diff --git a/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_800x0_resize_q75_box.jpg b/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_800x0_resize_q75_box.jpg new file mode 100644 index 0000000..058987e Binary files /dev/null and b/blog/december-2021-monthly-report/librejs-widget_hu9a63940a47bb530d2d35b12edf31107a_83817_800x0_resize_q75_box.jpg differ diff --git a/blog/index.html b/blog/index.html new file mode 100644 index 0000000..89440ca --- /dev/null +++ b/blog/index.html @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + Blog - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+
+

Blog

+
+
+
+
+

July, 2022: Monthly Report

+

Codeberg is trying out mCaptcha, Gitea is getting mCaptcha support, mCaptcha supports MariaDB, I've applied for NLnet and Open Tech Fund, documentation is updated: tutorials and glossary is added and glue libraries have new releases.

+

Posted August 4, 2022 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+

+
+
+
+

June, 2022: Monthly Report

+

mCaptcha is successfully incorporated in India and ideas for mCaptcha commercial operations

+

Posted July 7, 2022 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+

+
+
+
+

May, 2022: Monthly Report

+

Python bindings to mCaptcha PoW, DDoS effectiveness measurement, major refactoring to prepare for support for other databases, We also tried to test its DoS defence effectiveness, and some exciting news regarding managed hosting!

+

Posted June 10, 2022 by Aravinth Manivannan ‐ 4 min read

+

Last Edited February 13, 2023

+

+
+
+
+

December, 2021: Monthly Report

+

New features, improved accessibility and software integrations

+

Posted December 23, 2021 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+

+
+
+
+

Survey

+

We are conducting a survey to benchmark and gather performance metrics of our system on various devices

+

Posted October 28, 2021 by Aravinth Manivannan ‐ 1 min read

+

Last Edited February 13, 2023

+

+
+
+
+

PoW performance

+

PoW performance of native and WASM implementations. Does the native implementation have and edge over the WASM library?

+

Posted September 1, 2021 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+

+
+
+
+

Say hello to mCaptcha

+

Introducing mCaptcha, a kickass CAPTCHA systems that gives (DDoS) attackers a run for their money. Oh and UX is great too!

+

Posted May 26, 2021 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+

+
+
+
+
+
+ +
+
+ + + + + + + + + diff --git a/blog/index.xml b/blog/index.xml new file mode 100644 index 0000000..4326e4c --- /dev/null +++ b/blog/index.xml @@ -0,0 +1,87 @@ + + + + Blog on + /blog/ + Recent content in Blog on + Hugo -- gohugo.io + en-US + + July, 2022: Monthly Report + /blog/july-2022-monthly-report/ + Thu, 04 Aug 2022 00:00:00 +0000 + + /blog/july-2022-monthly-report/ + Hello and welcome to the July, 2022 monthly report! +TL;DR Codeberg is trying out mCaptcha, Gitea is getting mCaptcha support, mCaptcha supports MariaDB, I&rsquo;ve applied for NLnet and Open Tech Fund, documentation is updated: tutorials and glossary is added and glue libraries have new releases. +Codeberg is deploying mCaptcha Codeberg is committed to trying out mCaptcha to make their platform more accessible: they currently use a text-based CAPTCHA, which will be replaced by mCaptcha. + + + + June, 2022: Monthly Report + /blog/june-2022-monthly-report/ + Thu, 07 Jul 2022 00:00:00 +0000 + + /blog/june-2022-monthly-report/ + Hello and welcome to the June 2022 edition of the monthly report! +mCaptcha is incorporated! I spent June doing non-technical tasks but I made significant progress: I had been trying to do it since summer 2021, but I faced various setbacks along the way. A family friend, who is also an auditor helped me finally get mCaptcha incorporated! +And we&rsquo;ve already filed successfully filed the first tax return too! +GSTIN 33DGKPA2253J1ZN Ideas for Commercial Operations Commercial operations will take a while longer(end of 2022, most probably). + + + + May, 2022: Monthly Report + /blog/may-2022-monthly-report/ + Fri, 10 Jun 2022 00:00:00 +0000 + + /blog/may-2022-monthly-report/ + Hello and welcome to the May 2022 edition of the monthly report! +mCaptcha, for a while was showing all the signs of a dead project: no commits on the repositories and no monthly updates. But the project is far from dead! +Python bindings to mCaptcha PoW pow_py contains bindings to pow_sha256, the proof-of-work library that mCaptcha uses. For the uninitiated, the bindings allow for python programs to automatically solve mCaptcha. + + + + December, 2021: Monthly Report + /blog/december-2021-monthly-report/ + Thu, 23 Dec 2021 00:00:00 +0000 + + /blog/december-2021-monthly-report/ + Hello and welcome to the first edition of the monthly report! +I believe free software like mCaptcha is critical to a healthy internet but being a one-person show, there&rsquo;s hardly any accountability in the way software is built. I hope, through monthly reports, I can explain the logic and intentions behind decisions taken in the development process. +This month, the following things were accomplished: +1. Full LibreJS Compliance The CAPTCHA widget and the admin dashboard are 100% LibreJS compliant! + + + + Survey + /blog/survey/ + Thu, 28 Oct 2021 00:00:00 +0000 + + /blog/survey/ + Survey link: https://survey.mcaptcha.org/survey/campaigns/b717e51e-24d4-4ab6-912f-de2dfe3ce1fe/about +NOTE: The survey(at least, the lucky draw is temporarily suspended due to some logistical reasons. Apologies for any inconvenience caused. +mCaptcha relies on a proof-of-work(PoW) mechanism to guard against bots. In order for this to be effective, the difficulty factor should be configured properly. If the difficulty factor is too high all the time, it will inconvenience the users and if it&rsquo;s too low during attack, the defence will be weak. + + + + PoW performance + /blog/pow-performance/ + Wed, 01 Sep 2021 00:00:00 +0000 + + /blog/pow-performance/ + mCaptcha uses a proof-of-work(PoW) mechanism to rate limit users or potential bots. In order for this to be effective, the PoW should be configured properly. The difficulty requirement can&rsquo;t be too high, as it could cause accessibility issues on the client-side while at the same time, it shouldn&rsquo;t be too low, as it wouldn&rsquo;t offer proper protection against bots. +Malicious bots(the ones that wreak havoc), run native code which is capable of running in a multi-threaded context. + + + + Say hello to mCaptcha + /blog/say-hello-to-mcaptcha/ + Wed, 26 May 2021 00:00:00 +0000 + + /blog/say-hello-to-mcaptcha/ + At mCaptcha, we believe in digital freedom and privacy and so we built a proof-of-work based CAPTCHA system that doesn&rsquo;t track. Seriously, no tracking. But that isn&rsquo;t the killer feature, our system doesn&rsquo;t require the user to pick cars or ID sidewalks &mdash; our system does it&rsquo;s thing(usually at the click of a button) and gets out of the way. +How does it work? mCaptcha uses SHA256 based proof-of-work(PoW) to rate limit users. + + + + diff --git a/blog/july-2022-monthly-report/index.html b/blog/july-2022-monthly-report/index.html new file mode 100644 index 0000000..03ffc4b --- /dev/null +++ b/blog/july-2022-monthly-report/index.html @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + July, 2022: Monthly Report - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ +
+ +
+
+

July, 2022: Monthly Report

+

Posted August 4, 2022 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+ +

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

Hello and welcome to the July, 2022 monthly report!

+

TL;DR

+

Codeberg is trying out mCaptcha, Gitea is getting mCaptcha support, +mCaptcha supports MariaDB, I’ve applied for NLnet and Open Tech Fund, +documentation is updated: tutorials and glossary is added and glue libraries +have new releases.

+

Codeberg is deploying mCaptcha

+

Codeberg is committed to trying out mCaptcha to make their platform more +accessible: they currently use a text-based CAPTCHA, which will be +replaced by mCaptcha. The decision was finalized after I presented +mCaptcha to them at a meeting their organized. Please see +here for +slides.

+

Gitea gets mCaptcha support

+

@Gusted from Codeberg is working on integrating +mCaptcha in Gitea so that Codeberg can deploy it. Please see +here for related the +pull request.

+

This project is yet to see usage, so we are venturing into uncharted +territory: should you face issues with either deploying or +integrating mCaptcha, please feel free to reach out.

+

mCaptcha supports MariaDB:

+

Codeberg uses MariaDB. To facilitate Codeberg deployment, I implemented +support for MariaDB. The work done in +May, 2022 made +implementing support easy. Support for MariaDB is first class in +mCaptcha: automatic testing exist to run tests with both Postgres and +MariaDB, so I expect things to be stable.

+

Applied for Funding: NLnet and Open Tech Fund

+

I’ve applied for NLnet and Open Tech Fund[0], Please find the +applications +here +and +here +respectively.

+

If funding is granted:

+
    +
  1. I’ll be able to work full-time for a year at the rate of 2,000 EUR/month
  2. +
  3. We’ll have a dedicated build server
  4. +
  5. We’ll have funds to run a DDoS test to gauge mCaptcha’s effectiveness
  6. +
+

Documentation updates

+

mCaptcha docs over the months have become inconsistent and incorrect. I +cleaned up some of the mess and added a +tutorial to help folks install +mCaptcha on their website. The docs also gets a +glossary, which contain explanations +to mCaptcha jargon.

+

New releases: glue libraries

+

0.1.0-alpha-2 for +vanilla, +react and +svelte glue +libraries were released. They now hand over widget sizing to the client +code(associated PR).

+

Footnotes

+
    +
  • [0]: Special thanks to +@humantech for his thoughtful +reviews and to @dachary for pointing me towards +OTF.
  • +
+ +
+ + +

Edit this page on GitHub

+ +
+
+ +
+
+ + + + + + + + + diff --git a/blog/june-2022-monthly-report/index.html b/blog/june-2022-monthly-report/index.html new file mode 100644 index 0000000..8b1420a --- /dev/null +++ b/blog/june-2022-monthly-report/index.html @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + June, 2022: Monthly Report - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ +
+ +
+
+

June, 2022: Monthly Report

+

Posted July 7, 2022 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+ +

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

Hello and welcome to the June 2022 edition of the monthly report!

+

mCaptcha is incorporated!

+

I spent June doing non-technical tasks but I made significant +progress: I had been trying to do it since summer 2021, but I faced +various setbacks along the way. A family friend, who is also an auditor +helped me finally get mCaptcha incorporated!

+

And we’ve already filed successfully filed the first tax return too!

+

GSTIN

+
33DGKPA2253J1ZN
+

Ideas for Commercial Operations

+

Commercial operations will take a while longer(end of 2022, most +probably). For Hostea, I wrote a dashboard with +payments capabilities(via Stripe) so that experience will help me do the +same for mCaptcha. Working on Hostea has been truly enlightening: it’s +probably the first effort to offer a fully libre, infrastructure-as-code +and payments software included, hosting service. I would like to do the +same for mCaptcha so that service that I setup goes rogue or if someone +wants to offer mCaptcha hosted services, they can replicate my set up +with ease.

+

But the commercial offering will at no point force me or future +maintainers turn mCaptcha into adopting a non-free license like the +Server Side Public +License. +So the following months will see administrative changes within mCaptcha +to device mechanisms to prevent me or any future party with influence in +mCaptcha development from hurting the project by it non-free.

+

Hostea is also an experiment in Free Software commercial operations, so +naturally I’m highly impressed by the ideas that are being discussed +there. mCaptcha, too, will borrow ideas from that project to make its +development economically sustainable.

+ +
+ + +

Edit this page on GitHub

+ +
+
+ +
+
+ + + + + + + + + diff --git a/blog/may-2022-monthly-report/index.html b/blog/may-2022-monthly-report/index.html new file mode 100644 index 0000000..ffab41f --- /dev/null +++ b/blog/may-2022-monthly-report/index.html @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + May, 2022: Monthly Report - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ +
+ +
+
+

May, 2022: Monthly Report

+

Posted June 10, 2022 by Aravinth Manivannan ‐ 4 min read

+

Last Edited February 13, 2023

+ +

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

Hello and welcome to the May 2022 edition of the monthly report!

+

mCaptcha, for a while was showing all the signs of a dead project: +no commits on the repositories and no monthly updates. But the project +is far from dead!

+

Python bindings to mCaptcha PoW

+

pow_py contains bindings to +pow_sha256, the +proof-of-work library +that mCaptcha uses. For the uninitiated, the bindings allow for python +programs to automatically solve mCaptcha.

+

So if you are writing a script to do some chore on your favourite +website that is protected by mCaptcha, you can now solve the mCaptcha +automatically from within the program.

+

Here’s an example:

+
 1import os
+ 2
+ 3import mcaptcha_pow_py
+ 4import requests
+ 5
+ 6# get the sitekey that is used in the mCaptcha protected form
+ 7SITEKEY = os.getenv("MCAPTCHA_CAPTCHA_SITEKEY")
+ 8# the hostname of the mCaptcha instance that the form is using
+ 9MCAPTCHA_HOST = os.getenv("MCAPTCHA_CAPTCHA_HOST")
+10
+11
+12GET_CONFIG_ROUTE = f"{MCAPTCHA_HOST}/api/v1/pow/config"
+13VERIFY_POW_ROUTE = f"{MCAPTCHA_HOST}/api/v1/pow/verify"
+14
+15def solve_captcha():
+16
+17    # get challenge configuration
+18    key = {"key": sitekey}
+19    challenge_config = requests.post(GET_CONFIG_ROUTE, json=key)
+20    challenge_config = challenge_config.json()
+21
+22    # extract configuration data
+23    config = mcaptcha_pow_py.PoWConfig(challenge_config["salt"])
+24    pow_string = challenge_config["string"]
+25    pow_difficulty_factor = challenge_config["difficulty_factor"]
+26
+27    # generate work
+28    work = config.work(pow_string, pow_difficulty_factor)
+29
+30    # verify PoW
+31    proof = {
+32        "key": SITEKEY,
+33        "nonce": work.nonce,
+34        "result": work.result,
+35        "string": challenge_config["string"],
+36    }
+37    resp = requests.post(VERIFY_POW_ROUTE, json=proof)
+38    resp = resp.json()
+39
+40    # extract verification token
+41    token = resp["token"]
+42
+43    return token
+44
+45
+46token = solve_captcha()
+47data = {
+48    "username": "me",
+49    "password": "superlongpassword",
+50    "confirm_password": "superlongpassword",
+51    "mcaptcha__token": token,
+52}
+53response = requests.post("/mCaptcha-protected-form", data=data)
+

This could be missed for building DDoS bots(more on that +here) but this could also be +used to make CAPTCHA solving automated within screen readers and other +accessibility devices!

+

Measuring DDoS protection effectiveness

+

Proof-of-work has historically been a good method to achieve rate +limiting but how much attack can it, specifically mCaptcha’s +implementation, withstand when compared to an unprotected endpoint? To +find out, we used the recently created Python bindings to the mCaptcha +PoW library, the excellent load testing tool, +locust and wrote +mCaptcha/dos!

+

VIT AP kindly permitted me, @realaravinth, to use their network +security lab for setting up a isolated, contained testing environment to +mount a DDoS attack on a test +server +instance.

+

The initial topology consisted of one mCaptcha instance, one DDoS demo +server, one locust node running in leader configuration and six locust +nodes running in follower configuration. I was authorised to use the +netsec lab for three days, which unfortunately wasn’t enough to go +finish running the experiment. Dr. Sibi Chakkaravarthy +Sethuraman has kindly offered to +arrange authorisation to use the netsec lab once again in July 2022, +during which I hope to finish running the experiment

+

Special thanks to ackr-8 and +alan2000alex for help with setting up +infrastructure of the experiment.

+

Refactor

+

mCaptcha underwent a major refactor during the month of May: We re-wrote +and cleaned up all database-related stuff for higher flexibility +and generally good architecture. This refactor lays the foundation +for implementing support for alternate database software +programs(we currently support PostgreSQL only).

+

mCaptcha is now on the Fediverse

+

We recently joined the Fediverse on a +GoToSocial instance run by +@realaravinth. We’ll soon be deleting our Twitter account in favour of +the Fediverse account.

+

Fediverse account: +@mCaptcha@batsense.net

+

Generic hosting

+

I, @realaravinth, have been busy with ForgeFlux +and Hostea — both of which are software +forge related and so +when usable, will mostly improve the Free Software ecosystem. Hostea is +a project that aims to create a libre software development ecosystem and +provide managed hosting for the same. The project is built by a +horizontal community, which allows for multiple service providers who +adhere to the Hostea policies to operate +under the Hostea umbrella — essentially allowing for the creation of +smaller, highly localised cooperatives.

+

Cooperatives are interesting, and we believe that mCaptcha, too, can +benefit from such an architecture as it will prevent any one party from +single-handedly sabotaging the project. The experience gained from +Hostea will be reused in providing managed hosting for mCaptcha.

+

By the end of this year, mCaptcha will reorganise into a horizontal +community and adopt radical transparency to improve trust and +reliability of the project

+
+

P.S: I, realaravinth, would do it sooner but I’m a little busy right +now, so if someone is interested to help out do reach out and so that +we could do it sooner!

+
+

In context of mCaptcha, radical transparency will include all decisions +publicly made, funding and expenses publicly documented, and all +collaborations, too, publicly documented. This of course doesn’t imply +that private, personally identifiable information(addresses and phone +numbers, for instance) will be publicly disclosed. Such information will +be redacted and published.

+ +
+ + +

Edit this page on GitHub

+ +
+
+ +
+
+ + + + + + + + + diff --git a/blog/pow-performance/index.html b/blog/pow-performance/index.html new file mode 100644 index 0000000..9455f6f --- /dev/null +++ b/blog/pow-performance/index.html @@ -0,0 +1,413 @@ + + + + + + + + + + + + + + PoW performance - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ +
+ +
+
+

PoW performance

+

Posted September 1, 2021 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+ +

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

mCaptcha uses a +proof-of-work(PoW) mechanism +to rate limit users or potential bots. In order for this to be +effective, the PoW should be configured properly. The difficulty +requirement can’t be too high, as it could cause accessibility issues on +the client-side while at the same time, it shouldn’t be too low, as it +wouldn’t offer proper protection against bots.

+

Malicious bots(the ones that wreak havoc), run native code which is +capable of running in a multi-threaded context. This creates an unfair +advantage for crackers using these bots over legitimate users, who +usually use browsers to access a website.

+

I wanted to see how much of an advantage a native program would have +over our WASM library.

+

Benchmark tools

+

So I wrote these to compare native and WASM performances:

+ + +

Results

+

The tests were run on my development machine featuring an Intel Core +i7-9750h.

+

Native

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DifficultyRealUserSys
5000000m0.220s0m0.197s0m0.006s
10000000m0.203s0m0.203s0m0.000s
15000000m0.198s0m0.198s0m0.000s
20000000m0.203s0m0.203s0m0.000s
25000000m0.758s0m0.752s0m0.003s
30000000m0.776s0m0.769s0m0.003s
35000000m2.010s0m1.998s0m0.000s
40000000m2.038s0m2.033s0m0.003s
45000000m2.014s0m2.013s0m0.000s
+

Browser

+

I ran the tests on both Firefox and Chromium to compare results

+

Firefox

+
    +
  • User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
  • +
  • Hardware concurrency: 12
  • +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DifficultyDuration(in ms)
500000401
1000000413
1500000398
2000000394
25000001495
30000001556
35000003971
40000004235
45000004116
+
+

To be fair, my Firefox installation is loaded with a gazillion +extensions while the Chromium instance is clean, as I don’t use it +much

+
+

Chromium

+
    +
  • User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36
  • +
  • Hardware concurrency: 12
  • +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DifficultyDuration(in ms)
500000399.40000000037253
1000000354.6000000014901
1500000351.19999999925494
2000000353.80000000074506
25000001337.800000000745
30000001311.199999999255
35000003417.5999999996275
40000003488.800000000745
45000003458.2999999988824
+

Conclusion

+

At the highest difficulty factor, the native implementation was a almost second +faster than the WASM library. But the fact that both of them were able +to run to completion in under 5 seconds is impressive!

+

So, in my opinion, native implementation is only slightly faster than +the WASM library and for all intents and purposes, this shouldn’t matter +much.

+
+

P.S Work is underway to benchmark multiple platforms. A detailed report +will be published when that data is available.

+

For this post, I asked some of my friends to run the tests on their +computers. The results slightly varied but even the slowest case +generated proof for 4500000 difficulty(the highest in this test), in under +15 seconds!

+ +
+ + +

Edit this page on GitHub

+ +
+
+ +
+
+ + + + + + + + + diff --git a/blog/say-hello-to-mcaptcha/index.html b/blog/say-hello-to-mcaptcha/index.html new file mode 100644 index 0000000..f4c510f --- /dev/null +++ b/blog/say-hello-to-mcaptcha/index.html @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + Say hello to mCaptcha - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ +
+ +
+
+

Say hello to mCaptcha

+

Posted May 26, 2021 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+ +

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

At mCaptcha, we believe in digital freedom and privacy and so we built a +proof-of-work based +CAPTCHA system that doesn’t track. Seriously, no tracking. But that +isn’t the killer feature, our system doesn’t require the user to +pick cars or ID sidewalks — our system does it’s thing(usually +at the click of a button) and gets out of the way.

+

How does it work?

+

mCaptcha uses SHA256 based proof-of-work(PoW) to rate limit users.

+

When a user wants to do something on an mCaptcha-protected website,

+
    +
  1. +

    they will have to generate proof-of-work(a bunch of math that will +takes time to compute) and submit it to mCaptcha.

    +
  2. +
  3. +

    We’ll validate the proof:

    +
  4. +
+
    +
  • if validation is unsuccessful, they will be prevented from accessing +the destination website
  • +
  • if validation is successful, read on,
  • +
+
    +
  1. +

    They will be issued a token that should be submit along with the +request/form to the destination website.

    +
  2. +
  3. +

    The destination website validates the submitted token with +mCaptcha before processing the request.

    +
  4. +
+

The whole process is automated from the user’s point of view. All they +have to do is click on a button to initiate the process.

+

Okay, but what about bad actors?

+

mCaptcha makes interacting with websites (computationally)expensive for +the user. A well-behaving user will experience a slight delay(no delay +when under moderate load to 2-3 seconds when under attack; PoW difficulty is +variable) but if someone wants to hammer your site, they will have to do +more work to send requests than your server you will have to do to respond +to their request.

+

Why use mCaptcha?

+
    +
  • Free software, privacy focused
  • +
  • Seamless UX — No more annoying CAPTCHAs!
  • +
  • IP address independent: your users are behind a NAT? We got you covered!
  • +
  • Automatic bot throttling
  • +
  • Resistant to replay attacks: proof-of-work configurations have short lifetimes(30s) and can be used only once. If a user submits a PoW to an already used configuration or an expired one, their proof will be rejected.
  • +
+

How to migrate?

+

Our client libraries are mostly compatible with reCAPTCHA and hCaptcha. +A detailed guide will be published soon.

+

Our Philosophy

+

Man has has come so far only because our ancestors chose to +share their knowledge with others. If everything was labeled +intellectual property, we might still be stuck in Stone Age. The idea of +intellectual property is alien to us. For this reason, all of our source +code is freely available(both as in freedom and beers) at our +GitHub.

+

Resources

+ + +
+ + +

Edit this page on GitHub

+ +
+
+ +
+
+ + + + + + + + + diff --git a/blog/sitemap.xml b/blog/sitemap.xml new file mode 100644 index 0000000..3fb37c5 --- /dev/null +++ b/blog/sitemap.xml @@ -0,0 +1,52 @@ + + + + /blog/july-2022-monthly-report/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /blog/june-2022-monthly-report/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /blog/may-2022-monthly-report/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /blog/december-2021-monthly-report/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /blog/survey/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /blog/pow-performance/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /blog/say-hello-to-mcaptcha/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + \ No newline at end of file diff --git a/blog/survey/index.html b/blog/survey/index.html new file mode 100644 index 0000000..c13121c --- /dev/null +++ b/blog/survey/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + Survey - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ +
+ +
+
+

Survey

+

Posted October 28, 2021 by Aravinth Manivannan ‐ 1 min read

+

Last Edited February 13, 2023

+ +

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

Survey link: https://survey.mcaptcha.org/survey/campaigns/b717e51e-24d4-4ab6-912f-de2dfe3ce1fe/about

+

NOTE: The survey(at least, the lucky draw is temporarily suspended +due to some logistical reasons. Apologies for any inconvenience caused.

+

mCaptcha relies on a +proof-of-work(PoW) +mechanism to guard against bots. In order for this to be effective, the +difficulty factor should be configured properly. If the difficulty +factor is too high all the time, it will inconvenience the users and if +it’s too low during attack, the defence will be weak.

+

So we are conducting a survey to gather performance benchmarks from +various devices and browsers. The data collected from the survey will be made +public, we believe it will guide sysadmins configure difficulty factor +properly.

+

If you are interested in the lucky draw, please save the submission ID and the proof will be presented +to you at the end of the survey.

+
+ survey lucky draw identifier credentials + +
Lucky draw credentials
+
+

Winners

+

This blog post will be updated with the winning submission IDs and the +winners should provide the matching proof to claim their rewards.

+ +
+ + +

Edit this page on GitHub

+ +
+
+ +
+
+ + + + + + + + + diff --git a/blog/survey/survey-id.jpg b/blog/survey/survey-id.jpg new file mode 100644 index 0000000..3c42e30 Binary files /dev/null and b/blog/survey/survey-id.jpg differ diff --git a/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_20x0_resize_q75_box.jpg b/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_20x0_resize_q75_box.jpg new file mode 100644 index 0000000..710a508 Binary files /dev/null and b/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_20x0_resize_q75_box.jpg differ diff --git a/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_500x0_resize_q75_box.jpg b/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_500x0_resize_q75_box.jpg new file mode 100644 index 0000000..4a36ebe Binary files /dev/null and b/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_500x0_resize_q75_box.jpg differ diff --git a/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_600x0_resize_q75_box.jpg b/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_600x0_resize_q75_box.jpg new file mode 100644 index 0000000..4f4b4ff Binary files /dev/null and b/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_600x0_resize_q75_box.jpg differ diff --git a/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_700x0_resize_q75_box.jpg b/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_700x0_resize_q75_box.jpg new file mode 100644 index 0000000..f530bf8 Binary files /dev/null and b/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_700x0_resize_q75_box.jpg differ diff --git a/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_800x0_resize_q75_box.jpg b/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_800x0_resize_q75_box.jpg new file mode 100644 index 0000000..cb3f27d Binary files /dev/null and b/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_800x0_resize_q75_box.jpg differ diff --git a/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_900x0_resize_q75_box.jpg b/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_900x0_resize_q75_box.jpg new file mode 100644 index 0000000..29f8251 Binary files /dev/null and b/blog/survey/survey-id_huff9ec74d3d162f9d0221fc73fa41d293_43947_900x0_resize_q75_box.jpg differ diff --git a/browserconfig.xml b/browserconfig.xml new file mode 100644 index 0000000..c554148 --- /dev/null +++ b/browserconfig.xml @@ -0,0 +1,2 @@ + +#ffffff \ No newline at end of file diff --git a/community/index.html b/community/index.html new file mode 100644 index 0000000..8fb73db --- /dev/null +++ b/community/index.html @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + Community - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ +
+ +

Community

+

+

Matrix Community

+

Come say hi at our Matrix community!

+

Fediverse handle

+

We are on the Fediverse at +@mCapthca@batsense.net, toot at +us for queries and whatnot :)

+

Official Twitter handle

+

The project also has a twitter twitter presence at @m_captcha(Nitter +hyperlink). This space is used in +addition to the blog to post short updates.

+

Lead developer email

+

Write to me at realaravinth@batsense.net!

+

Bug reports

+

We use GitHub for managing tickets

+ +

Edit this page on GitHub

+ +
+
+ +
+
+ + + + + + + + + diff --git a/contact/index.html b/contact/index.html new file mode 100644 index 0000000..47b9fa5 --- /dev/null +++ b/contact/index.html @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + Contact - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ +
+ +

Contact

+

+

Matrix Community

+

We have a Matrix +community, come say +hi!.

+

Lead developer

+

You can find me(@realaravinth) on +the Matrix, on +GitHub or email me at +realaravinth@batense.net.

+ +

Edit this page on GitHub

+ +
+
+ +
+
+ + + + + + + + + diff --git a/contributors/aravinth-manivannan/index.html b/contributors/aravinth-manivannan/index.html new file mode 100644 index 0000000..436ae10 --- /dev/null +++ b/contributors/aravinth-manivannan/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + Aravinth Manivannan - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+
+

Aravinth Manivannan

+

Creator of mCaptcha.

+

@realaravinth

+
+
+
+
+

July, 2022: Monthly Report

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

Posted August 4, 2022 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+

+
+
+
+

June, 2022: Monthly Report

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

Posted July 7, 2022 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+

+
+
+
+

May, 2022: Monthly Report

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

Posted June 10, 2022 by Aravinth Manivannan ‐ 4 min read

+

Last Edited February 13, 2023

+

+
+
+
+

December, 2021: Monthly Report

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

Posted December 23, 2021 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+

+
+
+
+

Survey

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

Posted October 28, 2021 by Aravinth Manivannan ‐ 1 min read

+

Last Edited February 13, 2023

+

+
+
+
+

PoW performance

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

Posted September 1, 2021 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+

+
+
+
+

Say hello to mCaptcha

+

We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?

+

Posted May 26, 2021 by Aravinth Manivannan ‐ 2 min read

+

Last Edited February 13, 2023

+

+
+
+
+
+
+ +
+
+ + + + + + + + + diff --git a/contributors/aravinth-manivannan/index.xml b/contributors/aravinth-manivannan/index.xml new file mode 100644 index 0000000..01e8f34 --- /dev/null +++ b/contributors/aravinth-manivannan/index.xml @@ -0,0 +1,88 @@ + + + + Aravinth Manivannan on + /contributors/aravinth-manivannan/ + Recent content in Aravinth Manivannan on + Hugo -- gohugo.io + en-US + Wed, 26 May 2021 00:00:00 +0000 + + July, 2022: Monthly Report + /blog/july-2022-monthly-report/ + Thu, 04 Aug 2022 00:00:00 +0000 + + /blog/july-2022-monthly-report/ + Hello and welcome to the July, 2022 monthly report! +TL;DR Codeberg is trying out mCaptcha, Gitea is getting mCaptcha support, mCaptcha supports MariaDB, I&rsquo;ve applied for NLnet and Open Tech Fund, documentation is updated: tutorials and glossary is added and glue libraries have new releases. +Codeberg is deploying mCaptcha Codeberg is committed to trying out mCaptcha to make their platform more accessible: they currently use a text-based CAPTCHA, which will be replaced by mCaptcha. + + + + June, 2022: Monthly Report + /blog/june-2022-monthly-report/ + Thu, 07 Jul 2022 00:00:00 +0000 + + /blog/june-2022-monthly-report/ + Hello and welcome to the June 2022 edition of the monthly report! +mCaptcha is incorporated! I spent June doing non-technical tasks but I made significant progress: I had been trying to do it since summer 2021, but I faced various setbacks along the way. A family friend, who is also an auditor helped me finally get mCaptcha incorporated! +And we&rsquo;ve already filed successfully filed the first tax return too! +GSTIN 33DGKPA2253J1ZN Ideas for Commercial Operations Commercial operations will take a while longer(end of 2022, most probably). + + + + May, 2022: Monthly Report + /blog/may-2022-monthly-report/ + Fri, 10 Jun 2022 00:00:00 +0000 + + /blog/may-2022-monthly-report/ + Hello and welcome to the May 2022 edition of the monthly report! +mCaptcha, for a while was showing all the signs of a dead project: no commits on the repositories and no monthly updates. But the project is far from dead! +Python bindings to mCaptcha PoW pow_py contains bindings to pow_sha256, the proof-of-work library that mCaptcha uses. For the uninitiated, the bindings allow for python programs to automatically solve mCaptcha. + + + + December, 2021: Monthly Report + /blog/december-2021-monthly-report/ + Thu, 23 Dec 2021 00:00:00 +0000 + + /blog/december-2021-monthly-report/ + Hello and welcome to the first edition of the monthly report! +I believe free software like mCaptcha is critical to a healthy internet but being a one-person show, there&rsquo;s hardly any accountability in the way software is built. I hope, through monthly reports, I can explain the logic and intentions behind decisions taken in the development process. +This month, the following things were accomplished: +1. Full LibreJS Compliance The CAPTCHA widget and the admin dashboard are 100% LibreJS compliant! + + + + Survey + /blog/survey/ + Thu, 28 Oct 2021 00:00:00 +0000 + + /blog/survey/ + Survey link: https://survey.mcaptcha.org/survey/campaigns/b717e51e-24d4-4ab6-912f-de2dfe3ce1fe/about +NOTE: The survey(at least, the lucky draw is temporarily suspended due to some logistical reasons. Apologies for any inconvenience caused. +mCaptcha relies on a proof-of-work(PoW) mechanism to guard against bots. In order for this to be effective, the difficulty factor should be configured properly. If the difficulty factor is too high all the time, it will inconvenience the users and if it&rsquo;s too low during attack, the defence will be weak. + + + + PoW performance + /blog/pow-performance/ + Wed, 01 Sep 2021 00:00:00 +0000 + + /blog/pow-performance/ + mCaptcha uses a proof-of-work(PoW) mechanism to rate limit users or potential bots. In order for this to be effective, the PoW should be configured properly. The difficulty requirement can&rsquo;t be too high, as it could cause accessibility issues on the client-side while at the same time, it shouldn&rsquo;t be too low, as it wouldn&rsquo;t offer proper protection against bots. +Malicious bots(the ones that wreak havoc), run native code which is capable of running in a multi-threaded context. + + + + Say hello to mCaptcha + /blog/say-hello-to-mcaptcha/ + Wed, 26 May 2021 00:00:00 +0000 + + /blog/say-hello-to-mcaptcha/ + At mCaptcha, we believe in digital freedom and privacy and so we built a proof-of-work based CAPTCHA system that doesn&rsquo;t track. Seriously, no tracking. But that isn&rsquo;t the killer feature, our system doesn&rsquo;t require the user to pick cars or ID sidewalks &mdash; our system does it&rsquo;s thing(usually at the click of a button) and gets out of the way. +How does it work? mCaptcha uses SHA256 based proof-of-work(PoW) to rate limit users. + + + + diff --git a/contributors/index.html b/contributors/index.html new file mode 100644 index 0000000..f6c4632 --- /dev/null +++ b/contributors/index.html @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + Contributors - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + diff --git a/contributors/index.xml b/contributors/index.xml new file mode 100644 index 0000000..6725701 --- /dev/null +++ b/contributors/index.xml @@ -0,0 +1,21 @@ + + + + Contributors on + /contributors/ + Recent content in Contributors on + Hugo -- gohugo.io + en-US + Wed, 26 May 2021 00:00:00 +0000 + + Aravinth Manivannan + /contributors/aravinth-manivannan/ + Wed, 26 May 2021 00:00:00 +0000 + + /contributors/aravinth-manivannan/ + Creator of mCaptcha. +@realaravinth + + + + diff --git a/css/vendor/.gitkeep b/css/vendor/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/api/browser/index.html b/docs/api/browser/index.html new file mode 100644 index 0000000..c58099f --- /dev/null +++ b/docs/api/browser/index.html @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + Browser libraries - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

Browser libraries

+

+

The browser part of mCaptcha is divided into three components.

+
    +
  • Glue code
  • +
  • Widget program
  • +
  • Proof-of-Work libraries(WebAssembly and JavaScript polyfill)
  • +
+

Glue code

+

This is the code that links mCaptcha with your website’s frontend code. +It creates an iframe containing the mCaptcha widget and injects the +received verification proof token into a hidden input field.

+

Support is available for various frameworks, see +mCaptcha/glue for the full list.

+

For frameworks without official support, a low-level library, +@mcaptcha/core-glue, +can be used to implement support.

+

Widget Program

+

This part is served by the mCaptcha backend. It fetches PoW config from +the backend, generates proof and submits it for verification. If +verification is successful, it sends a message containing the +verification proof token to the parent window, assuming it’s loaded as +an iframe.

+ +

WebAssembly library which generates Proofs of Work for mCaptcha systems.

+

Proof-of-Work(PoW) library

+

WebAssembly bindings(mCaptcha/pow_wasm) are available for the main rust library(mCaptcha/pow_sha256).

+

For browsers without support WebAssembly, a +polyfill(pow_sha256-polyfill) +is available.

+ +

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/api/index.html b/docs/api/index.html new file mode 100644 index 0000000..3b41e00 --- /dev/null +++ b/docs/api/index.html @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + API - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + diff --git a/docs/api/index.xml b/docs/api/index.xml new file mode 100644 index 0000000..7423495 --- /dev/null +++ b/docs/api/index.xml @@ -0,0 +1,45 @@ + + + + API on + /docs/api/ + Recent content in API on + Hugo -- gohugo.io + en-US + Tue, 06 Oct 2020 08:48:23 +0000 + + Browser libraries + /docs/api/browser/ + Thu, 11 Mar 2021 00:00:00 +0000 + + /docs/api/browser/ + The browser part of mCaptcha is divided into three components. +Glue code Widget program Proof-of-Work libraries(WebAssembly and JavaScript polyfill) Glue code This is the code that links mCaptcha with your website&rsquo;s frontend code. It creates an iframe containing the mCaptcha widget and injects the received verification proof token into a hidden input field. +Support is available for various frameworks, see mCaptcha/glue for the full list. +For frameworks without official support, a low-level library, @mcaptcha/core-glue, can be used to implement support. + + + + mCaptcha System Library + /docs/api/mcaptcha-system/ + Thu, 11 Mar 2021 00:00:00 +0000 + + /docs/api/mcaptcha-system/ + Documentation for the library used in mCaptcha core. +Versions master-branch 0.1.3 0.1.2 0.1.1 0.1.0 + + + + pow_sha256 + /docs/api/pow-sha256/ + Thu, 11 Mar 2021 00:00:00 +0000 + + /docs/api/pow-sha256/ + Rust crate which generates SHA256 Proofs of Work on serializable datatypes. +This is a fork of the pow library by @robkorn) with some new additions. Primary of these being: +PoW datatype now offers a constructor Salt is no longer hard coded into the library, users can provide unique salts. Other small changes have also been included of various importance but mostly just stylistic/ease of use improvements. +Versions master-branch 0.2.1 0.2.0 0. + + + + diff --git a/docs/api/mcaptcha-system/index.html b/docs/api/mcaptcha-system/index.html new file mode 100644 index 0000000..5a2c564 --- /dev/null +++ b/docs/api/mcaptcha-system/index.html @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + mCaptcha System Library - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

mCaptcha System Library

+

+

Documentation for the library used in mCaptcha core.

+

Versions

+ + +

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/api/pow-sha256/index.html b/docs/api/pow-sha256/index.html new file mode 100644 index 0000000..8105ae0 --- /dev/null +++ b/docs/api/pow-sha256/index.html @@ -0,0 +1,241 @@ + + + + + + + + + + + + + + pow_sha256 - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

pow_sha256

+

+

Rust crate which generates SHA256 Proofs of Work on serializable datatypes.

+

This is a fork of the pow library by +@robkorn) with some new +additions. Primary of these being:

+
    +
  • PoW datatype now offers a constructor
  • +
  • Salt is no longer hard coded into the library, users can provide +unique salts.
  • +
+

Other small changes have also been included of various importance but +mostly just stylistic/ease of use improvements.

+

Versions

+ +

Changelog

+

Changelog is available at the project’s +repository

+ +

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/api/sitemap.xml b/docs/api/sitemap.xml new file mode 100644 index 0000000..1438f2f --- /dev/null +++ b/docs/api/sitemap.xml @@ -0,0 +1,24 @@ + + + + /docs/api/browser/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/api/mcaptcha-system/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/api/pow-sha256/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + \ No newline at end of file diff --git a/docs/help/faq/index.html b/docs/help/faq/index.html new file mode 100644 index 0000000..0a7510b --- /dev/null +++ b/docs/help/faq/index.html @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + FAQ - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

FAQ

+

Answers to frequently asked questions.

+

Coming soon

+ +

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/help/index.html b/docs/help/index.html new file mode 100644 index 0000000..133f32f --- /dev/null +++ b/docs/help/index.html @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + Help - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+
+

Help

+
+
+ + + + + + + + + + + + + + + + + +
+
+ FAQ → +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+
+ + + + + + + + + diff --git a/docs/help/index.xml b/docs/help/index.xml new file mode 100644 index 0000000..31b15fd --- /dev/null +++ b/docs/help/index.xml @@ -0,0 +1,30 @@ + + + + Help on + /docs/help/ + Recent content in Help on + Hugo -- gohugo.io + en-US + Tue, 06 Oct 2020 08:49:15 +0000 + + Troubleshooting + /docs/help/troubleshooting/ + Mon, 01 Jan 0001 00:00:00 +0000 + + /docs/help/troubleshooting/ + Q: I just setup an instance but I am unable to login mCaptcha by default is configured to server at localhost hostname. If the instance is deployed at another hostname, please try setting MCAPTCHA_SERVER_DOMAIN environment variable to the hostname at which your instance is deployed or setting the equivalent in config.toml: +1[server] 2domain=mydomain + + + + FAQ + /docs/help/faq/ + Mon, 01 Jan 0001 00:00:00 +0000 + + /docs/help/faq/ + Coming soon + + + + diff --git a/docs/help/sitemap.xml b/docs/help/sitemap.xml new file mode 100644 index 0000000..d27104e --- /dev/null +++ b/docs/help/sitemap.xml @@ -0,0 +1,17 @@ + + + + /docs/help/troubleshooting/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/help/faq/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + \ No newline at end of file diff --git a/docs/help/troubleshooting/index.html b/docs/help/troubleshooting/index.html new file mode 100644 index 0000000..41223df --- /dev/null +++ b/docs/help/troubleshooting/index.html @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + Troubleshooting - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

Troubleshooting

+

Solutions to common problems.

+

Q: I just setup an instance but I am unable to login

+

mCaptcha by default is configured to server at localhost hostname. If +the instance is deployed at another hostname, please try setting +MCAPTCHA_SERVER_DOMAIN environment variable to the hostname at which +your instance is deployed or setting the equivalent in config.toml:

+
1[server]
+2domain=mydomain
+
+

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..1a161b0 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + mCaptcha - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+
+

mCaptcha

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ FAQ → +
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ + + + + + + + + + + + + + +
+
+
+
+ +
+
+ + + + + + + + + diff --git a/docs/index.xml b/docs/index.xml new file mode 100644 index 0000000..acb2017 --- /dev/null +++ b/docs/index.xml @@ -0,0 +1,10 @@ + + + + mCaptcha on + /docs/ + Recent content in mCaptcha on + Hugo -- gohugo.io + en-US + + diff --git a/docs/introduction/configuring-difficulty-factor/index.html b/docs/introduction/configuring-difficulty-factor/index.html new file mode 100644 index 0000000..1e79244 --- /dev/null +++ b/docs/introduction/configuring-difficulty-factor/index.html @@ -0,0 +1,264 @@ + + + + + + + + + + + + + + Configuring Difficulty Factor - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

Configuring Difficulty Factor

+

+

mCaptcha is highly responsive to detecting DDoS attacks. Admins are +advised to take advantage of it by setting low difficulty +factors for normal traffic levels +for their website.

+

Lowest advisable difficulty factor is 5000.

+

For instance, if it is normal for my website to get 2000 requests for +every 30 seconds, I will set a cool +down period of 30 seconds and the +first level of difficulty configuration will have a visitor threshold of 2000 with a +difficulty factor of 5000.

+

There are two modes to setting difficulty factor for your website on +mCaptcha:

+

Easy option

+

Easy mode asks a few basic statistics about your website and generates a +configuration that should work for your website. Currently, easy mode is +guided by assumptions on suitable difficulty factors to protect a +website but it will be fine-tuned as mCaptcha sees more deployment.

+

Configuration generated by easy mode can be tweaked later using the +advance mode, as you become more familiar with how mCaptcha works.

+
+ new sitekey form in easy mode + +
+

Advance option

+

Advance mode gives the admin granular control over how mCaptcha behaves +on their website. It has options to set the difficulty factor for each +level of traffic(or visitor threshold, in mCaptcha speak), fully taking +advantage of mCaptcha’s variable difficulty factor feature.

+

For instance, if it is normal for a website to get 200 requests over 30 +seconds, then setting a very low difficulty factor for a visitor +threshold of 200 and a cool down period of 30 seconds will allow the +users to pass through without waiting on the CAPTCHA. But if 1000 +requests over 30 seconds will bring down the service, then the admin can +configure increasing levels of difficulty factor of increasing traffic +levels, effectively rate limiting its users and protecting the +underlying website.

+
+ new sitekey form in advance mode + +
+ +

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode.png new file mode 100644 index 0000000..279e066 Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_20x0_resize_box_2.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_20x0_resize_box_2.png new file mode 100644 index 0000000..9339dff Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_20x0_resize_box_2.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_20x0_resize_box_3.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_20x0_resize_box_3.png new file mode 100644 index 0000000..9339dff Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_20x0_resize_box_3.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_500x0_resize_box_2.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_500x0_resize_box_2.png new file mode 100644 index 0000000..8d989ca Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_500x0_resize_box_2.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_500x0_resize_box_3.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_500x0_resize_box_3.png new file mode 100644 index 0000000..8d989ca Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_500x0_resize_box_3.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_600x0_resize_box_2.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_600x0_resize_box_2.png new file mode 100644 index 0000000..15991ab Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_600x0_resize_box_2.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_600x0_resize_box_3.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_600x0_resize_box_3.png new file mode 100644 index 0000000..15991ab Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_600x0_resize_box_3.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_700x0_resize_box_2.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_700x0_resize_box_2.png new file mode 100644 index 0000000..614c642 Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_700x0_resize_box_2.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_700x0_resize_box_3.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_700x0_resize_box_3.png new file mode 100644 index 0000000..614c642 Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_700x0_resize_box_3.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_800x0_resize_box_2.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_800x0_resize_box_2.png new file mode 100644 index 0000000..8f65040 Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_800x0_resize_box_2.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_800x0_resize_box_3.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_800x0_resize_box_3.png new file mode 100644 index 0000000..8f65040 Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_800x0_resize_box_3.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_900x0_resize_box_2.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_900x0_resize_box_2.png new file mode 100644 index 0000000..6df10ac Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_900x0_resize_box_2.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_900x0_resize_box_3.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_900x0_resize_box_3.png new file mode 100644 index 0000000..6df10ac Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-adv-mode_huc4867c6295dc4be195d832a52b37239b_23312_900x0_resize_box_3.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode.png new file mode 100644 index 0000000..5b3fc8e Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_20x0_resize_box_2.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_20x0_resize_box_2.png new file mode 100644 index 0000000..c41997c Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_20x0_resize_box_2.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_20x0_resize_box_3.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_20x0_resize_box_3.png new file mode 100644 index 0000000..c41997c Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_20x0_resize_box_3.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_500x0_resize_box_2.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_500x0_resize_box_2.png new file mode 100644 index 0000000..35c304f Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_500x0_resize_box_2.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_500x0_resize_box_3.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_500x0_resize_box_3.png new file mode 100644 index 0000000..35c304f Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_500x0_resize_box_3.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_600x0_resize_box_2.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_600x0_resize_box_2.png new file mode 100644 index 0000000..6730928 Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_600x0_resize_box_2.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_600x0_resize_box_3.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_600x0_resize_box_3.png new file mode 100644 index 0000000..6730928 Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_600x0_resize_box_3.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_700x0_resize_box_2.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_700x0_resize_box_2.png new file mode 100644 index 0000000..1a569eb Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_700x0_resize_box_2.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_700x0_resize_box_3.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_700x0_resize_box_3.png new file mode 100644 index 0000000..1a569eb Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_700x0_resize_box_3.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_800x0_resize_box_2.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_800x0_resize_box_2.png new file mode 100644 index 0000000..f52271c Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_800x0_resize_box_2.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_800x0_resize_box_3.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_800x0_resize_box_3.png new file mode 100644 index 0000000..f52271c Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_800x0_resize_box_3.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_900x0_resize_box_2.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_900x0_resize_box_2.png new file mode 100644 index 0000000..2e13b66 Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_900x0_resize_box_2.png differ diff --git a/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_900x0_resize_box_3.png b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_900x0_resize_box_3.png new file mode 100644 index 0000000..2e13b66 Binary files /dev/null and b/docs/introduction/configuring-difficulty-factor/new-sitekey-easy-mode_hu3f66189ea53484ac6603a2d78fa015c8_26636_900x0_resize_box_3.png differ diff --git a/docs/introduction/index.html b/docs/introduction/index.html new file mode 100644 index 0000000..7aed7f1 --- /dev/null +++ b/docs/introduction/index.html @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + Introduction - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + diff --git a/docs/introduction/index.xml b/docs/introduction/index.xml new file mode 100644 index 0000000..a58a4af --- /dev/null +++ b/docs/introduction/index.xml @@ -0,0 +1,33 @@ + + + + Introduction on + /docs/introduction/ + Recent content in Introduction on + Hugo -- gohugo.io + en-US + Tue, 06 Oct 2020 08:48:45 +0000 + + Installing mCaptcha on your website + /docs/introduction/installing-captcha/ + Wed, 22 Jun 2022 00:00:00 +0000 + + /docs/introduction/installing-captcha/ + mCaptcha can protect your website from DDoS attacks. In this guide we&rsquo;ll explore how to install mCaptcha on your website. The end result will be something like this, on your website: +For the purpose of this demo, we will be using demo.mcaptcha.org, a demo instance running in @realaravinth&rsquo;s bedroom(for this same reason, it shouldn&rsquo;t be used for anything serious) +1. Create an account and sign into the mCaptcha dashboard Head over to demo. + + + + Configuring Difficulty Factor + /docs/introduction/configuring-difficulty-factor/ + Wed, 22 Jun 2022 00:00:00 +0000 + + /docs/introduction/configuring-difficulty-factor/ + mCaptcha is highly responsive to detecting DDoS attacks. Admins are advised to take advantage of it by setting low difficulty factors for normal traffic levels for their website. +Lowest advisable difficulty factor is 5000. +For instance, if it is normal for my website to get 2000 requests for every 30 seconds, I will set a cool down period of 30 seconds and the first level of difficulty configuration will have a visitor threshold of 2000 with a difficulty factor of 5000. + + + + diff --git a/docs/introduction/installing-captcha/copy-sitekey.png b/docs/introduction/installing-captcha/copy-sitekey.png new file mode 100644 index 0000000..4008dc9 Binary files /dev/null and b/docs/introduction/installing-captcha/copy-sitekey.png differ diff --git a/docs/introduction/installing-captcha/index.html b/docs/introduction/installing-captcha/index.html new file mode 100644 index 0000000..9394a84 --- /dev/null +++ b/docs/introduction/installing-captcha/index.html @@ -0,0 +1,322 @@ + + + + + + + + + + + + + + Installing mCaptcha on your website - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

Installing mCaptcha on your website

+

+

mCaptcha can protect your website from DDoS attacks. In this guide we’ll +explore how to install mCaptcha on your website. The end result will be +something like this, on your website:

+
+ A registration form with mCaptcha widget installed + +
+

For the purpose of this demo, we will be using +demo.mcaptcha.org, a demo instance running +in @realaravinth’s bedroom(for this same reason, it shouldn’t be used +for anything serious)

+

1. Create an account and sign into the mCaptcha dashboard

+

Head over to demo.mcaptcha.org and +create an account. When ready, sign in.

+

2. Create new site key

+

A site key is how a new CAPTCHA is configured within mCaptcha. To create +a new site key, click on “New Site” button in the dashboard.

+
+ mCaptcha dashboard with the 'new site key' button highlighted + +
+

There are two options to create a new site key, easy and advanced. We +are going to use the easy mode in this tutorial. If you are interested +in learning more about the advance mode, please see here.

+
+

Easy Mode

+

Easy mode asks a few basic statistics about your website and generates a +configuration that should work for your website. Currently, easy mode is +guided by assumptions on suitable difficulty factors to protect a +website but it will be fine-tuned as mCaptcha sees more deployment.

+

Configuration generated by easy mode can be tweaked later using the +advance mode, as you become more familiar with how mCaptcha works.

+
+

Fill the form and submit it.

+
+ mCaptcha dashboard with the 'new site key' form in easy mode, with details filled in + +
+ +

Submitting the form will take you to a page where site key configuration +can be viewed. “View deployment” link will display CAPTCHA widget with +the supplied configuration. Click on it and grab the widget link.

+

4. Install mCaptcha on your website

+

Integration support is available for some frontend JavaScript +frameworks. To see full list of supported frameworks, please see +here.

+

There are two options to use the integration library to integrate +mCaptcha on your website:

+
    +
  1. Serve the integration library yourself
  2. +
  3. Use a CDN like unpkg.com
  4. +
+

In this tutorial, we’ll be using the CDN.

+

Pasting the following snippet on the page, within the form that requires to be protected +will load the mCaptcha widget with the configuration supplied. Be sure +to replace Your {{paste your widget link}} with the link obtained from +the previous step.

+
 1<div id="mcaptcha__widget-container"></div>
+ 2<script src="https://unpkg.com/@mcaptcha/vanilla-glue@0.1.0-alpha-2/dist/index.js"></script>
+ 3<script charset="utf-8">
+ 4  let config = {
+ 5    widgetLink: new URL(
+ 6      {{paste yout widget link}}
+ 7    ),
+ 8  };
+ 9  new mcaptchaGlue.default(config);
+10</script>
+

A full example is available +here.

+

5. Configure backend to authenticate CAPTCHA tokens

+
    +
  1. +

    Get access token from the user’s +form submission payload. The access token will be associated with a +parameter called mcaptcha__token.

    +
    1 mcaptcha_token = request.form["mcaptcha__token"]
    +
  2. +
  3. +

    Validate access token with mCaptcha instance

    +
  4. +
+
 1payload = {
+ 2    "token": mcaptcha_token,
+ 3    "key": mcaptcha_sitekey, # captcha site key
+ 4    # mCaptcha account secret; available in settings
+ 5    "secret": mcaptcha_account_secret,
+ 6}
+ 7resp = requests.post(
+ 8    "https://demo.mcaptha.org/api/v1/pow/siteverify", json=payload
+ 9)
+10resp = resp.json()
+
    +
  1. If access token is valid, allow access to protected resource or deny +access.
  2. +
+
1 if resp["valid"] == False:
+2     return "invalid captcha", 400
+3 else:
+4     return allow_access_to_protected_resource(request.form)
+

Please see here for a complete Flask example and here for an Actix +Web example.

+

Congratulations, mCaptcha is now integrated with your website!

+ +

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/introduction/installing-captcha/mcaptcha-widget-installation-result.png b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result.png new file mode 100644 index 0000000..18d60d5 Binary files /dev/null and b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result.png differ diff --git a/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_20x0_resize_box_2.png b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_20x0_resize_box_2.png new file mode 100644 index 0000000..4175325 Binary files /dev/null and b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_20x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_20x0_resize_box_3.png b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_20x0_resize_box_3.png new file mode 100644 index 0000000..4175325 Binary files /dev/null and b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_20x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_500x0_resize_box_2.png b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_500x0_resize_box_2.png new file mode 100644 index 0000000..fe9f6cb Binary files /dev/null and b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_500x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_500x0_resize_box_3.png b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_500x0_resize_box_3.png new file mode 100644 index 0000000..fe9f6cb Binary files /dev/null and b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_500x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_600x0_resize_box_2.png b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_600x0_resize_box_2.png new file mode 100644 index 0000000..1a8ef3f Binary files /dev/null and b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_600x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_600x0_resize_box_3.png b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_600x0_resize_box_3.png new file mode 100644 index 0000000..1a8ef3f Binary files /dev/null and b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_600x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_700x0_resize_box_2.png b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_700x0_resize_box_2.png new file mode 100644 index 0000000..ff58c32 Binary files /dev/null and b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_700x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_700x0_resize_box_3.png b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_700x0_resize_box_3.png new file mode 100644 index 0000000..ff58c32 Binary files /dev/null and b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_700x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_800x0_resize_box_2.png b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_800x0_resize_box_2.png new file mode 100644 index 0000000..de4e1cf Binary files /dev/null and b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_800x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_800x0_resize_box_3.png b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_800x0_resize_box_3.png new file mode 100644 index 0000000..de4e1cf Binary files /dev/null and b/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_800x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-adv-mode.png b/docs/introduction/installing-captcha/new-sitekey-adv-mode.png new file mode 100644 index 0000000..279e066 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-adv-mode.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-btn.png b/docs/introduction/installing-captcha/new-sitekey-btn.png new file mode 100644 index 0000000..956e1cb Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-btn.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_20x0_resize_box_2.png b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_20x0_resize_box_2.png new file mode 100644 index 0000000..4840be9 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_20x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_20x0_resize_box_3.png b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_20x0_resize_box_3.png new file mode 100644 index 0000000..4840be9 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_20x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_500x0_resize_box_2.png b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_500x0_resize_box_2.png new file mode 100644 index 0000000..3106a74 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_500x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_500x0_resize_box_3.png b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_500x0_resize_box_3.png new file mode 100644 index 0000000..3106a74 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_500x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_600x0_resize_box_2.png b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_600x0_resize_box_2.png new file mode 100644 index 0000000..dd9e66b Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_600x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_600x0_resize_box_3.png b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_600x0_resize_box_3.png new file mode 100644 index 0000000..dd9e66b Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_600x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_700x0_resize_box_2.png b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_700x0_resize_box_2.png new file mode 100644 index 0000000..d43bf7a Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_700x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_700x0_resize_box_3.png b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_700x0_resize_box_3.png new file mode 100644 index 0000000..d43bf7a Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_700x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_800x0_resize_box_2.png b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_800x0_resize_box_2.png new file mode 100644 index 0000000..3cc24e9 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_800x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_800x0_resize_box_3.png b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_800x0_resize_box_3.png new file mode 100644 index 0000000..3cc24e9 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_800x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_900x0_resize_box_2.png b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_900x0_resize_box_2.png new file mode 100644 index 0000000..d70cf47 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_900x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_900x0_resize_box_3.png b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_900x0_resize_box_3.png new file mode 100644 index 0000000..d70cf47 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_900x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled.png new file mode 100644 index 0000000..4a27364 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_20x0_resize_box_2.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_20x0_resize_box_2.png new file mode 100644 index 0000000..96990eb Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_20x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_20x0_resize_box_3.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_20x0_resize_box_3.png new file mode 100644 index 0000000..96990eb Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_20x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_500x0_resize_box_2.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_500x0_resize_box_2.png new file mode 100644 index 0000000..e3c7dc5 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_500x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_500x0_resize_box_3.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_500x0_resize_box_3.png new file mode 100644 index 0000000..e3c7dc5 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_500x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_600x0_resize_box_2.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_600x0_resize_box_2.png new file mode 100644 index 0000000..ad5ba6f Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_600x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_600x0_resize_box_3.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_600x0_resize_box_3.png new file mode 100644 index 0000000..ad5ba6f Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_600x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_700x0_resize_box_2.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_700x0_resize_box_2.png new file mode 100644 index 0000000..54dd22e Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_700x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_700x0_resize_box_3.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_700x0_resize_box_3.png new file mode 100644 index 0000000..54dd22e Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_700x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_800x0_resize_box_2.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_800x0_resize_box_2.png new file mode 100644 index 0000000..533fa62 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_800x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_800x0_resize_box_3.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_800x0_resize_box_3.png new file mode 100644 index 0000000..533fa62 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_800x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_900x0_resize_box_2.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_900x0_resize_box_2.png new file mode 100644 index 0000000..945aef3 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_900x0_resize_box_2.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_900x0_resize_box_3.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_900x0_resize_box_3.png new file mode 100644 index 0000000..945aef3 Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_900x0_resize_box_3.png differ diff --git a/docs/introduction/installing-captcha/new-sitekey-easy-mode.png b/docs/introduction/installing-captcha/new-sitekey-easy-mode.png new file mode 100644 index 0000000..5b3fc8e Binary files /dev/null and b/docs/introduction/installing-captcha/new-sitekey-easy-mode.png differ diff --git a/docs/introduction/installing-captcha/sitekey-in-dashboard-sidepanel.png b/docs/introduction/installing-captcha/sitekey-in-dashboard-sidepanel.png new file mode 100644 index 0000000..4745c79 Binary files /dev/null and b/docs/introduction/installing-captcha/sitekey-in-dashboard-sidepanel.png differ diff --git a/docs/introduction/sitemap.xml b/docs/introduction/sitemap.xml new file mode 100644 index 0000000..967b08f --- /dev/null +++ b/docs/introduction/sitemap.xml @@ -0,0 +1,17 @@ + + + + /docs/introduction/installing-captcha/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/introduction/configuring-difficulty-factor/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + \ No newline at end of file diff --git a/docs/self-hosted/bare-metal/index.html b/docs/self-hosted/bare-metal/index.html new file mode 100644 index 0000000..5c83b1e --- /dev/null +++ b/docs/self-hosted/bare-metal/index.html @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + Deploy bare metal - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

Deploy bare metal

+

Bare metal deployment is tedious, most of this will be automated with a script in the future.

+

2. Configure

+

mcaptcha is highly configurable.

+

Configuration is applied/merged in the following order:

+
    +
  1. path to configuration file passed in via MCAPTCHA_CONFIG
  2. +
  3. ./config/default.toml
  4. +
  5. /etc/mcaptcha/config.toml
  6. +
  7. environment variables.
  8. +
+

1. Install postgres if you don’t have it already.

+

For Debian based distributions:

+
1sudo apt install postgres
+

2. Create new user for running mcaptcha

+
1$ sudo useradd -b /srv -m -s /usr/bin/zsh mcaptcha
+

3. Create new user in Postgres

+
1$ sudo -iu postgres # switch to `postgres` user
+2$ psql
+3postgres=#  CREATE USER mcaptcha WITH PASSWORD 'my super long password and yes you need single quote`;
+4$  createdb -O mcaptcha mcaptcha # create db 'mcaptcha' with 'mcaptcha' as owner
+

4. Install and load mCaptcha/cache module:

+

See mCaptcha/cache for more +details.

+

4. Build mcaptcha

+

To build mcaptcha, you need the following dependencies:

+
    +
  1. rust
  2. +
  3. node(v14.16.0)
  4. +
  5. yarn(JavaScript package manager)
  6. +
  7. make
  8. +
+

How to build

+
    +
  1. Install Cargo using rustup with:
  2. +
+
1$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
+
    +
  1. +

    Install node(v14.16.0)

    +
  2. +
  3. +

    Install yarn(JavaScript package manager)

    +
  4. +
  5. +

    Build with make:

    +
  6. +
+
1$ make dev-env && \
+2	make release
+

5. Install package:

+
1$ sudo cp ./target/release/mcaptcha /usr/bin/ && \
+2	mkdir sudo /etc/mcaptcha && \
+3	sudo cp config/default.toml /etc/mcaptcha/config.toml
+

6. Systemd service configuration:

+
    +
  1. Copy the following to /etc/systemd/system/mcaptcha.service:
  2. +
+
 1[Unit]
+ 2Description=mCaptcha: a CAPTCHA system that gives attackers a run for their money
+ 3
+ 4[Service]
+ 5Type=simple
+ 6User=mcaptcha
+ 7ExecStart=/usr/bin/mcaptcha
+ 8Restart=on-failure
+ 9RestartSec=1
+10SuccessExitStatus=3 4
+11RestartForceExitStatus=3 4
+12SystemCallArchitectures=native
+13MemoryDenyWriteExecute=true
+14NoNewPrivileges=true
+15Environment="RUST_LOG=info"
+16
+17[Unit]
+18After=sound.target
+19Wants=network-online.target
+20Wants=network-online.target
+21Requires=postgresql.service
+22After=syslog.target
+23
+24[Install]
+25WantedBy=multi-user.target
+
    +
  1. Enable service:
  2. +
+
1$ sudo systemctl daemon-reload && \
+2	sudo systemctl enable mcaptcha && \ # Auto startup during boot
+3	sudo systemctl start mcaptcha
+4``
+
+

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/self-hosted/dependencies/index.html b/docs/self-hosted/dependencies/index.html new file mode 100644 index 0000000..0d750d6 --- /dev/null +++ b/docs/self-hosted/dependencies/index.html @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + Database and cache - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

Database and cache

+

mCaptcha server requires dependencies like a Postgres database and a Redis cache

+

Notes

+

Database

+
    +
  • +

    Database migrations are baked into the server binary so don’t worry +about them.

    +
  • +
  • +

    When compiling from source, unset database configuration(comment out +database configuration/ unset relevant environment variables). +mCaptcha uses sqlx database client +library which checks SQL queries at compile time. So if you are starting +with a fresh database without migrations applied, compilation will fail.

    +
  • +
+

Redis

+
    +
  • +

    Redis is an optional dependency. Currently, the non-Redis configuration +doesn’t persist CAPTCHA heat. So if there’s a systems failure, CAPTCHA +heat will be reset and visitor count will start from 0. For small +installations, this should post a problem as heat is short lived and is +reset anyways at cool down period.

    +
  • +
  • +

    mCaptcha uses a custom Redis module called +cache to overcome some of Redis' +limitations.

    +
  • +
+

Instructions

+

Once again, there are two ways to go about this:

+
    +
  1. Docker
  2. +
  3. Bare metal
  4. +
+

Docker

+

Database

+

Download and run Postgres

+
1docker create --name mcaptcha-postgres \
+2  -e POSTGRES_PASSWORD=<database-password> \
+3  -p 5432:5432 \
+4  postgres && docker start mcaptcha-postgres
+

Redis

+
1docker create --name mcaptcha-cache \
+2  -p 6379:6379 \
+3  mcaptcha/cache && docker start mcaptcha-cache
+

See mCaptcha/cache for more +details.

+

1. Install Postgres if you don’t have it already.

+

For Debian based distributions:

+
1sudo apt install postgres
+

2. Create new user for running mCaptcha

+
1$ sudo useradd -b /srv -m -s /usr/bin/bash mcaptcha
+

3. Create new user in Postgres

+
1$ sudo -iu postgres # switch to `postgres` user
+2$ psql
+3postgres=#  CREATE USER mcaptcha WITH PASSWORD 'my super long password and yes you need single quote';
+4$  createdb -O mcaptcha mcaptcha # create db 'mcaptcha' with 'mcaptcha' as owner
+

4. Install mCaptcha/cache

+

See mCaptcha/cache for more +details.

+ +

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/self-hosted/docker/index.html b/docs/self-hosted/docker/index.html new file mode 100644 index 0000000..902c1a5 --- /dev/null +++ b/docs/self-hosted/docker/index.html @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + Using Docker - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

Using Docker

+

+

With Docker

+

1. Configure

+

mcaptcha is highly configurable.

+

Configuration is applied/merged in the following order:

+
    +
  1. path to configuration file passed in via MCAPTCHA_CONFIG
  2. +
  3. ./config/default.toml
  4. +
  5. /etc/mcaptcha/config.toml
  6. +
  7. environment variables.
  8. +
+

See +CONFIGURATION.md +for configurable options.

+

2. Run image

+

If you have already have a Postgres instance running, then:

+
1docker run -p <host-machine-port>:<port-in-configuration-file> \
+2	--add-host=database:<database-ip-addrss> \
+3	-e RUST_LOG=debug \
+4	-e DATABASE_URL="postgres://<db-user>:<db-password>@database:<db-port>/<db-name>" \
+5	mcaptcha/mcaptcha:latest
+

If you don’t have a Postgres instance running, you can either install +one using a package manager or launch one with docker. A docker-compose +configuration is available that will launch both +a database instance mcaptcha instance.

+

With docker-compose

+
    +
  1. +

    Follow steps above to build docker image.

    +
  2. +
  3. +

    Set database password docker-compose configuration.

    +
  4. +
  5. +

    Launch network

    +
  6. +
+
1docker-compose up -d
+
+

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/self-hosted/getting-started/index.html b/docs/self-hosted/getting-started/index.html new file mode 100644 index 0000000..4ea242f --- /dev/null +++ b/docs/self-hosted/getting-started/index.html @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + Getting started - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

Getting started

+

Get started with self-hosting mCaptcha

+

Get started

+

There are two main ways to self-host mCaptcha:

+
    +
  1. Bare metal
  2. +
  3. With Docker
  4. +
+ +

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/self-hosted/index.html b/docs/self-hosted/index.html new file mode 100644 index 0000000..9fbb1b7 --- /dev/null +++ b/docs/self-hosted/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + Self-Hosted - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + diff --git a/docs/self-hosted/index.xml b/docs/self-hosted/index.xml new file mode 100644 index 0000000..3c12e70 --- /dev/null +++ b/docs/self-hosted/index.xml @@ -0,0 +1,56 @@ + + + + Self-Hosted on + /docs/self-hosted/ + Recent content in Self-Hosted on + Hugo -- gohugo.io + en-US + + Getting started + /docs/self-hosted/getting-started/ + Mon, 01 Jan 0001 00:00:00 +0000 + + /docs/self-hosted/getting-started/ + Get started There are two main ways to self-host mCaptcha: +Bare metal With Docker + + + + Deploy bare metal + /docs/self-hosted/bare-metal/ + Mon, 01 Jan 0001 00:00:00 +0000 + + /docs/self-hosted/bare-metal/ + 2. Configure mcaptcha is highly configurable. +Configuration is applied/merged in the following order: +path to configuration file passed in via MCAPTCHA_CONFIG ./config/default.toml /etc/mcaptcha/config.toml environment variables. 1. Install postgres if you don&rsquo;t have it already. For Debian based distributions: +1sudo apt install postgres 2. Create new user for running mcaptcha 1$ sudo useradd -b /srv -m -s /usr/bin/zsh mcaptcha 3. Create new user in Postgres 1$ sudo -iu postgres # switch to `postgres` user 2$ psql 3postgres=# CREATE USER mcaptcha WITH PASSWORD &#39;my super long password and yes you need single quote`; 4$ createdb -O mcaptcha mcaptcha # create db &#39;mcaptcha&#39; with &#39;mcaptcha&#39; as owner 4. + + + + Using Docker + /docs/self-hosted/docker/ + Mon, 01 Jan 0001 00:00:00 +0000 + + /docs/self-hosted/docker/ + With Docker 1. Configure mcaptcha is highly configurable. +Configuration is applied/merged in the following order: +path to configuration file passed in via MCAPTCHA_CONFIG ./config/default.toml /etc/mcaptcha/config.toml environment variables. See CONFIGURATION.md for configurable options. +2. Run image If you have already have a Postgres instance running, then: +1docker run -p &lt;host-machine-port&gt;:&lt;port-in-configuration-file&gt; \ 2 --add-host=database:&lt;database-ip-addrss&gt; \ 3 -e RUST_LOG=debug \ 4 -e DATABASE_URL=&#34;postgres://&lt;db-user&gt;:&lt;db-password&gt;@database:&lt;db-port&gt;/&lt;db-name&gt;&#34; \ 5 mcaptcha/mcaptcha:latest If you don&rsquo;t have a Postgres instance running, you can either install one using a package manager or launch one with docker. + + + + Database and cache + /docs/self-hosted/dependencies/ + Mon, 01 Jan 0001 00:00:00 +0000 + + /docs/self-hosted/dependencies/ + Notes Database Database migrations are baked into the server binary so don&rsquo;t worry about them. +When compiling from source, unset database configuration(comment out database configuration/ unset relevant environment variables). mCaptcha uses sqlx database client library which checks SQL queries at compile time. So if you are starting with a fresh database without migrations applied, compilation will fail. +Redis Redis is an optional dependency. Currently, the non-Redis configuration doesn&rsquo;t persist CAPTCHA heat. + + + + diff --git a/docs/self-hosted/sitemap.xml b/docs/self-hosted/sitemap.xml new file mode 100644 index 0000000..f3bd2fe --- /dev/null +++ b/docs/self-hosted/sitemap.xml @@ -0,0 +1,31 @@ + + + + /docs/self-hosted/getting-started/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/self-hosted/bare-metal/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/self-hosted/docker/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/self-hosted/dependencies/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + \ No newline at end of file diff --git a/docs/sitemap.xml b/docs/sitemap.xml new file mode 100644 index 0000000..38efe25 --- /dev/null +++ b/docs/sitemap.xml @@ -0,0 +1,134 @@ + + + + /docs/terminology/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/help/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/introduction/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/api/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/self-hosted/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/terminology/access-token/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/terminology/cooldown-period/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/terminology/difficulty-factor/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/terminology/sitekey/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/terminology/visitor-threshold/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/help/troubleshooting/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/help/faq/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/introduction/installing-captcha/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/introduction/configuring-difficulty-factor/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/api/browser/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/api/mcaptcha-system/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/api/pow-sha256/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/self-hosted/getting-started/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/self-hosted/bare-metal/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/self-hosted/docker/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + /docs/self-hosted/dependencies/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + \ No newline at end of file diff --git a/docs/terminology/access-token/index.html b/docs/terminology/access-token/index.html new file mode 100644 index 0000000..420487b --- /dev/null +++ b/docs/terminology/access-token/index.html @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + Access token - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

Access token

+

+

When a visitor solves the CAPTCHA and sends their solution to an +mCaptcha instance, the solution will be verified for correctness. If the +solution is correct, mCaptcha will return a single use access token.

+

This access token should be attached to the visitor’s requited to the +protected service and the protected service should validity of the +access token with the mCaptcha instance and only allow access to +protected resource if the access token is valid.

+

Validate access token:

+
1curl --location --request POST 'https://mcaptcha.example.net/api/v1/pow/siteverify' \
+2  --header 'Content-Type: application/json' \
+3  --data-raw '{
+4    "token": "replace this with the access token presented by visitor",
+5    "key": "replace this with the sitekey associated with the CAPTCHA"
+6    "secret": "replace this with mCaptcha account secret, available in settings"
+7  }'
+
+

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/terminology/cooldown-period/index.html b/docs/terminology/cooldown-period/index.html new file mode 100644 index 0000000..11f2f1d --- /dev/null +++ b/docs/terminology/cooldown-period/index.html @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + Cooldown Period - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

Cooldown Period

+

+

mCaptcha implements leaky bucket algorithm to measure +current traffic levels. Cooldown period specifies the leak or the time +after which a visitor addition is decremented.

+

For instance, if initial traffic level is 0 and a user visits one +second later, the traffic level will be incremented to 1. Now, if the +cooldown period is set to 30 seconds, the traffic level will be +decremented after 30 seconds. So after 30 seconds, the traffic level will +go from 1 to 0.

+

Easy Mode: Default cooldown

+

When configuring mCaptcha in easy Mode, the default cooldown period is set to 30 seconds.

+ +

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/terminology/difficulty-factor/index.html b/docs/terminology/difficulty-factor/index.html new file mode 100644 index 0000000..8954283 --- /dev/null +++ b/docs/terminology/difficulty-factor/index.html @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + Difficulty Factor - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

Difficulty Factor

+

+

Difficulty factor determines the time it takes to solve a CAPTCHA. The +higher the difficulty factor, the longer it will take to generate a +proof of work for it to solve the CAPTCHA.

+

mCaptcha’s proof of work based mechanism makes it highly accessible to +people with special needs but it is important to choose the difficulty factor +with care as very high difficulty factors will make the CAPTCHA +inaccessible to users on slow devices.

+ +

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/terminology/index.html b/docs/terminology/index.html new file mode 100644 index 0000000..c74e433 --- /dev/null +++ b/docs/terminology/index.html @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + Terminology - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + diff --git a/docs/terminology/index.xml b/docs/terminology/index.xml new file mode 100644 index 0000000..75abb20 --- /dev/null +++ b/docs/terminology/index.xml @@ -0,0 +1,62 @@ + + + + Terminology on + /docs/terminology/ + Recent content in Terminology on + Hugo -- gohugo.io + en-US + Wed, 27 Jul 2022 08:48:45 +0000 + + Access token + /docs/terminology/access-token/ + Fri, 22 Jul 2022 00:00:00 +0000 + + /docs/terminology/access-token/ + When a visitor solves the CAPTCHA and sends their solution to an mCaptcha instance, the solution will be verified for correctness. If the solution is correct, mCaptcha will return a single use access token. +This access token should be attached to the visitor&rsquo;s requited to the protected service and the protected service should validity of the access token with the mCaptcha instance and only allow access to protected resource if the access token is valid. + + + + Cooldown Period + /docs/terminology/cooldown-period/ + Fri, 22 Jul 2022 00:00:00 +0000 + + /docs/terminology/cooldown-period/ + mCaptcha implements leaky bucket algorithm to measure current traffic levels. Cooldown period specifies the leak or the time after which a visitor addition is decremented. +For instance, if initial traffic level is 0 and a user visits one second later, the traffic level will be incremented to 1. Now, if the cooldown period is set to 30 seconds, the traffic level will be decremented after 30 seconds. So after 30 seconds, the traffic level will go from 1 to 0. + + + + Difficulty Factor + /docs/terminology/difficulty-factor/ + Fri, 22 Jul 2022 00:00:00 +0000 + + /docs/terminology/difficulty-factor/ + Difficulty factor determines the time it takes to solve a CAPTCHA. The higher the difficulty factor, the longer it will take to generate a proof of work for it to solve the CAPTCHA. +mCaptcha&rsquo;s proof of work based mechanism makes it highly accessible to people with special needs but it is important to choose the difficulty factor with care as very high difficulty factors will make the CAPTCHA inaccessible to users on slow devices. + + + + Site key + /docs/terminology/sitekey/ + Fri, 22 Jul 2022 00:00:00 +0000 + + /docs/terminology/sitekey/ + Site key is a unique identifier associated with CAPTCHA configurations created on mCaptcha. It is required to integrate a CAPTCHA with your website. +How to get site key? Go to &ldquo;Site keys&rdquo; on the side panel in the dashboard click on the clipboard button to copy the site key to your clipboard. + + + + Visitor Threshold + /docs/terminology/visitor-threshold/ + Fri, 22 Jul 2022 00:00:00 +0000 + + /docs/terminology/visitor-threshold/ + mCaptcha&rsquo;s variable difficulty factor mechanism requires a website&rsquo;s traffic statistics be split into levels, so that it can deploy the right difficulty factor for each level. +Visitor threshold is used to traffic into levels and mCaptcha accepts a difficulty configuration for each of these levels. When current traffic exceeds a difficulty factor, mCaptcha will increase the difficulty factor to the next configured level. +For instance, consider the configuration given below: + + + + diff --git a/docs/terminology/sitekey/copy-sitekey.png b/docs/terminology/sitekey/copy-sitekey.png new file mode 100644 index 0000000..4008dc9 Binary files /dev/null and b/docs/terminology/sitekey/copy-sitekey.png differ diff --git a/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_20x0_resize_box_2.png b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_20x0_resize_box_2.png new file mode 100644 index 0000000..cfeb165 Binary files /dev/null and b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_20x0_resize_box_2.png differ diff --git a/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_20x0_resize_box_3.png b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_20x0_resize_box_3.png new file mode 100644 index 0000000..cfeb165 Binary files /dev/null and b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_20x0_resize_box_3.png differ diff --git a/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_500x0_resize_box_2.png b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_500x0_resize_box_2.png new file mode 100644 index 0000000..58c745a Binary files /dev/null and b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_500x0_resize_box_2.png differ diff --git a/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_500x0_resize_box_3.png b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_500x0_resize_box_3.png new file mode 100644 index 0000000..58c745a Binary files /dev/null and b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_500x0_resize_box_3.png differ diff --git a/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_600x0_resize_box_2.png b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_600x0_resize_box_2.png new file mode 100644 index 0000000..aad5ed5 Binary files /dev/null and b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_600x0_resize_box_2.png differ diff --git a/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_600x0_resize_box_3.png b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_600x0_resize_box_3.png new file mode 100644 index 0000000..aad5ed5 Binary files /dev/null and b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_600x0_resize_box_3.png differ diff --git a/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_700x0_resize_box_2.png b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_700x0_resize_box_2.png new file mode 100644 index 0000000..80dfcc8 Binary files /dev/null and b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_700x0_resize_box_2.png differ diff --git a/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_700x0_resize_box_3.png b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_700x0_resize_box_3.png new file mode 100644 index 0000000..80dfcc8 Binary files /dev/null and b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_700x0_resize_box_3.png differ diff --git a/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_800x0_resize_box_2.png b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_800x0_resize_box_2.png new file mode 100644 index 0000000..26ec312 Binary files /dev/null and b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_800x0_resize_box_2.png differ diff --git a/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_800x0_resize_box_3.png b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_800x0_resize_box_3.png new file mode 100644 index 0000000..26ec312 Binary files /dev/null and b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_800x0_resize_box_3.png differ diff --git a/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_900x0_resize_box_2.png b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_900x0_resize_box_2.png new file mode 100644 index 0000000..3c0c0f4 Binary files /dev/null and b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_900x0_resize_box_2.png differ diff --git a/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_900x0_resize_box_3.png b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_900x0_resize_box_3.png new file mode 100644 index 0000000..3c0c0f4 Binary files /dev/null and b/docs/terminology/sitekey/copy-sitekey_huf38748cca91d238810283a1abb694c9a_63890_900x0_resize_box_3.png differ diff --git a/docs/terminology/sitekey/index.html b/docs/terminology/sitekey/index.html new file mode 100644 index 0000000..692f066 --- /dev/null +++ b/docs/terminology/sitekey/index.html @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + Site key - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

Site key

+

+

Site key is a unique identifier associated with CAPTCHA configurations +created on mCaptcha. It is required to integrate a CAPTCHA with your +website.

+

How to get site key?

+
    +
  1. Go to “Site keys” on the side panel in the dashboard
  2. +
+
+
+ Site key menu option on the dashboard, encircled in red. + +
+
+
    +
  1. click on the clipboard button to copy the site key to your +clipboard.
  2. +
+
+ Copy site key to clipboard. Clipboard button is highlighted in the photo + +
+ +

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel.png b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel.png new file mode 100644 index 0000000..4745c79 Binary files /dev/null and b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel.png differ diff --git a/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_20x0_resize_box_2.png b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_20x0_resize_box_2.png new file mode 100644 index 0000000..acdd729 Binary files /dev/null and b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_20x0_resize_box_2.png differ diff --git a/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_20x0_resize_box_3.png b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_20x0_resize_box_3.png new file mode 100644 index 0000000..acdd729 Binary files /dev/null and b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_20x0_resize_box_3.png differ diff --git a/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_500x0_resize_box_2.png b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_500x0_resize_box_2.png new file mode 100644 index 0000000..8a30d69 Binary files /dev/null and b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_500x0_resize_box_2.png differ diff --git a/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_500x0_resize_box_3.png b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_500x0_resize_box_3.png new file mode 100644 index 0000000..8a30d69 Binary files /dev/null and b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_500x0_resize_box_3.png differ diff --git a/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_600x0_resize_box_2.png b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_600x0_resize_box_2.png new file mode 100644 index 0000000..f09a767 Binary files /dev/null and b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_600x0_resize_box_2.png differ diff --git a/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_600x0_resize_box_3.png b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_600x0_resize_box_3.png new file mode 100644 index 0000000..f09a767 Binary files /dev/null and b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_600x0_resize_box_3.png differ diff --git a/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_700x0_resize_box_2.png b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_700x0_resize_box_2.png new file mode 100644 index 0000000..318d8b5 Binary files /dev/null and b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_700x0_resize_box_2.png differ diff --git a/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_700x0_resize_box_3.png b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_700x0_resize_box_3.png new file mode 100644 index 0000000..318d8b5 Binary files /dev/null and b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_700x0_resize_box_3.png differ diff --git a/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_800x0_resize_box_2.png b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_800x0_resize_box_2.png new file mode 100644 index 0000000..50eb32b Binary files /dev/null and b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_800x0_resize_box_2.png differ diff --git a/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_800x0_resize_box_3.png b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_800x0_resize_box_3.png new file mode 100644 index 0000000..50eb32b Binary files /dev/null and b/docs/terminology/sitekey/sitekey-in-dashboard-sidepanel_hu437e619e92d9fef838a97af482e11285_26958_800x0_resize_box_3.png differ diff --git a/docs/terminology/sitemap.xml b/docs/terminology/sitemap.xml new file mode 100644 index 0000000..bc7e079 --- /dev/null +++ b/docs/terminology/sitemap.xml @@ -0,0 +1,38 @@ + + + + /docs/terminology/access-token/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/terminology/cooldown-period/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/terminology/difficulty-factor/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/terminology/sitekey/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + + + /docs/terminology/visitor-threshold/ + 2023-02-13T18:00:02+05:30 + weekly + 0.5 + + \ No newline at end of file diff --git a/docs/terminology/visitor-threshold/index.html b/docs/terminology/visitor-threshold/index.html new file mode 100644 index 0000000..1100899 --- /dev/null +++ b/docs/terminology/visitor-threshold/index.html @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + Visitor Threshold - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ + +
+ +

Visitor Threshold

+

+

mCaptcha’s variable difficulty factor mechanism requires a website’s traffic +statistics be split into levels, so that it can deploy the right +difficulty factor for each level.

+

Visitor threshold is used to traffic into levels and mCaptcha accepts a +difficulty configuration for each of these levels. When current traffic +exceeds a difficulty factor, mCaptcha will increase the difficulty +factor to the next configured level.

+

For instance, consider the configuration given below:

+
    +
  • Cool down period: 30 seconds
  • +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LevelDifficulty FactorVisitor Threshold
15,0002,000
250,0005,000
3500,00010,000
45,000,00015,000
+

If the website sees 2,000 requests in a 30 second window, level 1 +difficulty factor(5,000) will be deployed. If the traffic increases to +5,000 requests in a 30 second window, then difficulty factor will be +upgraded to level 2(50,000). Likewise 10,000 and 15,000 requests over 30 +seconds will result in difficulty factor being upgraded to 500,000 and +5,000,000 respectively.

+

Visitor threshold is how mCaptcha determines which difficulty factor +level to deploy. mCaptcha uses leaky bucket algorithm to keep the +visitor threshold constantly updated within the configured cool down +period. So, at any given moment the, the current visitor level will be +the amount of traffic that was served in the cool down period specified.

+ +

Edit this page on GitHub

+ + + +
+
+ +
+
+ + + + + + + + + diff --git a/doks.png b/doks.png new file mode 100644 index 0000000..70d8c78 Binary files /dev/null and b/doks.png differ diff --git a/doks.svg b/doks.svg new file mode 100644 index 0000000..4631bc5 --- /dev/null +++ b/doks.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/donate/index.html b/donate/index.html new file mode 100644 index 0000000..73c543e --- /dev/null +++ b/donate/index.html @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + Donate - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+ +
+ +

Donate

+

Last Edited February 13, 2023

+

+

mCaptcha is a small operation that is self-funded. At the time of +writing, we are not backed by any venture capitals. If you like +mCaptcha, please consider donating. Your donations will go a long +way in supporting us.

+

Some of the payment options are anonymous. You can optionally send +me(@realaravinth) an email so that +I can thank you :)

+

XMR

+
85QAHsHqg4WfA6G7ycXc7U4LmrSLCQARv6H9p3AYjf8o8YP
+WH3ngC8Zi7bUYGUifdXb54Xuz41kcu2pqgGFuAYp3VSh5JsR
+
+ Monero address QR code + +
Monero address QR code
+
+

Liberapay

+ +

+ +

Edit this page on GitHub

+ +
+
+ +
+
+ + + + + + + + + diff --git a/donate/mcptcha-donations-monero-address-qr.png b/donate/mcptcha-donations-monero-address-qr.png new file mode 100644 index 0000000..f5c24d2 Binary files /dev/null and b/donate/mcptcha-donations-monero-address-qr.png differ diff --git a/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_20x0_resize_box_2.png b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_20x0_resize_box_2.png new file mode 100644 index 0000000..f18a048 Binary files /dev/null and b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_20x0_resize_box_2.png differ diff --git a/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_20x0_resize_box_3.png b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_20x0_resize_box_3.png new file mode 100644 index 0000000..f18a048 Binary files /dev/null and b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_20x0_resize_box_3.png differ diff --git a/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_500x0_resize_box_2.png b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_500x0_resize_box_2.png new file mode 100644 index 0000000..553386a Binary files /dev/null and b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_500x0_resize_box_2.png differ diff --git a/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_500x0_resize_box_3.png b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_500x0_resize_box_3.png new file mode 100644 index 0000000..553386a Binary files /dev/null and b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_500x0_resize_box_3.png differ diff --git a/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_600x0_resize_box_2.png b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_600x0_resize_box_2.png new file mode 100644 index 0000000..ec4a098 Binary files /dev/null and b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_600x0_resize_box_2.png differ diff --git a/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_600x0_resize_box_3.png b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_600x0_resize_box_3.png new file mode 100644 index 0000000..ec4a098 Binary files /dev/null and b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_600x0_resize_box_3.png differ diff --git a/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_700x0_resize_box_2.png b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_700x0_resize_box_2.png new file mode 100644 index 0000000..783c811 Binary files /dev/null and b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_700x0_resize_box_2.png differ diff --git a/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_700x0_resize_box_3.png b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_700x0_resize_box_3.png new file mode 100644 index 0000000..783c811 Binary files /dev/null and b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_700x0_resize_box_3.png differ diff --git a/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_800x0_resize_box_2.png b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_800x0_resize_box_2.png new file mode 100644 index 0000000..930485d Binary files /dev/null and b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_800x0_resize_box_2.png differ diff --git a/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_800x0_resize_box_3.png b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_800x0_resize_box_3.png new file mode 100644 index 0000000..930485d Binary files /dev/null and b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_800x0_resize_box_3.png differ diff --git a/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_900x0_resize_box_2.png b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_900x0_resize_box_2.png new file mode 100644 index 0000000..226e787 Binary files /dev/null and b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_900x0_resize_box_2.png differ diff --git a/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_900x0_resize_box_3.png b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_900x0_resize_box_3.png new file mode 100644 index 0000000..226e787 Binary files /dev/null and b/donate/mcptcha-donations-monero-address-qr_huda75cb0a97a0728b33b2d59d7a34dd33_7547_900x0_resize_box_3.png differ diff --git a/favicon-16x16.png b/favicon-16x16.png new file mode 100644 index 0000000..f5ca098 Binary files /dev/null and b/favicon-16x16.png differ diff --git a/favicon-32x32.png b/favicon-32x32.png new file mode 100644 index 0000000..fc58882 Binary files /dev/null and b/favicon-32x32.png differ diff --git a/favicon-96x96.png b/favicon-96x96.png new file mode 100644 index 0000000..032e2f1 Binary files /dev/null and b/favicon-96x96.png differ diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..d010270 Binary files /dev/null and b/favicon.ico differ diff --git a/fonts/vendor/.gitkeep b/fonts/vendor/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/fonts/vendor/jost/jost-v4-latin-500.woff b/fonts/vendor/jost/jost-v4-latin-500.woff new file mode 100644 index 0000000..eab8d1b Binary files /dev/null and b/fonts/vendor/jost/jost-v4-latin-500.woff differ diff --git a/fonts/vendor/jost/jost-v4-latin-500.woff2 b/fonts/vendor/jost/jost-v4-latin-500.woff2 new file mode 100644 index 0000000..92349d1 Binary files /dev/null and b/fonts/vendor/jost/jost-v4-latin-500.woff2 differ diff --git a/fonts/vendor/jost/jost-v4-latin-500italic.woff b/fonts/vendor/jost/jost-v4-latin-500italic.woff new file mode 100644 index 0000000..7a8ed95 Binary files /dev/null and b/fonts/vendor/jost/jost-v4-latin-500italic.woff differ diff --git a/fonts/vendor/jost/jost-v4-latin-500italic.woff2 b/fonts/vendor/jost/jost-v4-latin-500italic.woff2 new file mode 100644 index 0000000..c6b9d56 Binary files /dev/null and b/fonts/vendor/jost/jost-v4-latin-500italic.woff2 differ diff --git a/fonts/vendor/jost/jost-v4-latin-700.woff b/fonts/vendor/jost/jost-v4-latin-700.woff new file mode 100644 index 0000000..57390f5 Binary files /dev/null and b/fonts/vendor/jost/jost-v4-latin-700.woff differ diff --git a/fonts/vendor/jost/jost-v4-latin-700.woff2 b/fonts/vendor/jost/jost-v4-latin-700.woff2 new file mode 100644 index 0000000..584073a Binary files /dev/null and b/fonts/vendor/jost/jost-v4-latin-700.woff2 differ diff --git a/fonts/vendor/jost/jost-v4-latin-700italic.woff b/fonts/vendor/jost/jost-v4-latin-700italic.woff new file mode 100644 index 0000000..e23eedf Binary files /dev/null and b/fonts/vendor/jost/jost-v4-latin-700italic.woff differ diff --git a/fonts/vendor/jost/jost-v4-latin-700italic.woff2 b/fonts/vendor/jost/jost-v4-latin-700italic.woff2 new file mode 100644 index 0000000..e56d892 Binary files /dev/null and b/fonts/vendor/jost/jost-v4-latin-700italic.woff2 differ diff --git a/fonts/vendor/jost/jost-v4-latin-italic.woff b/fonts/vendor/jost/jost-v4-latin-italic.woff new file mode 100644 index 0000000..5dcd111 Binary files /dev/null and b/fonts/vendor/jost/jost-v4-latin-italic.woff differ diff --git a/fonts/vendor/jost/jost-v4-latin-italic.woff2 b/fonts/vendor/jost/jost-v4-latin-italic.woff2 new file mode 100644 index 0000000..9346c1d Binary files /dev/null and b/fonts/vendor/jost/jost-v4-latin-italic.woff2 differ diff --git a/fonts/vendor/jost/jost-v4-latin-regular.woff b/fonts/vendor/jost/jost-v4-latin-regular.woff new file mode 100644 index 0000000..4f24758 Binary files /dev/null and b/fonts/vendor/jost/jost-v4-latin-regular.woff differ diff --git a/fonts/vendor/jost/jost-v4-latin-regular.woff2 b/fonts/vendor/jost/jost-v4-latin-regular.woff2 new file mode 100644 index 0000000..7f0bf75 Binary files /dev/null and b/fonts/vendor/jost/jost-v4-latin-regular.woff2 differ diff --git a/icon-trans.png b/icon-trans.png new file mode 100644 index 0000000..ee799a1 Binary files /dev/null and b/icon-trans.png differ diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..ebf3f6a Binary files /dev/null and b/icon.png differ diff --git a/images/vendor/.gitkeep b/images/vendor/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/images/vendor/landing.jpg b/images/vendor/landing.jpg new file mode 100644 index 0000000..ac7f4cf Binary files /dev/null and b/images/vendor/landing.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..2878b73 --- /dev/null +++ b/index.html @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + mCaptcha - mCaptcha + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+
+

Defend Like Castles

+
+
+

mCaptcha is proof-of-work based captcha system that is privacy focused and fully automated.

+ Try mCaptcha +       + Get started +

Libre software GitHub

+
+
+
+ +
+
+ +
+
+
+
+

Privacy focused

+

Doesn't track, doesn't profile your users.

+
+
+

Robust and Accurate

+

Got users behind NATs? No issues. We don't use IP address for rate-liming. NAT or not you get the mCaptcha experience. +

+
+

Best-in-class UX

+

mCaptcha is silent, so silent that your users won't even feel it. No more annoying images, no more helping for Big Brothers with their ML stuff

+
+
+
+
+

Defend like castles

+

Our PoW-based solution defends fierily. mCaptcha makes attacking your site more expensive than what it will take for you to respond to the attacker's requests

+
+
+

Libre Software

+

Client libraries are licensed using proprietary-friendly free software licenses but the core is AGPL'd. We believe this is a tech that can change the way the web works so mCaptcha will always be free

+
+
+

xCaptcha drop-in replacement

+

Already using a captcha solution? No worries, our APIs are compatible with reCAPTCHA and hCaptcha!

+
+
+
+
+ + +
+
+
+
+
+ + + + + + + + diff --git a/index.min.9f6ca8d18a9feb4c8173940752baf80e8075b025ffbfcec12016beb0c2f8f794667102d45eb9accca8c374b0dd7a69af667e0f20813fb4fb086e6cda5230e2d8.js b/index.min.9f6ca8d18a9feb4c8173940752baf80e8075b025ffbfcec12016beb0c2f8f794667102d45eb9accca8c374b0dd7a69af667e0f20813fb4fb086e6cda5230e2d8.js new file mode 100644 index 0000000..5210573 --- /dev/null +++ b/index.min.9f6ca8d18a9feb4c8173940752baf80e8075b025ffbfcec12016beb0c2f8f794667102d45eb9accca8c374b0dd7a69af667e0f20813fb4fb086e6cda5230e2d8.js @@ -0,0 +1 @@ +var suggestions=document.getElementById('suggestions'),userinput=document.getElementById('userinput');document.addEventListener('keydown',inputFocus);function inputFocus(a){a.keyCode===191&&(a.preventDefault(),userinput.focus()),a.keyCode===27&&(userinput.blur(),suggestions.classList.add('d-none'))}document.addEventListener('click',function(a){var b=suggestions.contains(a.target);b||suggestions.classList.add('d-none')}),document.addEventListener('keydown',suggestionFocus);function suggestionFocus(b){const d=suggestions.querySelectorAll('a'),e=[...d],a=e.indexOf(document.activeElement);let c=0;b.keyCode===38?(b.preventDefault(),c=a>0?a-1:0,d[c].focus()):b.keyCode===40&&(b.preventDefault(),c=a+1