diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index debf50c..b41b1e1 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -32,6 +32,7 @@ jobs: run: | git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git checkout gh-pages git add docs git commit -am "Generated docs from github-actions[bot]" git push diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index 3c13d1b..0f95efc 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -1,4 +1,4 @@ -name: Rust +name: Rust Build Test on: push: diff --git a/.gitignore b/.gitignore index 2782907..00b9bc4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /target Cargo.lock index.html +docs diff --git a/docs/.lock b/docs/.lock deleted file mode 100755 index e69de29..0000000 diff --git a/docs/COPYRIGHT.txt b/docs/COPYRIGHT.txt deleted file mode 100644 index af77776..0000000 --- a/docs/COPYRIGHT.txt +++ /dev/null @@ -1,45 +0,0 @@ -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/docs/FiraSans-LICENSE.txt b/docs/FiraSans-LICENSE.txt deleted file mode 100644 index d444ea9..0000000 --- a/docs/FiraSans-LICENSE.txt +++ /dev/null @@ -1,94 +0,0 @@ -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/docs/FiraSans-Medium.woff b/docs/FiraSans-Medium.woff deleted file mode 100644 index 7d742c5..0000000 Binary files a/docs/FiraSans-Medium.woff and /dev/null differ diff --git a/docs/FiraSans-Regular.woff b/docs/FiraSans-Regular.woff deleted file mode 100644 index d8e0363..0000000 Binary files a/docs/FiraSans-Regular.woff and /dev/null differ diff --git a/docs/LICENSE-APACHE.txt b/docs/LICENSE-APACHE.txt deleted file mode 100644 index 16fe87b..0000000 --- a/docs/LICENSE-APACHE.txt +++ /dev/null @@ -1,201 +0,0 @@ - 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/docs/LICENSE-MIT.txt b/docs/LICENSE-MIT.txt deleted file mode 100644 index 31aa793..0000000 --- a/docs/LICENSE-MIT.txt +++ /dev/null @@ -1,23 +0,0 @@ -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/docs/SourceCodePro-LICENSE.txt b/docs/SourceCodePro-LICENSE.txt deleted file mode 100644 index 0754257..0000000 --- a/docs/SourceCodePro-LICENSE.txt +++ /dev/null @@ -1,93 +0,0 @@ -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/docs/SourceCodePro-Regular.woff b/docs/SourceCodePro-Regular.woff deleted file mode 100644 index 5576670..0000000 Binary files a/docs/SourceCodePro-Regular.woff and /dev/null differ diff --git a/docs/SourceCodePro-Semibold.woff b/docs/SourceCodePro-Semibold.woff deleted file mode 100644 index ca972a1..0000000 Binary files a/docs/SourceCodePro-Semibold.woff and /dev/null differ diff --git a/docs/SourceSerifPro-Bold.ttf.woff b/docs/SourceSerifPro-Bold.ttf.woff deleted file mode 100644 index ca25431..0000000 Binary files a/docs/SourceSerifPro-Bold.ttf.woff and /dev/null differ diff --git a/docs/SourceSerifPro-It.ttf.woff b/docs/SourceSerifPro-It.ttf.woff deleted file mode 100644 index a287bbe..0000000 Binary files a/docs/SourceSerifPro-It.ttf.woff and /dev/null differ diff --git a/docs/SourceSerifPro-LICENSE.md b/docs/SourceSerifPro-LICENSE.md deleted file mode 100644 index 22cb755..0000000 --- a/docs/SourceSerifPro-LICENSE.md +++ /dev/null @@ -1,93 +0,0 @@ -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/docs/SourceSerifPro-Regular.ttf.woff b/docs/SourceSerifPro-Regular.ttf.woff deleted file mode 100644 index a3d55cf..0000000 Binary files a/docs/SourceSerifPro-Regular.ttf.woff and /dev/null differ diff --git a/docs/ayu.css b/docs/ayu.css deleted file mode 100644 index 096f6f3..0000000 --- a/docs/ayu.css +++ /dev/null @@ -1 +0,0 @@ - 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/docs/brush.svg b/docs/brush.svg deleted file mode 100644 index ea266e8..0000000 --- a/docs/brush.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/dark.css b/docs/dark.css deleted file mode 100644 index 57e76d0..0000000 --- a/docs/dark.css +++ /dev/null @@ -1 +0,0 @@ -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/docs/down-arrow.svg b/docs/down-arrow.svg deleted file mode 100644 index 35437e7..0000000 --- a/docs/down-arrow.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/favicon-16x16.png b/docs/favicon-16x16.png deleted file mode 100644 index 7cfe6c1..0000000 Binary files a/docs/favicon-16x16.png and /dev/null differ diff --git a/docs/favicon-32x32.png b/docs/favicon-32x32.png deleted file mode 100644 index 5109c1d..0000000 Binary files a/docs/favicon-32x32.png and /dev/null differ diff --git a/docs/favicon.svg b/docs/favicon.svg deleted file mode 100644 index 8b34b51..0000000 --- a/docs/favicon.svg +++ /dev/null @@ -1,24 +0,0 @@ - diff --git a/docs/implementors/core/clone/trait.Clone.js b/docs/implementors/core/clone/trait.Clone.js deleted file mode 100644 index 92fc98c..0000000 --- a/docs/implementors/core/clone/trait.Clone.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ntext"] = [{"text":"impl<'format> Clone for Formatting<'format>","synthetic":false,"types":["ntext::formatting::Formatting"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/implementors/core/marker/trait.Copy.js b/docs/implementors/core/marker/trait.Copy.js deleted file mode 100644 index f9da8c0..0000000 --- a/docs/implementors/core/marker/trait.Copy.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ntext"] = [{"text":"impl<'format> Copy for Formatting<'format>","synthetic":false,"types":["ntext::formatting::Formatting"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/implementors/core/marker/trait.Freeze.js b/docs/implementors/core/marker/trait.Freeze.js deleted file mode 100644 index 45745cf..0000000 --- a/docs/implementors/core/marker/trait.Freeze.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ntext"] = [{"text":"impl<'format> Freeze for Formatting<'format>","synthetic":true,"types":["ntext::formatting::Formatting"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/implementors/core/marker/trait.Send.js b/docs/implementors/core/marker/trait.Send.js deleted file mode 100644 index 0e38083..0000000 --- a/docs/implementors/core/marker/trait.Send.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ntext"] = [{"text":"impl<'format> Send for Formatting<'format>","synthetic":true,"types":["ntext::formatting::Formatting"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/implementors/core/marker/trait.Sync.js b/docs/implementors/core/marker/trait.Sync.js deleted file mode 100644 index d382f67..0000000 --- a/docs/implementors/core/marker/trait.Sync.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ntext"] = [{"text":"impl<'format> Sync for Formatting<'format>","synthetic":true,"types":["ntext::formatting::Formatting"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/implementors/core/marker/trait.Unpin.js b/docs/implementors/core/marker/trait.Unpin.js deleted file mode 100644 index 6b51210..0000000 --- a/docs/implementors/core/marker/trait.Unpin.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ntext"] = [{"text":"impl<'format> Unpin for Formatting<'format>","synthetic":true,"types":["ntext::formatting::Formatting"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/implementors/std/panic/trait.RefUnwindSafe.js b/docs/implementors/std/panic/trait.RefUnwindSafe.js deleted file mode 100644 index 35c2569..0000000 --- a/docs/implementors/std/panic/trait.RefUnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ntext"] = [{"text":"impl<'format> RefUnwindSafe for Formatting<'format>","synthetic":true,"types":["ntext::formatting::Formatting"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/implementors/std/panic/trait.UnwindSafe.js b/docs/implementors/std/panic/trait.UnwindSafe.js deleted file mode 100644 index 5e55d22..0000000 --- a/docs/implementors/std/panic/trait.UnwindSafe.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["ntext"] = [{"text":"impl<'format> UnwindSafe for Formatting<'format>","synthetic":true,"types":["ntext::formatting::Formatting"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index dfed9bc..0000000 --- a/docs/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - -
-Redirecting to documentation
- - diff --git a/docs/light.css b/docs/light.css deleted file mode 100644 index fa73fe2..0000000 --- a/docs/light.css +++ /dev/null @@ -1 +0,0 @@ - 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/docs/main.js b/docs/main.js deleted file mode 100644 index 69dd530..0000000 --- a/docs/main.js +++ /dev/null @@ -1,8 +0,0 @@ -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;if(browserSupportsHistoryApi()){history.replaceState("",window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}}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(to| "+""+(item.is_alias===true?(""+item.alias+" - see "):"")+item.displayPath+""+name+" | "+""+""+item.desc+" |
"+code.outerHTML+" |
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(function(x){return""+x+"
"}).join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="pub fn digit_to_text(digit: u8, capitalize: bool) -> Option<String>
Convert digit to words in a string.
-pub fn to_text(number: u32) -> String
Convert u32 to words in a string.
-pub fn to_text_fmt(number: usize, fmt: &Formatting<'_>) -> String
Convert usize to words in a string seperated by a seperator.
-pub fn to_text_no_seperator(number: u32) -> String
Convert u32 to words in a string.
-pub fn to_text_with_seperator(number: u32, seperator: &str) -> String
Convert u32 to words in a string seperated by a seperator.
-Redirecting to ../../ntext/struct.Formatting.html...
- - - \ No newline at end of file diff --git a/docs/ntext/index.html b/docs/ntext/index.html deleted file mode 100644 index 02a578e..0000000 --- a/docs/ntext/index.html +++ /dev/null @@ -1,32 +0,0 @@ -Example program with default formatting
- --extern crate ntext; -use ntext::to_text; -fn main() { - assert_eq!(to_text!(7123),"Seven Thousand,One Hundred,Twenty-Three"); - assert_eq!(to_text!(1000),"One Thousand"); -}
Example program with custom formatting
- --extern crate ntext; -use ntext::{Formatting,to_text}; -fn main() { - assert_eq!(to_text!(1000, &Formatting::none().capitalize()),"OneThousand"); - assert_eq!(to_text!(34123, &Formatting::with_seperator("#").capitalize()),"Thirty#Four#Thousand#One#Hundred#Twenty#Three"); -}
This macro will also return an empty string on input zero -You can also create the Formatting struct manually
-| to_text | Macro which supports both seperator and without it - |
| Formatting | Set the formatting of the output - |
| digit_to_text | Convert digit to words in a string. - |
| to_text_fmt | Convert usize to words in a string seperated by a seperator. - |
Redirecting to macro.to_text.html...
- - - \ No newline at end of file diff --git a/docs/ntext/macro.to_text.html b/docs/ntext/macro.to_text.html deleted file mode 100644 index 863ff00..0000000 --- a/docs/ntext/macro.to_text.html +++ /dev/null @@ -1,11 +0,0 @@ -Macro which supports both seperator and without it
-Redirecting to ../../ntext/fn.to_text_no_seperator.html...
- - - \ No newline at end of file diff --git a/docs/ntext/numtext/fn.digit_to_text.html b/docs/ntext/numtext/fn.digit_to_text.html deleted file mode 100644 index 606711e..0000000 --- a/docs/ntext/numtext/fn.digit_to_text.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - -Redirecting to ../../ntext/fn.digit_to_text.html...
- - - \ No newline at end of file diff --git a/docs/ntext/numtext/fn.to_text_fmt.html b/docs/ntext/numtext/fn.to_text_fmt.html deleted file mode 100644 index 893f492..0000000 --- a/docs/ntext/numtext/fn.to_text_fmt.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - -Redirecting to ../../ntext/fn.to_text_fmt.html...
- - - \ No newline at end of file diff --git a/docs/ntext/seperator/fn.to_text_with_seperator.html b/docs/ntext/seperator/fn.to_text_with_seperator.html deleted file mode 100644 index b3d2e95..0000000 --- a/docs/ntext/seperator/fn.to_text_with_seperator.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - -Redirecting to ../../ntext/fn.to_text_with_seperator.html...
- - - \ No newline at end of file diff --git a/docs/ntext/sidebar-items.js b/docs/ntext/sidebar-items.js deleted file mode 100644 index 5b424aa..0000000 --- a/docs/ntext/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -initSidebarItems({"fn":[["digit_to_text","Convert digit to words in a string."],["to_text_fmt","Convert usize to words in a string seperated by a seperator."]],"macro":[["to_text","Macro which supports both seperator and without it"]],"struct":[["Formatting","Set the formatting of the output "]]}); \ No newline at end of file diff --git a/docs/ntext/struct.Formatting.html b/docs/ntext/struct.Formatting.html deleted file mode 100644 index 52f53c3..0000000 --- a/docs/ntext/struct.Formatting.html +++ /dev/null @@ -1,36 +0,0 @@ -Set the formatting of the output
-capitalize: boolcapitalize the start of the word.
-digit_seperator: Option<&'format str>Set the seperator in between digits like “threehundred,twentytwo”.
-place_seperator: Option<&'format str>Set the seperator in between words like “three/hundred”.
-tens_seperator: Option<&'format str>Set the seperator between tens place digits like “twenty-two”.
-impl<'format> Formatting<'format>[src]pub fn default() -> Self[src]Get the default formatting.
-pub fn none() -> Self[src]No formatting at all
-pub fn with_seperator(seperator: &'format str) -> Self[src]With same formatting for all
-pub fn capitalize(&mut self) -> Self[src]Capitalize the formatting
-pub fn decapitalize(&mut self) -> Self[src]Lower case the formatting struct
-impl<'format> Clone for Formatting<'format>[src]fn clone(&self) -> Formatting<'format>[src]pub fn clone_from(&mut self, source: &Self)1.0.0[src]impl<'format> Copy for Formatting<'format>[src]impl<'format> RefUnwindSafe for Formatting<'format>impl<'format> Send for Formatting<'format>impl<'format> Sync for Formatting<'format>impl<'format> Unpin for Formatting<'format>impl<'format> UnwindSafe for Formatting<'format>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]pub fn borrow_mut(&mut self) -> &mut T[src]impl<T> From<T> for T[src]impl<T, U> Into<U> for T where
U: From<T>, [src]impl<T> ToOwned for T where
T: Clone, [src]type Owned = TThe resulting type after obtaining ownership.
-pub fn to_owned(&self) -> T[src]pub fn clone_into(&self, target: &mut T)[src]impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]type Error = InfallibleThe type returned in the event of a conversion error.
-pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]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 -
-/// Set the formatting of the output -#[derive(Clone, Copy)] -pub struct Formatting<'format> { - /// capitalize the start of the word. - pub capitalize: bool, - /// Set the seperator in between digits like "threehundred,twentytwo". - pub digit_seperator: Option<&'format str>, - /// Set the seperator in between words like "three/hundred". - pub place_seperator: Option<&'format str>, - /// Set the seperator between tens place digits like "twenty-two". - pub tens_seperator: Option<&'format str>, -} - -impl<'format> Formatting<'format> { - /// Get the default formatting. - pub fn default() -> Self { - Self { - capitalize: true, - digit_seperator: Some(","), - place_seperator: Some(" "), - tens_seperator: Some("-"), - } - } - /// No formatting at all - pub fn none() -> Self { - Self { - capitalize: false, - digit_seperator: None, - place_seperator: None, - tens_seperator: None, - } - } - /// With same formatting for all - pub fn with_seperator(seperator: &'format str) -> Self { - Self { - capitalize: false, - digit_seperator: Some(seperator), - place_seperator: Some(seperator), - tens_seperator: Some(seperator), - } - } - /// Capitalize the formatting - pub fn capitalize(&mut self) -> Self { - self.capitalize = true; - Self { - capitalize: self.capitalize, - digit_seperator: self.digit_seperator, - place_seperator: self.place_seperator, - tens_seperator: self.tens_seperator, - } - } - /// Lower case the formatting struct - pub fn decapitalize(&mut self) -> Self { - self.capitalize = false; - Self { - capitalize: self.capitalize, - digit_seperator: self.digit_seperator, - place_seperator: self.place_seperator, - tens_seperator: self.tens_seperator, - } - } -} -
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 -
-//! Example program with default formatting -//!```rust -//!extern crate ntext; -//!use ntext::to_text; -//!fn main() { -//! assert_eq!(to_text!(7123),"Seven Thousand,One Hundred,Twenty-Three"); -//! assert_eq!(to_text!(1000),"One Thousand"); -//!} -//!``` -//! Example program with custom formatting -//! -//!```rust -//!extern crate ntext; -//!use ntext::{Formatting,to_text}; -//!fn main() { -//! assert_eq!(to_text!(1000, &Formatting::none().capitalize()),"OneThousand"); -//! assert_eq!(to_text!(34123, &Formatting::with_seperator("#").capitalize()),"Thirty#Four#Thousand#One#Hundred#Twenty#Three"); -//!} -//!``` -//! This macro will also return an empty string on input zero -//! You can also create the Formatting struct manually - -mod formatting; -mod numtext; -mod test; - -pub use formatting::Formatting; -pub use numtext::{digit_to_text, to_text_fmt}; - -/// Macro which supports both seperator and without it -#[macro_export] -macro_rules! to_text { - ($number:expr) => { - ntext::to_text_fmt($number, &ntext::Formatting::default()); - }; - ($number:expr, $formatting:expr) => { - ntext::to_text_fmt($number, $formatting); - }; -} -
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 -
-use crate::{digit_to_text, place_value}; -fn tens_place(tens: u8, ones: u8) -> Option<String> { - match tens { - 0 => digit_to_text(ones), - 1 => match ones { - 0 => Some("ten".to_string()), - 1 => Some("eleven".to_string()), - 2 => Some("twelve".to_string()), - 3 => Some("thirteen".to_string()), - 4 => Some("fourteen".to_string()), - 5 => Some("fifteen".to_string()), - 6 => Some("sixteen".to_string()), - 7 => Some("seventeen".to_string()), - 8 => Some("eighteen".to_string()), - 9 => Some("nineteen".to_string()), - _ => None, - }, - d @ 2..=5 | d @ 8 => Some({ - let mut buffer = String::new(); - match d { - 2 => buffer.push_str("twenty"), - 3 => buffer.push_str("thirty"), - 4 => buffer.push_str("forty"), - 5 => buffer.push_str("fifty"), - 8 => buffer.push_str("eighty"), - _ => (), - } - buffer.push_str(digit_to_text(ones).unwrap().as_str()); - buffer - }), - d @ 6..=9 => Some({ - let mut string = digit_to_text(d).unwrap() + "ty"; - string.push_str(digit_to_text(ones).unwrap().as_str()); - string - }), - _ => None, - } -} - -/// Convert u32 to words in a string. -pub fn to_text_no_seperator(number: u32) -> String { - let mut numtext: String = String::new(); - let mut last: Option<u8> = None; - let tens_place_holders: [u8; 2] = [2, 5]; - let digits: Vec<u8> = number - .to_string() - .chars() - .map(|d| d.to_digit(10).unwrap() as u8) - .collect(); - - let mut place: u8 = digits.len() as u8; - - for (_index, digit) in digits.iter().enumerate() { - if tens_place_holders.contains(&place) { - last = Some(*digit); - place -= 1; - continue; - } - if let Some(last_digit) = last { - numtext.push_str(tens_place(last_digit, *digit).unwrap().as_str()); - if place > 2 { - numtext.push_str(place_value(0, place, None).unwrap().as_str()); - } - last = None; - } else if *digit != 0 { - numtext.push_str(place_value(*digit, place, None).unwrap().as_str()) - } - place -= 1; - } - numtext -} -
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 -
-use crate::Formatting; - -/// Convert digit to words in a string. -pub fn digit_to_text(digit: u8, capitalize: bool) -> Option<String> { - if capitalize { - match digit { - 0 => Some("".to_string()), - 1 => Some("One".to_string()), - 2 => Some("Two".to_string()), - 3 => Some("Three".to_string()), - 4 => Some("Four".to_string()), - 5 => Some("Five".to_string()), - 6 => Some("Six".to_string()), - 7 => Some("Seven".to_string()), - 8 => Some("Eight".to_string()), - 9 => Some("Nine".to_string()), - _ => None, - } - } else { - match digit { - 0 => Some("".to_string()), - 1 => Some("one".to_string()), - 2 => Some("two".to_string()), - 3 => Some("three".to_string()), - 4 => Some("four".to_string()), - 5 => Some("five".to_string()), - 6 => Some("six".to_string()), - 7 => Some("seven".to_string()), - 8 => Some("eight".to_string()), - 9 => Some("nine".to_string()), - _ => None, - } - } -} -fn place_value(number: u8, place: u8, fmt: &Formatting) -> Option<String> { - let mut buffer = digit_to_text(number, fmt.capitalize).unwrap(); - if let Some(sep) = fmt.place_seperator { - if number != 0 && place != 1 { - buffer.push_str(sep) - } - } - if fmt.capitalize { - match place { - 1 => (), //Can happen but should return the same digit - 2 => (), //This should never happen as 2 is included in the tens_place_holders - 3 => buffer.push_str("Hundred"), - 4 => buffer.push_str("Thousand"), - 5 => (), // Souldn't happen - 6 => buffer.push_str("Million"), - _ => (), - }; - } else { - match place { - 1 => (), //Can happen but should return the same digit - 2 => (), //This should never happen as 2 is included in the tens_place_holders - 3 => buffer.push_str("hundred"), - 4 => buffer.push_str("thousand"), - 5 => (), // Souldn't happen - 6 => buffer.push_str("million"), - _ => (), - } - } - Some(buffer) -} -fn tens_place(tens: u8, ones: u8, fmt: &Formatting) -> Option<String> { - match tens { - 0 => digit_to_text(ones, fmt.capitalize), - 1 => { - if fmt.capitalize { - match ones { - 0 => Some("Ten".to_string()), - 1 => Some("Eleven".to_string()), - 2 => Some("Twelve".to_string()), - 3 => Some("Thirteen".to_string()), - 4 => Some("Fourteen".to_string()), - 5 => Some("Fifteen".to_string()), - 6 => Some("Sixteen".to_string()), - 7 => Some("Seventeen".to_string()), - 8 => Some("Eighteen".to_string()), - 9 => Some("Nineteen".to_string()), - _ => None, - } - } else { - match ones { - 0 => Some("ten".to_string()), - 1 => Some("eleven".to_string()), - 2 => Some("twelve".to_string()), - 3 => Some("thirteen".to_string()), - 4 => Some("fourteen".to_string()), - 5 => Some("fifteen".to_string()), - 6 => Some("sixteen".to_string()), - 7 => Some("seventeen".to_string()), - 8 => Some("eighteen".to_string()), - 9 => Some("nineteen".to_string()), - _ => None, - } - } - } - d @ 2..=5 | d @ 8 => Some({ - let mut buffer = String::new(); - if fmt.capitalize { - match d { - 2 => buffer.push_str("Twenty"), - 3 => buffer.push_str("Thirty"), - 4 => buffer.push_str("Forty"), - 5 => buffer.push_str("Fifty"), - 8 => buffer.push_str("Eighty"), - _ => (), - } - } else { - match d { - 2 => buffer.push_str("twenty"), - 3 => buffer.push_str("thirty"), - 4 => buffer.push_str("forty"), - 5 => buffer.push_str("fifty"), - 8 => buffer.push_str("eighty"), - _ => (), - } - } - if let Some(sep) = fmt.tens_seperator { - buffer.push_str(sep); - } - buffer.push_str(digit_to_text(ones, fmt.capitalize).unwrap().as_str()); - buffer - }), - d @ 6..=9 => Some({ - let mut buffer = digit_to_text(d, fmt.capitalize).unwrap() + "ty"; - if let Some(sep) = fmt.tens_seperator { - buffer.push_str(sep); - } - buffer.push_str(digit_to_text(ones, fmt.capitalize).unwrap().as_str()); - buffer - }), - _ => None, - } -} - -/// Convert usize to words in a string seperated by a seperator. -pub fn to_text_fmt(number: usize, fmt: &Formatting) -> String { - let mut numtext: String = String::new(); - let mut last: Option<u8> = None; - let tens_place_holders: [u8; 3] = [2, 5, 7]; - let digits: Vec<u8> = number - .to_string() - .chars() - .map(|d| d.to_digit(10).unwrap() as u8) - .collect(); - - let mut place: u8 = digits.len() as u8; - - for (_index, digit) in digits.iter().enumerate() { - if tens_place_holders.contains(&place) { - last = Some(*digit); - place -= 1; - continue; - } - if *digit != 0 && place != digits.len() as u8 && numtext != "" { - if let Some(sep) = fmt.digit_seperator { - numtext.push_str(sep); - } - } - if let Some(last_digit) = last { - numtext.push_str(tens_place(last_digit, *digit, fmt).unwrap().as_str()); - if place > 2 { - if let Some(sep) = fmt.place_seperator { - numtext.push_str(sep); - } - numtext.push_str(place_value(0, place, fmt).unwrap().as_str()); - } - last = None; - } else if *digit != 0 { - numtext.push_str(place_value(*digit, place, fmt).unwrap().as_str()); - } - place -= 1; - } - numtext -} -
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 -
-use crate::{digit_to_text, place_value}; - -fn tens_place(tens: u8, ones: u8, seperator: &str) -> Option<String> { - match tens { - 0 => digit_to_text(ones), - 1 => match ones { - 0 => Some("ten".to_string()), - 1 => Some("eleven".to_string()), - 2 => Some("twelve".to_string()), - 3 => Some("thirteen".to_string()), - 4 => Some("fourteen".to_string()), - 5 => Some("fifteen".to_string()), - 6 => Some("sixteen".to_string()), - 7 => Some("seventeen".to_string()), - 8 => Some("eighteen".to_string()), - 9 => Some("nineteen".to_string()), - _ => None, - }, - d @ 2..=5 | d @ 8 => Some({ - let mut buffer = String::new(); - match d { - 2 => buffer.push_str("twenty"), - 3 => buffer.push_str("thirty"), - 4 => buffer.push_str("forty"), - 5 => buffer.push_str("fifty"), - 8 => buffer.push_str("eighty"), - _ => (), - } - buffer.push_str(seperator); - buffer.push_str(digit_to_text(ones).unwrap().as_str()); - buffer - }), - d @ 6..=9 => Some({ - let mut buffer = digit_to_text(d).unwrap() + "ty"; - buffer.push_str(seperator); - buffer.push_str(digit_to_text(ones).unwrap().as_str()); - buffer - }), - _ => None, - } -} - -/// Convert u32 to words in a string seperated by a seperator. -pub fn to_text_with_seperator(number: u32, seperator: &str) -> String { - let mut numtext: String = String::new(); - let mut last: Option<u8> = None; - let tens_place_holders: [u8; 2] = [2, 5]; - let digits: Vec<u8> = number - .to_string() - .chars() - .map(|d| d.to_digit(10).unwrap() as u8) - .collect(); - - let mut place: u8 = digits.len() as u8; - - for (_index, digit) in digits.iter().enumerate() { - if tens_place_holders.contains(&place) { - last = Some(*digit); - place -= 1; - continue; - } - if *digit != 0 && place != digits.len() as u8 && numtext != "" { - numtext.push_str(seperator); - } - if let Some(last_digit) = last { - numtext.push_str( - tens_place_seperator(last_digit, *digit, seperator) - .unwrap() - .as_str(), - ); - if place > 2 { - numtext.push_str(seperator); - numtext.push_str(place_value(0, place, Some(seperator)).unwrap().as_str()); - } - last = None; - } else if *digit != 0 { - numtext.push_str( - place_value(*digit, place, Some(seperator)) - .unwrap() - .as_str(), - ); - } - place -= 1; - } - numtext -} -
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 -
-#[cfg(test)] -mod tests { - #[test] - fn digits() { - use crate::digit_to_text; - assert_eq!(digit_to_text(9, false).unwrap(), "nine"); - assert_eq!(digit_to_text(3, false).unwrap(), "three"); - assert_eq!(digit_to_text(7, false).unwrap(), "seven"); - assert_eq!(digit_to_text(5, false).unwrap(), "five"); - assert_eq!(digit_to_text(5, true).unwrap(), "Five"); - } - #[test] - fn numbers() { - use crate::to_text_fmt as to_text; - use crate::Formatting; - let fmt = &Formatting::none(); - assert_eq!(to_text(1, fmt), "one"); - assert_eq!(to_text(10, fmt), "ten"); - assert_eq!(to_text(100, fmt), "onehundred"); - assert_eq!(to_text(1000, fmt), "onethousand"); - assert_eq!(to_text(12345, fmt), "twelvethousandthreehundredfortyfive"); - assert_eq!( - to_text(81123, fmt), - "eightyonethousandonehundredtwentythree" - ); - assert_eq!(to_text(12, fmt), "twelve"); - } - #[test] - fn numbers_formatting() { - use crate::to_text_fmt as to_text; - use crate::Formatting; - let fmt = &Formatting::default(); - assert_eq!(to_text(1, fmt), "One"); - assert_eq!(to_text(10, fmt), "Ten"); - assert_eq!(to_text(100, fmt), "One Hundred"); - assert_eq!(to_text(1000, fmt), "One Thousand"); - assert_eq!(to_text(12315, fmt), "Twelve Thousand,Three Hundred,Fifteen"); - assert_eq!( - to_text(1235245, fmt), - "Twelve Million,Thirty-Five Thousand,Two Hundred,Forty-Five" - ); - } -} -