diff --git a/doc/.lock b/doc/.lock new file mode 100755 index 00000000..e69de29b diff --git a/doc/COPYRIGHT.txt b/doc/COPYRIGHT.txt new file mode 100644 index 00000000..8773ce6b --- /dev/null +++ b/doc/COPYRIGHT.txt @@ -0,0 +1,64 @@ +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. + +* Heuristica (Heuristica-Italic.woff): + + Copyright 1989, 1991 Adobe Systems Incorporated. All rights reserved. + Utopia is either a registered trademark or trademark of Adobe Systems + Incorporated in the United States and/or other countries. Used under + license. + + Copyright 2006 Han The Thanh, Vntopia font family, http://vntex.sf.net + + Copyright (c) 2008-2012, Andrey V. Panov (panov@canopus.iacp.dvo.ru), + with Reserved Font Name Heuristica. + + Licensed under the SIL Open Font License, Version 1.1. + See Heuristica-LICENSE.txt. + +* jQuery (jquery-2.1.4.min.js): + + Copyright 2005, 2015 jQuery Foundation, Inc. + Licensed under the MIT license (see LICENSE-MIT.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.woff, SourceSerifPro-Bold.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/doc/FiraSans-LICENSE.txt b/doc/FiraSans-LICENSE.txt new file mode 100644 index 00000000..b4a39671 --- /dev/null +++ b/doc/FiraSans-LICENSE.txt @@ -0,0 +1,99 @@ +Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ +with Reserved Font Name Fira Sans. + +Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ +with Reserved Font Name Fira Mono. + +Copyright (c) 2014, Telefonica S.A. + +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/doc/FiraSans-Medium.woff b/doc/FiraSans-Medium.woff new file mode 100644 index 00000000..56272277 Binary files /dev/null and b/doc/FiraSans-Medium.woff differ diff --git a/doc/FiraSans-Regular.woff b/doc/FiraSans-Regular.woff new file mode 100644 index 00000000..9ff40445 Binary files /dev/null and b/doc/FiraSans-Regular.woff differ diff --git a/doc/Heuristica-Italic.woff b/doc/Heuristica-Italic.woff new file mode 100644 index 00000000..b0cebf01 Binary files /dev/null and b/doc/Heuristica-Italic.woff differ diff --git a/doc/Heuristica-LICENSE.txt b/doc/Heuristica-LICENSE.txt new file mode 100644 index 00000000..dd85e40e --- /dev/null +++ b/doc/Heuristica-LICENSE.txt @@ -0,0 +1,101 @@ +Copyright 1989, 1991 Adobe Systems Incorporated. All rights reserved. +Utopia is either a registered trademark or trademark of Adobe Systems +Incorporated in the United States and/or other countries. Used under +license. + +Copyright 2006 Han The Thanh, Vntopia font family, http://vntex.sf.net + +Copyright (c) 2008-2012, Andrey V. Panov (panov@canopus.iacp.dvo.ru), +with Reserved Font Name Heuristica. + +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/doc/LICENSE-APACHE.txt b/doc/LICENSE-APACHE.txt new file mode 100644 index 00000000..16fe87b0 --- /dev/null +++ b/doc/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/doc/LICENSE-MIT.txt b/doc/LICENSE-MIT.txt new file mode 100644 index 00000000..31aa7938 --- /dev/null +++ b/doc/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/doc/SourceCodePro-LICENSE.txt b/doc/SourceCodePro-LICENSE.txt new file mode 100644 index 00000000..07542572 --- /dev/null +++ b/doc/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/doc/SourceCodePro-Regular.woff b/doc/SourceCodePro-Regular.woff new file mode 100644 index 00000000..55766709 Binary files /dev/null and b/doc/SourceCodePro-Regular.woff differ diff --git a/doc/SourceCodePro-Semibold.woff b/doc/SourceCodePro-Semibold.woff new file mode 100644 index 00000000..ca972a11 Binary files /dev/null and b/doc/SourceCodePro-Semibold.woff differ diff --git a/doc/SourceSerifPro-Bold.woff b/doc/SourceSerifPro-Bold.woff new file mode 100644 index 00000000..ac1b1b3a Binary files /dev/null and b/doc/SourceSerifPro-Bold.woff differ diff --git a/doc/SourceSerifPro-LICENSE.txt b/doc/SourceSerifPro-LICENSE.txt new file mode 100644 index 00000000..b77d653a --- /dev/null +++ b/doc/SourceSerifPro-LICENSE.txt @@ -0,0 +1,93 @@ +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. + +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/doc/SourceSerifPro-Regular.woff b/doc/SourceSerifPro-Regular.woff new file mode 100644 index 00000000..e8c43b85 Binary files /dev/null and b/doc/SourceSerifPro-Regular.woff differ diff --git a/doc/aho_corasick/autiter/index.html b/doc/aho_corasick/autiter/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/aho_corasick/autiter/sidebar-items.js b/doc/aho_corasick/autiter/sidebar-items.js new file mode 100644 index 00000000..2ccc58f9 --- /dev/null +++ b/doc/aho_corasick/autiter/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Match","Records a match in the search text."],["Matches","An iterator of non-overlapping matches for in-memory text."],["MatchesOverlapping","An iterator of overlapping matches for in-memory text."],["StreamMatches","An iterator of non-overlapping matches for streaming text."],["StreamMatchesOverlapping","An iterator of overlapping matches for streaming text."]],"trait":[["Automaton","An abstraction over automatons and their corresponding iterators. The type parameter `P` is the type of the pattern that was used to construct this Automaton."]]}); \ No newline at end of file diff --git a/doc/aho_corasick/autiter/struct.Match.html b/doc/aho_corasick/autiter/struct.Match.html new file mode 100644 index 00000000..a44d0528 --- /dev/null +++ b/doc/aho_corasick/autiter/struct.Match.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../aho_corasick/struct.Match.html...

+ + + \ No newline at end of file diff --git a/doc/aho_corasick/autiter/struct.Matches.html b/doc/aho_corasick/autiter/struct.Matches.html new file mode 100644 index 00000000..282f6a2c --- /dev/null +++ b/doc/aho_corasick/autiter/struct.Matches.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../aho_corasick/struct.Matches.html...

+ + + \ No newline at end of file diff --git a/doc/aho_corasick/autiter/struct.MatchesOverlapping.html b/doc/aho_corasick/autiter/struct.MatchesOverlapping.html new file mode 100644 index 00000000..61a752c8 --- /dev/null +++ b/doc/aho_corasick/autiter/struct.MatchesOverlapping.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../aho_corasick/struct.MatchesOverlapping.html...

+ + + \ No newline at end of file diff --git a/doc/aho_corasick/autiter/struct.StreamMatches.html b/doc/aho_corasick/autiter/struct.StreamMatches.html new file mode 100644 index 00000000..84864b02 --- /dev/null +++ b/doc/aho_corasick/autiter/struct.StreamMatches.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../aho_corasick/struct.StreamMatches.html...

+ + + \ No newline at end of file diff --git a/doc/aho_corasick/autiter/struct.StreamMatchesOverlapping.html b/doc/aho_corasick/autiter/struct.StreamMatchesOverlapping.html new file mode 100644 index 00000000..0051214d --- /dev/null +++ b/doc/aho_corasick/autiter/struct.StreamMatchesOverlapping.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../aho_corasick/struct.StreamMatchesOverlapping.html...

+ + + \ No newline at end of file diff --git a/doc/aho_corasick/autiter/trait.Automaton.html b/doc/aho_corasick/autiter/trait.Automaton.html new file mode 100644 index 00000000..4240333a --- /dev/null +++ b/doc/aho_corasick/autiter/trait.Automaton.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../aho_corasick/trait.Automaton.html...

+ + + \ No newline at end of file diff --git a/doc/aho_corasick/full/index.html b/doc/aho_corasick/full/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/aho_corasick/full/sidebar-items.js b/doc/aho_corasick/full/sidebar-items.js new file mode 100644 index 00000000..d5d37be8 --- /dev/null +++ b/doc/aho_corasick/full/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["FullAcAutomaton","A complete Aho-Corasick automaton."]]}); \ No newline at end of file diff --git a/doc/aho_corasick/full/struct.FullAcAutomaton.html b/doc/aho_corasick/full/struct.FullAcAutomaton.html new file mode 100644 index 00000000..de4188d1 --- /dev/null +++ b/doc/aho_corasick/full/struct.FullAcAutomaton.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../aho_corasick/struct.FullAcAutomaton.html...

+ + + \ No newline at end of file diff --git a/doc/aho_corasick/index.html b/doc/aho_corasick/index.html new file mode 100644 index 00000000..a7dcb977 --- /dev/null +++ b/doc/aho_corasick/index.html @@ -0,0 +1,322 @@ + + + + + + + + + + aho_corasick - Rust + + + + + + + + + + + + + + + + +
+

Crate aho_corasick + + [] + + [src]

+

An implementation of the +Aho-Corasick string search algorithm.

+ +

The Aho-Corasick algorithm is principally useful when you need to search many +large texts for a fixed (possibly large) set of keywords. In particular, the +Aho-Corasick algorithm preprocesses the set of keywords by constructing a +finite state machine. The search phase is then a quick linear scan through the +text. Each character in the search text causes a state transition in the +automaton. Matches are reported when the automaton enters a match state.

+ +

Examples

+

The main type exposed by this crate is AcAutomaton, which can be constructed +from an iterator of pattern strings:

+ +
+use aho_corasick::{Automaton, AcAutomaton};
+
+let aut = AcAutomaton::new(vec!["apple", "maple"]);
+
+// AcAutomaton also implements `FromIterator`:
+let aut: AcAutomaton<&str> = ["apple", "maple"].iter().cloned().collect();
+ +

Finding matches can be done with find:

+ +
+use aho_corasick::{Automaton, AcAutomaton, Match};
+
+let aut = AcAutomaton::new(vec!["apple", "maple"]);
+let mut it = aut.find("I like maple apples.");
+assert_eq!(it.next(), Some(Match {
+    pati: 1,
+    start: 7,
+    end: 12,
+}));
+assert_eq!(it.next(), Some(Match {
+    pati: 0,
+    start: 13,
+    end: 18,
+}));
+assert_eq!(it.next(), None);
+ +

Use find_overlapping if you want to report all matches, even if they +overlap with each other.

+ +
+use aho_corasick::{Automaton, AcAutomaton, Match};
+
+let aut = AcAutomaton::new(vec!["abc", "a"]);
+let matches: Vec<_> = aut.find_overlapping("abc").collect();
+assert_eq!(matches, vec![
+    Match { pati: 1, start: 0, end: 1}, Match { pati: 0, start: 0, end: 3 },
+]);
+
+// Regular `find` will report only one match:
+let matches: Vec<_> = aut.find("abc").collect();
+assert_eq!(matches, vec![Match { pati: 1, start: 0, end: 1}]);
+ +

Finally, there are also methods for finding matches on streams. Namely, the +search text does not have to live in memory. It's useful to run this on files +that can't fit into memory:

+ +
+use std::fs::File;
+
+use aho_corasick::{Automaton, AcAutomaton};
+
+let aut = AcAutomaton::new(vec!["foo", "bar", "baz"]);
+let rdr = File::open("search.txt").unwrap();
+for m in aut.stream_find(rdr) {
+    let m = m.unwrap(); // could be an IO error
+    println!("Pattern '{}' matched at: ({}, {})",
+             aut.pattern(m.pati), m.start, m.end);
+}
+ +

There is also stream_find_overlapping, which is just like find_overlapping, +but it operates on streams.

+ +

Please see dict-search.rs in this crate's examples directory for a more +complete example. It creates a large automaton from a dictionary and can do a +streaming match over arbitrarily large data.

+ +

Memory usage

+

A key aspect of an Aho-Corasick implementation is how the state transitions +are represented. The easiest way to make the automaton fast is to store a +sparse 256-slot map in each state. It maps an input byte to a state index. +This makes the matching loop extremely fast, since it translates to a simple +pointer read.

+ +

The problem is that as the automaton accumulates more states, you end up paying +a 256 * 4 (4 is for the u32 state index) byte penalty for every state +regardless of how many transitions it has.

+ +

To solve this, only states near the root of the automaton have this sparse +map representation. States near the leaves of the automaton use a dense mapping +that requires a linear scan.

+ +

(The specific limit currently set is 3, so that states with a depth less than +or equal to 3 are less memory efficient. The result is that the memory usage +of the automaton stops growing rapidly past ~60MB, even for automatons with +thousands of patterns.)

+ +

If you'd like to opt for the less-memory-efficient-but-faster version, then +you can construct an AcAutomaton with a Sparse transition strategy:

+ +
+use aho_corasick::{Automaton, AcAutomaton, Match, Sparse};
+
+let aut = AcAutomaton::<&str, Sparse>::with_transitions(vec!["abc", "a"]);
+let matches: Vec<_> = aut.find("abc").collect();
+assert_eq!(matches, vec![Match { pati: 1, start: 0, end: 1}]);
+

Structs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AcAutomaton +

An Aho-Corasick finite automaton.

+
Dense +

State transitions that can be stored either sparsely or densely.

+
FullAcAutomaton +

A complete Aho-Corasick automaton.

+
Match +

Records a match in the search text.

+
Matches +

An iterator of non-overlapping matches for in-memory text.

+
MatchesOverlapping +

An iterator of overlapping matches for in-memory text.

+
Sparse +

State transitions that are always sparse.

+
StreamMatches +

An iterator of non-overlapping matches for streaming text.

+
StreamMatchesOverlapping +

An iterator of overlapping matches for streaming text.

+

Traits

+ + + + + + + + + + +
Automaton +

An abstraction over automatons and their corresponding iterators. +The type parameter P is the type of the pattern that was used to +construct this Automaton.

+
Transitions +

An abstraction over state transition strategies.

+

Type Definitions

+ + + + + +
StateIdx +

The integer type used for the state index.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/aho_corasick/sidebar-items.js b/doc/aho_corasick/sidebar-items.js new file mode 100644 index 00000000..f37c1853 --- /dev/null +++ b/doc/aho_corasick/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["AcAutomaton","An Aho-Corasick finite automaton."],["Dense","State transitions that can be stored either sparsely or densely."],["FullAcAutomaton","A complete Aho-Corasick automaton."],["Match","Records a match in the search text."],["Matches","An iterator of non-overlapping matches for in-memory text."],["MatchesOverlapping","An iterator of overlapping matches for in-memory text."],["Sparse","State transitions that are always sparse."],["StreamMatches","An iterator of non-overlapping matches for streaming text."],["StreamMatchesOverlapping","An iterator of overlapping matches for streaming text."]],"trait":[["Automaton","An abstraction over automatons and their corresponding iterators. The type parameter `P` is the type of the pattern that was used to construct this Automaton."],["Transitions","An abstraction over state transition strategies."]],"type":[["StateIdx","The integer type used for the state index."]]}); \ No newline at end of file diff --git a/doc/aho_corasick/struct.AcAutomaton.html b/doc/aho_corasick/struct.AcAutomaton.html new file mode 100644 index 00000000..b8d36d32 --- /dev/null +++ b/doc/aho_corasick/struct.AcAutomaton.html @@ -0,0 +1,150 @@ + + + + + + + + + + aho_corasick::AcAutomaton - Rust + + + + + + + + + + + + + + + + +
+

Struct aho_corasick::AcAutomaton + + [] + + [src]

+
pub struct AcAutomaton<P, T = Dense> {
+    // some fields omitted
+}

An Aho-Corasick finite automaton.

+ +

The type parameter P is the type of the pattern that was used to +construct this AcAutomaton.

+

Methods

impl<P: AsRef<[u8]>> AcAutomaton<P>

fn new<I>(pats: I) -> AcAutomaton<P, Dense> where I: IntoIterator<Item=P>

+

Create a new automaton from an iterator of patterns.

+ +

The patterns must be convertible to bytes (&[u8]) via the AsRef +trait.

+

impl<P: AsRef<[u8]>, T: Transitions> AcAutomaton<P, T>

fn with_transitions<I>(pats: I) -> AcAutomaton<P, T> where I: IntoIterator<Item=P>

+

Create a new automaton from an iterator of patterns.

+ +

This constructor allows one to choose the transition representation.

+ +

The patterns must be convertible to bytes (&[u8]) via the AsRef +trait.

+

fn into_full(self) -> FullAcAutomaton<P>

+

Build out the entire automaton into a single matrix.

+ +

This will make searching as fast as possible at the expense of using +at least 4 * 256 * #states bytes of memory.

+

Trait Implementations

impl<P: AsRef<[u8]>, T: Transitions> Automaton<P> for AcAutomaton<P, T>

fn next_state(&self, si: StateIdx, b: u8) -> StateIdx

+

fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match

+

fn has_match(&self, si: StateIdx, outi: usize) -> bool

+

fn start_bytes(&self) -> &[u8]

+

fn patterns(&self) -> &[P]

+

fn pattern(&self, i: usize) -> &P

+

fn len(&self) -> usize

+

fn is_empty(&self) -> bool

+

fn find<'a, 's, Q: ?Sized + AsRef<[u8]>>(&'a self, s: &'s Q) -> Matches<'a, 's, P, Self> where Self: Sized

+

fn find_overlapping<'a, 's, Q: ?Sized + AsRef<[u8]>>(&'a self, s: &'s Q) -> MatchesOverlapping<'a, 's, P, Self> where Self: Sized

+

fn stream_find<'a, R: Read>(&'a self, rdr: R) -> StreamMatches<'a, R, P, Self> where Self: Sized

+

fn stream_find_overlapping<'a, R: Read>(&'a self, rdr: R) -> StreamMatchesOverlapping<'a, R, P, Self> where Self: Sized

+

impl<S: AsRef<[u8]>> FromIterator<S> for AcAutomaton<S>

fn from_iter<T>(it: T) -> AcAutomaton<S> where T: IntoIterator<Item=S>

+

impl<P: AsRef<[u8]> + Debug, T: Transitions> Debug for AcAutomaton<P, T>

fn fmt(&self, f: &mut Formatter) -> Result

+

Derived Implementations

impl<P: Clone, T: Clone> Clone for AcAutomaton<P, T>

fn clone(&self) -> AcAutomaton<P, T>

+

1.0.0fn clone_from(&mut self, source: &Self)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/aho_corasick/struct.Dense.html b/doc/aho_corasick/struct.Dense.html new file mode 100644 index 00000000..7977554d --- /dev/null +++ b/doc/aho_corasick/struct.Dense.html @@ -0,0 +1,121 @@ + + + + + + + + + + aho_corasick::Dense - Rust + + + + + + + + + + + + + + + + +
+

Struct aho_corasick::Dense + + [] + + [src]

+
pub struct Dense(_);

State transitions that can be stored either sparsely or densely.

+ +

This uses less space but at the expense of slower matching.

+

Trait Implementations

impl Transitions for Dense

fn new(depth: u32) -> Dense

+

fn goto(&self, b1: u8) -> StateIdx

+

fn set_goto(&mut self, b: u8, si: StateIdx)

+

fn heap_bytes(&self) -> usize

+

Derived Implementations

impl Debug for Dense

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+

impl Clone for Dense

fn clone(&self) -> Dense

+

1.0.0fn clone_from(&mut self, source: &Self)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/aho_corasick/struct.FullAcAutomaton.html b/doc/aho_corasick/struct.FullAcAutomaton.html new file mode 100644 index 00000000..d886b5eb --- /dev/null +++ b/doc/aho_corasick/struct.FullAcAutomaton.html @@ -0,0 +1,139 @@ + + + + + + + + + + aho_corasick::FullAcAutomaton - Rust + + + + + + + + + + + + + + + + +
+

Struct aho_corasick::FullAcAutomaton + + [] + + [src]

+
pub struct FullAcAutomaton<P> {
+    // some fields omitted
+}

A complete Aho-Corasick automaton.

+ +

This uses a single transition matrix that permits each input character +to move to the next state with a single lookup in the matrix.

+ +

This is as fast as it gets, but it is guaranteed to use a lot of memory. +Namely, it will use at least 4 * 256 * #states, where the number of +states is capped at length of all patterns concatenated.

+

Methods

impl<P: AsRef<[u8]>> FullAcAutomaton<P>

fn new<T: Transitions>(ac: AcAutomaton<P, T>) -> FullAcAutomaton<P>

+

Build a new expanded Aho-Corasick automaton from an existing +Aho-Corasick automaton.

+

Trait Implementations

impl<P: AsRef<[u8]>> Automaton<P> for FullAcAutomaton<P>

fn next_state(&self, si: StateIdx, i: u8) -> StateIdx

+

fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match

+

fn has_match(&self, si: StateIdx, outi: usize) -> bool

+

fn start_bytes(&self) -> &[u8]

+

fn patterns(&self) -> &[P]

+

fn pattern(&self, i: usize) -> &P

+

fn len(&self) -> usize

+

fn is_empty(&self) -> bool

+

fn find<'a, 's, Q: ?Sized + AsRef<[u8]>>(&'a self, s: &'s Q) -> Matches<'a, 's, P, Self> where Self: Sized

+

fn find_overlapping<'a, 's, Q: ?Sized + AsRef<[u8]>>(&'a self, s: &'s Q) -> MatchesOverlapping<'a, 's, P, Self> where Self: Sized

+

fn stream_find<'a, R: Read>(&'a self, rdr: R) -> StreamMatches<'a, R, P, Self> where Self: Sized

+

fn stream_find_overlapping<'a, R: Read>(&'a self, rdr: R) -> StreamMatchesOverlapping<'a, R, P, Self> where Self: Sized

+

impl<P: AsRef<[u8]> + Debug> Debug for FullAcAutomaton<P>

fn fmt(&self, f: &mut Formatter) -> Result

+

Derived Implementations

impl<P: Clone> Clone for FullAcAutomaton<P>

fn clone(&self) -> FullAcAutomaton<P>

+

1.0.0fn clone_from(&mut self, source: &Self)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/aho_corasick/struct.Match.html b/doc/aho_corasick/struct.Match.html new file mode 100644 index 00000000..d9451abf --- /dev/null +++ b/doc/aho_corasick/struct.Match.html @@ -0,0 +1,136 @@ + + + + + + + + + + aho_corasick::Match - Rust + + + + + + + + + + + + + + + + +
+

Struct aho_corasick::Match + + [] + + [src]

+
pub struct Match {
+    pub pati: usize,
+    pub start: usize,
+    pub end: usize,
+}

Records a match in the search text.

+

Fields

+ + + +
pati

The pattern index.

+ +

This corresponds to the ordering in which the matched pattern was +added to the automaton, starting at 0.

+
start

The starting byte offset of the match in the search text.

+
end

The ending byte offset of the match in the search text.

+ +

(This can be re-captiulated with pati and adding the pattern's +length to start, but it is convenient to have it here.)

+

Trait Implementations

Derived Implementations

impl Eq for Match

impl PartialEq for Match

fn eq(&self, __arg_0: &Match) -> bool

+

fn ne(&self, __arg_0: &Match) -> bool

+

impl Hash for Match

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

+

1.3.0fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

+

impl Debug for Match

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+

impl Clone for Match

fn clone(&self) -> Match

+

1.0.0fn clone_from(&mut self, source: &Self)

+

impl Copy for Match

+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/aho_corasick/struct.Matches.html b/doc/aho_corasick/struct.Matches.html new file mode 100644 index 00000000..574a07ab --- /dev/null +++ b/doc/aho_corasick/struct.Matches.html @@ -0,0 +1,170 @@ + + + + + + + + + + aho_corasick::Matches - Rust + + + + + + + + + + + + + + + + +
+

Struct aho_corasick::Matches + + [] + + [src]

+
pub struct Matches<'a, 's, P, A: 'a + Automaton<P> + ?Sized> {
+    // some fields omitted
+}

An iterator of non-overlapping matches for in-memory text.

+ +

This iterator yields Match values.

+ +

'a is the lifetime of the automaton, 's is the lifetime of the +search text, and P is the type of the Automaton's pattern.

+

Trait Implementations

impl<'a, 's, P, A: Automaton<P> + ?Sized> Iterator for Matches<'a, 's, P, A>

type Item = Match

+

fn next(&mut self) -> Option<Match>

+

1.0.0fn size_hint(&self) -> (usize, Option<usize>)

+

1.0.0fn count(self) -> usize

+

1.0.0fn last(self) -> Option<Self::Item>

+

1.0.0fn nth(&mut self, n: usize) -> Option<Self::Item>

+

1.0.0fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter> where U: IntoIterator<Item=Self::Item>

+

1.0.0fn zip<U>(self, other: U) -> Zip<Self, U::IntoIter> where U: IntoIterator

+

1.0.0fn map<B, F>(self, f: F) -> Map<Self, F> where F: FnMut(Self::Item) -> B

+

1.0.0fn filter<P>(self, predicate: P) -> Filter<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where F: FnMut(Self::Item) -> Option<B>

+

1.0.0fn enumerate(self) -> Enumerate<Self>

+

1.0.0fn peekable(self) -> Peekable<Self>

+

1.0.0fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn skip(self, n: usize) -> Skip<Self>

+

1.0.0fn take(self, n: usize) -> Take<Self>

+

1.0.0fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where F: FnMut(&mut St, Self::Item) -> Option<B>

+

1.0.0fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where U: IntoIterator, F: FnMut(Self::Item) -> U

+

1.0.0fn fuse(self) -> Fuse<Self>

+

1.0.0fn inspect<F>(self, f: F) -> Inspect<Self, F> where F: FnMut(&Self::Item) -> ()

+

1.0.0fn by_ref(&mut self) -> &mut Self

+

1.0.0fn collect<B>(self) -> B where B: FromIterator<Self::Item>

+

1.0.0fn partition<B, F>(self, f: F) -> (B, B) where F: FnMut(&Self::Item) -> bool, B: Default + Extend<Self::Item>

+

1.0.0fn fold<B, F>(self, init: B, f: F) -> B where F: FnMut(B, Self::Item) -> B

+

1.0.0fn all<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn any<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn find<P>(&mut self, predicate: P) -> Option<Self::Item> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn position<P>(&mut self, predicate: P) -> Option<usize> where P: FnMut(Self::Item) -> bool

+

1.0.0fn rposition<P>(&mut self, predicate: P) -> Option<usize> where Self: ExactSizeIterator + DoubleEndedIterator, P: FnMut(Self::Item) -> bool

+

1.0.0fn max(self) -> Option<Self::Item> where Self::Item: Ord

+

1.0.0fn min(self) -> Option<Self::Item> where Self::Item: Ord

+

fn max_by<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

1.6.0fn max_by_key<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

fn min_by<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

1.6.0fn min_by_key<B, F>(self, f: F) -> Option<Self::Item> where F: FnMut(&Self::Item) -> B, B: Ord

+

1.0.0fn rev(self) -> Rev<Self> where Self: DoubleEndedIterator

+

1.0.0fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where FromB: Default + Extend<B>, FromA: Default + Extend<A>, Self: Iterator<Item=(A, B)>

+

1.0.0fn cloned<'a, T>(self) -> Cloned<Self> where Self: Iterator<Item=&'a T>, T: 'a + Clone

+

1.0.0fn cycle(self) -> Cycle<Self> where Self: Clone

+

fn sum<S>(self) -> S where S: Add<Self::Item, Output=S> + Zero

+

fn product<P>(self) -> P where P: Mul<Self::Item, Output=P> + One

+

1.5.0fn cmp<I>(self, other: I) -> Ordering where I: IntoIterator<Item=Self::Item>, Self::Item: Ord

+

1.5.0fn partial_cmp<I>(self, other: I) -> Option<Ordering> where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn eq<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn ne<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn lt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn le<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn gt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn ge<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

Derived Implementations

impl<'a, 's, P: Debug, A: Debug + 'a + Automaton<P> + ?Sized> Debug for Matches<'a, 's, P, A>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/aho_corasick/struct.MatchesOverlapping.html b/doc/aho_corasick/struct.MatchesOverlapping.html new file mode 100644 index 00000000..a5944508 --- /dev/null +++ b/doc/aho_corasick/struct.MatchesOverlapping.html @@ -0,0 +1,170 @@ + + + + + + + + + + aho_corasick::MatchesOverlapping - Rust + + + + + + + + + + + + + + + + +
+

Struct aho_corasick::MatchesOverlapping + + [] + + [src]

+
pub struct MatchesOverlapping<'a, 's, P, A: 'a + Automaton<P> + ?Sized> {
+    // some fields omitted
+}

An iterator of overlapping matches for in-memory text.

+ +

This iterator yields Match values.

+ +

'a is the lifetime of the automaton, 's is the lifetime of the +search text, and P is the type of the Automaton's pattern.

+

Trait Implementations

impl<'a, 's, P, A: Automaton<P> + ?Sized> Iterator for MatchesOverlapping<'a, 's, P, A>

type Item = Match

+

fn next(&mut self) -> Option<Match>

+

1.0.0fn size_hint(&self) -> (usize, Option<usize>)

+

1.0.0fn count(self) -> usize

+

1.0.0fn last(self) -> Option<Self::Item>

+

1.0.0fn nth(&mut self, n: usize) -> Option<Self::Item>

+

1.0.0fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter> where U: IntoIterator<Item=Self::Item>

+

1.0.0fn zip<U>(self, other: U) -> Zip<Self, U::IntoIter> where U: IntoIterator

+

1.0.0fn map<B, F>(self, f: F) -> Map<Self, F> where F: FnMut(Self::Item) -> B

+

1.0.0fn filter<P>(self, predicate: P) -> Filter<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where F: FnMut(Self::Item) -> Option<B>

+

1.0.0fn enumerate(self) -> Enumerate<Self>

+

1.0.0fn peekable(self) -> Peekable<Self>

+

1.0.0fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn skip(self, n: usize) -> Skip<Self>

+

1.0.0fn take(self, n: usize) -> Take<Self>

+

1.0.0fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where F: FnMut(&mut St, Self::Item) -> Option<B>

+

1.0.0fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where U: IntoIterator, F: FnMut(Self::Item) -> U

+

1.0.0fn fuse(self) -> Fuse<Self>

+

1.0.0fn inspect<F>(self, f: F) -> Inspect<Self, F> where F: FnMut(&Self::Item) -> ()

+

1.0.0fn by_ref(&mut self) -> &mut Self

+

1.0.0fn collect<B>(self) -> B where B: FromIterator<Self::Item>

+

1.0.0fn partition<B, F>(self, f: F) -> (B, B) where F: FnMut(&Self::Item) -> bool, B: Default + Extend<Self::Item>

+

1.0.0fn fold<B, F>(self, init: B, f: F) -> B where F: FnMut(B, Self::Item) -> B

+

1.0.0fn all<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn any<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn find<P>(&mut self, predicate: P) -> Option<Self::Item> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn position<P>(&mut self, predicate: P) -> Option<usize> where P: FnMut(Self::Item) -> bool

+

1.0.0fn rposition<P>(&mut self, predicate: P) -> Option<usize> where Self: ExactSizeIterator + DoubleEndedIterator, P: FnMut(Self::Item) -> bool

+

1.0.0fn max(self) -> Option<Self::Item> where Self::Item: Ord

+

1.0.0fn min(self) -> Option<Self::Item> where Self::Item: Ord

+

fn max_by<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

1.6.0fn max_by_key<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

fn min_by<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

1.6.0fn min_by_key<B, F>(self, f: F) -> Option<Self::Item> where F: FnMut(&Self::Item) -> B, B: Ord

+

1.0.0fn rev(self) -> Rev<Self> where Self: DoubleEndedIterator

+

1.0.0fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where FromB: Default + Extend<B>, FromA: Default + Extend<A>, Self: Iterator<Item=(A, B)>

+

1.0.0fn cloned<'a, T>(self) -> Cloned<Self> where Self: Iterator<Item=&'a T>, T: 'a + Clone

+

1.0.0fn cycle(self) -> Cycle<Self> where Self: Clone

+

fn sum<S>(self) -> S where S: Add<Self::Item, Output=S> + Zero

+

fn product<P>(self) -> P where P: Mul<Self::Item, Output=P> + One

+

1.5.0fn cmp<I>(self, other: I) -> Ordering where I: IntoIterator<Item=Self::Item>, Self::Item: Ord

+

1.5.0fn partial_cmp<I>(self, other: I) -> Option<Ordering> where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn eq<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn ne<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn lt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn le<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn gt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn ge<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

Derived Implementations

impl<'a, 's, P: Debug, A: Debug + 'a + Automaton<P> + ?Sized> Debug for MatchesOverlapping<'a, 's, P, A>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/aho_corasick/struct.Sparse.html b/doc/aho_corasick/struct.Sparse.html new file mode 100644 index 00000000..c1fd3870 --- /dev/null +++ b/doc/aho_corasick/struct.Sparse.html @@ -0,0 +1,122 @@ + + + + + + + + + + aho_corasick::Sparse - Rust + + + + + + + + + + + + + + + + +
+

Struct aho_corasick::Sparse + + [] + + [src]

+
pub struct Sparse(_);

State transitions that are always sparse.

+ +

This can use enormous amounts of memory when there are many patterns, +but matching is very fast.

+

Trait Implementations

impl Transitions for Sparse

fn new(_: u32) -> Sparse

+

fn goto(&self, b: u8) -> StateIdx

+

fn set_goto(&mut self, b: u8, si: StateIdx)

+

fn heap_bytes(&self) -> usize

+

Derived Implementations

impl Debug for Sparse

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+

impl Clone for Sparse

fn clone(&self) -> Sparse

+

1.0.0fn clone_from(&mut self, source: &Self)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/aho_corasick/struct.StreamMatches.html b/doc/aho_corasick/struct.StreamMatches.html new file mode 100644 index 00000000..8b7191e3 --- /dev/null +++ b/doc/aho_corasick/struct.StreamMatches.html @@ -0,0 +1,170 @@ + + + + + + + + + + aho_corasick::StreamMatches - Rust + + + + + + + + + + + + + + + + +
+

Struct aho_corasick::StreamMatches + + [] + + [src]

+
pub struct StreamMatches<'a, R, P, A: 'a + Automaton<P> + ?Sized> {
+    // some fields omitted
+}

An iterator of non-overlapping matches for streaming text.

+ +

This iterator yields io::Result<Match> values.

+ +

'a is the lifetime of the automaton, R is the type of the underlying +io::Reader, and P is the type of the Automaton's pattern.

+

Trait Implementations

impl<'a, R: Read, P, A: Automaton<P>> Iterator for StreamMatches<'a, R, P, A>

type Item = Result<Match>

+

fn next(&mut self) -> Option<Result<Match>>

+

1.0.0fn size_hint(&self) -> (usize, Option<usize>)

+

1.0.0fn count(self) -> usize

+

1.0.0fn last(self) -> Option<Self::Item>

+

1.0.0fn nth(&mut self, n: usize) -> Option<Self::Item>

+

1.0.0fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter> where U: IntoIterator<Item=Self::Item>

+

1.0.0fn zip<U>(self, other: U) -> Zip<Self, U::IntoIter> where U: IntoIterator

+

1.0.0fn map<B, F>(self, f: F) -> Map<Self, F> where F: FnMut(Self::Item) -> B

+

1.0.0fn filter<P>(self, predicate: P) -> Filter<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where F: FnMut(Self::Item) -> Option<B>

+

1.0.0fn enumerate(self) -> Enumerate<Self>

+

1.0.0fn peekable(self) -> Peekable<Self>

+

1.0.0fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn skip(self, n: usize) -> Skip<Self>

+

1.0.0fn take(self, n: usize) -> Take<Self>

+

1.0.0fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where F: FnMut(&mut St, Self::Item) -> Option<B>

+

1.0.0fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where U: IntoIterator, F: FnMut(Self::Item) -> U

+

1.0.0fn fuse(self) -> Fuse<Self>

+

1.0.0fn inspect<F>(self, f: F) -> Inspect<Self, F> where F: FnMut(&Self::Item) -> ()

+

1.0.0fn by_ref(&mut self) -> &mut Self

+

1.0.0fn collect<B>(self) -> B where B: FromIterator<Self::Item>

+

1.0.0fn partition<B, F>(self, f: F) -> (B, B) where F: FnMut(&Self::Item) -> bool, B: Default + Extend<Self::Item>

+

1.0.0fn fold<B, F>(self, init: B, f: F) -> B where F: FnMut(B, Self::Item) -> B

+

1.0.0fn all<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn any<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn find<P>(&mut self, predicate: P) -> Option<Self::Item> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn position<P>(&mut self, predicate: P) -> Option<usize> where P: FnMut(Self::Item) -> bool

+

1.0.0fn rposition<P>(&mut self, predicate: P) -> Option<usize> where Self: ExactSizeIterator + DoubleEndedIterator, P: FnMut(Self::Item) -> bool

+

1.0.0fn max(self) -> Option<Self::Item> where Self::Item: Ord

+

1.0.0fn min(self) -> Option<Self::Item> where Self::Item: Ord

+

fn max_by<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

1.6.0fn max_by_key<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

fn min_by<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

1.6.0fn min_by_key<B, F>(self, f: F) -> Option<Self::Item> where F: FnMut(&Self::Item) -> B, B: Ord

+

1.0.0fn rev(self) -> Rev<Self> where Self: DoubleEndedIterator

+

1.0.0fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where FromB: Default + Extend<B>, FromA: Default + Extend<A>, Self: Iterator<Item=(A, B)>

+

1.0.0fn cloned<'a, T>(self) -> Cloned<Self> where Self: Iterator<Item=&'a T>, T: 'a + Clone

+

1.0.0fn cycle(self) -> Cycle<Self> where Self: Clone

+

fn sum<S>(self) -> S where S: Add<Self::Item, Output=S> + Zero

+

fn product<P>(self) -> P where P: Mul<Self::Item, Output=P> + One

+

1.5.0fn cmp<I>(self, other: I) -> Ordering where I: IntoIterator<Item=Self::Item>, Self::Item: Ord

+

1.5.0fn partial_cmp<I>(self, other: I) -> Option<Ordering> where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn eq<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn ne<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn lt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn le<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn gt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn ge<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

Derived Implementations

impl<'a, R: Debug, P: Debug, A: Debug + 'a + Automaton<P> + ?Sized> Debug for StreamMatches<'a, R, P, A>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/aho_corasick/struct.StreamMatchesOverlapping.html b/doc/aho_corasick/struct.StreamMatchesOverlapping.html new file mode 100644 index 00000000..3c4086a3 --- /dev/null +++ b/doc/aho_corasick/struct.StreamMatchesOverlapping.html @@ -0,0 +1,170 @@ + + + + + + + + + + aho_corasick::StreamMatchesOverlapping - Rust + + + + + + + + + + + + + + + + +
+

Struct aho_corasick::StreamMatchesOverlapping + + [] + + [src]

+
pub struct StreamMatchesOverlapping<'a, R, P, A: 'a + Automaton<P> + ?Sized> {
+    // some fields omitted
+}

An iterator of overlapping matches for streaming text.

+ +

This iterator yields io::Result<Match> values.

+ +

'a is the lifetime of the automaton, R is the type of the underlying +io::Reader, and P is the type of the Automaton's pattern.

+

Trait Implementations

impl<'a, R: Read, P, A: Automaton<P> + ?Sized> Iterator for StreamMatchesOverlapping<'a, R, P, A>

type Item = Result<Match>

+

fn next(&mut self) -> Option<Result<Match>>

+

1.0.0fn size_hint(&self) -> (usize, Option<usize>)

+

1.0.0fn count(self) -> usize

+

1.0.0fn last(self) -> Option<Self::Item>

+

1.0.0fn nth(&mut self, n: usize) -> Option<Self::Item>

+

1.0.0fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter> where U: IntoIterator<Item=Self::Item>

+

1.0.0fn zip<U>(self, other: U) -> Zip<Self, U::IntoIter> where U: IntoIterator

+

1.0.0fn map<B, F>(self, f: F) -> Map<Self, F> where F: FnMut(Self::Item) -> B

+

1.0.0fn filter<P>(self, predicate: P) -> Filter<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where F: FnMut(Self::Item) -> Option<B>

+

1.0.0fn enumerate(self) -> Enumerate<Self>

+

1.0.0fn peekable(self) -> Peekable<Self>

+

1.0.0fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn skip(self, n: usize) -> Skip<Self>

+

1.0.0fn take(self, n: usize) -> Take<Self>

+

1.0.0fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where F: FnMut(&mut St, Self::Item) -> Option<B>

+

1.0.0fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where U: IntoIterator, F: FnMut(Self::Item) -> U

+

1.0.0fn fuse(self) -> Fuse<Self>

+

1.0.0fn inspect<F>(self, f: F) -> Inspect<Self, F> where F: FnMut(&Self::Item) -> ()

+

1.0.0fn by_ref(&mut self) -> &mut Self

+

1.0.0fn collect<B>(self) -> B where B: FromIterator<Self::Item>

+

1.0.0fn partition<B, F>(self, f: F) -> (B, B) where F: FnMut(&Self::Item) -> bool, B: Default + Extend<Self::Item>

+

1.0.0fn fold<B, F>(self, init: B, f: F) -> B where F: FnMut(B, Self::Item) -> B

+

1.0.0fn all<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn any<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn find<P>(&mut self, predicate: P) -> Option<Self::Item> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn position<P>(&mut self, predicate: P) -> Option<usize> where P: FnMut(Self::Item) -> bool

+

1.0.0fn rposition<P>(&mut self, predicate: P) -> Option<usize> where Self: ExactSizeIterator + DoubleEndedIterator, P: FnMut(Self::Item) -> bool

+

1.0.0fn max(self) -> Option<Self::Item> where Self::Item: Ord

+

1.0.0fn min(self) -> Option<Self::Item> where Self::Item: Ord

+

fn max_by<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

1.6.0fn max_by_key<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

fn min_by<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

1.6.0fn min_by_key<B, F>(self, f: F) -> Option<Self::Item> where F: FnMut(&Self::Item) -> B, B: Ord

+

1.0.0fn rev(self) -> Rev<Self> where Self: DoubleEndedIterator

+

1.0.0fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where FromB: Default + Extend<B>, FromA: Default + Extend<A>, Self: Iterator<Item=(A, B)>

+

1.0.0fn cloned<'a, T>(self) -> Cloned<Self> where Self: Iterator<Item=&'a T>, T: 'a + Clone

+

1.0.0fn cycle(self) -> Cycle<Self> where Self: Clone

+

fn sum<S>(self) -> S where S: Add<Self::Item, Output=S> + Zero

+

fn product<P>(self) -> P where P: Mul<Self::Item, Output=P> + One

+

1.5.0fn cmp<I>(self, other: I) -> Ordering where I: IntoIterator<Item=Self::Item>, Self::Item: Ord

+

1.5.0fn partial_cmp<I>(self, other: I) -> Option<Ordering> where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn eq<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn ne<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn lt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn le<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn gt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn ge<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

Derived Implementations

impl<'a, R: Debug, P: Debug, A: Debug + 'a + Automaton<P> + ?Sized> Debug for StreamMatchesOverlapping<'a, R, P, A>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/aho_corasick/trait.Automaton.html b/doc/aho_corasick/trait.Automaton.html new file mode 100644 index 00000000..f0ba05a0 --- /dev/null +++ b/doc/aho_corasick/trait.Automaton.html @@ -0,0 +1,160 @@ + + + + + + + + + + aho_corasick::Automaton - Rust + + + + + + + + + + + + + + + + +
+

Trait aho_corasick::Automaton + + [] + + [src]

+
pub trait Automaton<P> {
+    fn next_state(&self, si: StateIdx, b: u8) -> StateIdx;
+    fn has_match(&self, si: StateIdx, outi: usize) -> bool;
+    fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match;
+    fn start_bytes(&self) -> &[u8];
+    fn patterns(&self) -> &[P];
+    fn pattern(&self, i: usize) -> &P;
+
+    fn len(&self) -> usize { ... }
+    fn is_empty(&self) -> bool { ... }
+    fn find<'a, 's, Q: ?Sized + AsRef<[u8]>>(&'a self, s: &'s Q) -> Matches<'a, 's, P, Self> where Self: Sized { ... }
+    fn find_overlapping<'a, 's, Q: ?Sized + AsRef<[u8]>>(&'a self, s: &'s Q) -> MatchesOverlapping<'a, 's, P, Self> where Self: Sized { ... }
+    fn stream_find<'a, R: Read>(&'a self, rdr: R) -> StreamMatches<'a, R, P, Self> where Self: Sized { ... }
+    fn stream_find_overlapping<'a, R: Read>(&'a self, rdr: R) -> StreamMatchesOverlapping<'a, R, P, Self> where Self: Sized { ... }
+}

An abstraction over automatons and their corresponding iterators. +The type parameter P is the type of the pattern that was used to +construct this Automaton.

+
+

Required Methods

+
+

fn next_state(&self, si: StateIdx, b: u8) -> StateIdx

Return the next state given the current state and next character.

+

fn has_match(&self, si: StateIdx, outi: usize) -> bool

Return true if and only if the given state and current pattern index +indicate a match.

+

fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match

Build a match given the current state, pattern index and input index.

+

fn start_bytes(&self) -> &[u8]

Return the set of bytes that have transitions in the root state.

+

fn patterns(&self) -> &[P]

Returns all of the patterns matched by this automaton.

+ +

The order of the patterns is the order in which they were added.

+

fn pattern(&self, i: usize) -> &P

Returns the pattern indexed at i.

+ +

The index corresponds to the position at which the pattern was added +to the automaton, starting at 0.

+
+

Provided Methods

+
+

fn len(&self) -> usize

Return the number of patterns in the automaton.

+

fn is_empty(&self) -> bool

Returns true if the automaton has no patterns.

+

fn find<'a, 's, Q: ?Sized + AsRef<[u8]>>(&'a self, s: &'s Q) -> Matches<'a, 's, P, Self> where Self: Sized

Returns an iterator of non-overlapping matches in s.

+

fn find_overlapping<'a, 's, Q: ?Sized + AsRef<[u8]>>(&'a self, s: &'s Q) -> MatchesOverlapping<'a, 's, P, Self> where Self: Sized

Returns an iterator of overlapping matches in s.

+

fn stream_find<'a, R: Read>(&'a self, rdr: R) -> StreamMatches<'a, R, P, Self> where Self: Sized

Returns an iterator of non-overlapping matches in the given reader.

+

fn stream_find_overlapping<'a, R: Read>(&'a self, rdr: R) -> StreamMatchesOverlapping<'a, R, P, Self> where Self: Sized

Returns an iterator of overlapping matches in the given reader.

+
+

Implementors

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/aho_corasick/trait.Transitions.html b/doc/aho_corasick/trait.Transitions.html new file mode 100644 index 00000000..ebacb853 --- /dev/null +++ b/doc/aho_corasick/trait.Transitions.html @@ -0,0 +1,137 @@ + + + + + + + + + + aho_corasick::Transitions - Rust + + + + + + + + + + + + + + + + +
+

Trait aho_corasick::Transitions + + [] + + [src]

+
pub trait Transitions {
+    fn new(depth: u32) -> Self;
+    fn goto(&self, alpha: u8) -> StateIdx;
+    fn set_goto(&mut self, alpha: u8, si: StateIdx);
+    fn heap_bytes(&self) -> usize;
+}

An abstraction over state transition strategies.

+ +

This is an attempt to let the caller choose the space/time trade offs +used for state transitions.

+ +

(It's possible that this interface is merely good enough for just the two +implementations in this crate.)

+
+

Required Methods

+
+

fn new(depth: u32) -> Self

Return a new state at the given depth.

+

fn goto(&self, alpha: u8) -> StateIdx

Return the next state index given the next character.

+

fn set_goto(&mut self, alpha: u8, si: StateIdx)

Set the next state index for the character given.

+

fn heap_bytes(&self) -> usize

The memory use in bytes (on the heap) of this set of transitions.

+
+

Implementors

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/aho_corasick/type.StateIdx.html b/doc/aho_corasick/type.StateIdx.html new file mode 100644 index 00000000..f86c7434 --- /dev/null +++ b/doc/aho_corasick/type.StateIdx.html @@ -0,0 +1,115 @@ + + + + + + + + + + aho_corasick::StateIdx - Rust + + + + + + + + + + + + + + + + +
+

aho_corasick::StateIdx + + [] + + [src]

+
type StateIdx = u32;

The integer type used for the state index.

+ +

Limiting this to 32 bit integers can have a big impact on memory usage +when using the Sparse transition representation.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/ansi_term/enum.Colour.html b/doc/ansi_term/enum.Colour.html new file mode 100644 index 00000000..e76d3b21 --- /dev/null +++ b/doc/ansi_term/enum.Colour.html @@ -0,0 +1,184 @@ + + + + + + + + + + ansi_term::Colour - Rust + + + + + + + + + + + + + + + + +
+

Enum ansi_term::Colour + + [] + + [src]

+
pub enum Colour {
+    Black,
+    Red,
+    Green,
+    Yellow,
+    Blue,
+    Purple,
+    Cyan,
+    White,
+    Fixed(u8),
+}

A colour is one specific type of ANSI escape code, and can refer +to either the foreground or background colour.

+ +

These use the standard numeric sequences. +See http://invisible-island.net/xterm/ctlseqs/ctlseqs.html

+

Variants

+
Black

Colour #0 (foreground code 30, background code 40).

+ +

This is not necessarily the background colour, and using it as one may +render the text hard to read on terminals with dark backgrounds.

+
Red

Colour #1 (foreground code 31, background code 41).

+
Green

Colour #2 (foreground code 32, background code 42).

+
Yellow

Colour #3 (foreground code 33, background code 43).

+
Blue

Colour #4 (foreground code 34, background code 44).

+
Purple

Colour #5 (foreground code 35, background code 45).

+
Cyan

Colour #6 (foreground code 36, background code 46).

+
White

Colour #7 (foreground code 37, background code 47).

+ +

As above, this is not necessarily the foreground colour, and may be +hard to read on terminals with light backgrounds.

+
Fixed

A colour number from 0 to 255, for use in 256-colour terminal +environments.

+ +
    +
  • Colours 0 to 7 are the Black to White variants respectively. +These colours can usually be changed in the terminal emulator.
  • +
  • Colours 8 to 15 are brighter versions of the eight colours above. +These can also usually be changed in the terminal emulator, or it +could be configured to use the original colours and show the text in +bold instead. It varies depending on the program.
  • +
  • Colours 16 to 231 contain several palettes of bright colours, +arranged in six squares measuring six by six each.
  • +
  • Colours 232 to 255 are shades of grey from black to white.
  • +
+ +

It might make more sense to look at a colour chart.

+

Methods

impl Colour

fn normal(self) -> Style

+

Return a Style with the foreground colour set to this colour.

+

fn paint<'a, S>(self, input: S) -> ANSIString<'a> where S: Into<Cow<'a, str>>

+

Paints the given text with this colour, returning an ANSI string. +This is a short-cut so you don't have to use Blue.normal() just +to get blue text.

+

fn bold(self) -> Style

+

Returns a Style with the bold property set.

+

fn dimmed(self) -> Style

+

Returns a Style with the dimmed property set.

+

fn italic(self) -> Style

+

Returns a Style with the italic property set.

+

fn underline(self) -> Style

+

Returns a Style with the underline property set.

+
+

Returns a Style with the blink property set.

+

fn reverse(self) -> Style

+

Returns a Style with the reverse property set.

+

fn hidden(self) -> Style

+

Returns a Style with the hidden property set.

+

fn on(self, background: Colour) -> Style

+

Returns a Style with the background colour property set.

+

Trait Implementations

Derived Implementations

impl Debug for Colour

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+

impl Copy for Colour

impl Clone for Colour

fn clone(&self) -> Colour

+

1.0.0fn clone_from(&mut self, source: &Self)

+

impl PartialEq for Colour

fn eq(&self, __arg_0: &Colour) -> bool

+

fn ne(&self, __arg_0: &Colour) -> bool

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/ansi_term/index.html b/doc/ansi_term/index.html new file mode 100644 index 00000000..12db26bd --- /dev/null +++ b/doc/ansi_term/index.html @@ -0,0 +1,277 @@ + + + + + + + + + + ansi_term - Rust + + + + + + + + + + + + + + + + +
+

Crate ansi_term + + [] + + [src]

+

This is a library for controlling colours and formatting, such as +red bold text or blue underlined text, on ANSI terminals.

+ +

Basic usage

+

There are two main data structures in this crate that you need to be +concerned with: ANSIString and Style. A Style holds stylistic +information: colours, whether the text should be bold, or blinking, or +whatever. There are also Colour variants that represent simple foreground +colour styles. An ANSIString is a string paired with a Style.

+ +

(Yes, it’s British English, but you won’t have to write “colour” very often. +Style is used the majority of the time.)

+ +

To format a string, call the paint method on a Style or a Colour, +passing in the string you want to format as the argument. For example, +here’s how to get some red text:

+ +
+use ansi_term::Colour::Red;
+println!("This is in red: {}", Red.paint("a red string"));
+ +

It’s important to note that the paint method does not actually return a +string with the ANSI control characters surrounding it. Instead, it returns +an ANSIString value that has a Display implementation that, when +formatted, returns the characters. This allows strings to be printed with a +minimum of String allocations being performed behind the scenes.

+ +

If you do want to get at the escape codes, then you can convert the +ANSIString to a string as you would any other Display value:

+ +
+use ansi_term::Colour::Red;
+use std::string::ToString;
+let red_string = Red.paint("a red string").to_string();
+ +

Bold, underline, background, and other styles

+

For anything more complex than plain foreground colour changes, you need to +construct Style objects themselves, rather than beginning with a Colour. +You can do this by chaining methods based on a new Style, created with +Style::new(). Each method creates a new style that has that specific +property set. For example:

+ +
+use ansi_term::Style;
+println!("How about some {} and {}?",
+         Style::new().bold().paint("bold"),
+         Style::new().underline().paint("underline"));
+ +

For brevity, these methods have also been implemented for Colour values, +so you can give your styles a foreground colour without having to begin with +an empty Style value:

+ +
+use ansi_term::Colour::{Blue, Yellow};
+println!("Demonstrating {} and {}!",
+         Blue.bold().paint("blue bold"),
+         Yellow.underline().paint("yellow underline"));
+println!("Yellow on blue: {}", Yellow.on(Blue).paint("wow!"));
+ +

The complete list of styles you can use are: bold, dimmed, italic, +underline, blink, reverse, hidden, and on for background colours.

+ +

Finally, you can turn a Colour into a Style with the normal method. +This will produce the exact same ANSIString as if you just used the +paint method on the Colour directly, but it’s useful in certain cases: +for example, you may have a method that returns Styles, and need to +represent both the “red bold” and “red, but not bold” styles with values of +the same type. The Style struct also has a Default implementation if you +want to have a style with nothing set.

+ +
+use ansi_term::Style;
+use ansi_term::Colour::Red;
+Red.normal().paint("yet another red string");
+Style::default().paint("a completely regular string");
+ +

Extended colours

+

You can access the extended range of 256 colours by using the Fixed colour +variant, which takes an argument of the colour number to use. This can be +included wherever you would use a Colour:

+ +
+use ansi_term::Colour::Fixed;
+Fixed(134).paint("A sort of light purple");
+Fixed(221).on(Fixed(124)).paint("Mustard in the ketchup");
+ +

The first sixteen of these values are the same as the normal and bold +standard colour variants. There’s nothing stopping you from using these as +Fixed colours instead, but there’s nothing to be gained by doing so +either.

+ +

Combining successive coloured strings

+

The benefit of writing ANSI escape codes to the terminal is that they +stack: you do not need to end every coloured string with a reset code if +the text that follows it is of a similar style. For example, if you want to +have some blue text followed by some blue bold text, it’s possible to send +the ANSI code for blue, followed by the ANSI code for bold, and finishing +with a reset code without having to have an extra one between the two +strings.

+ +

This crate can optimise the ANSI codes that get printed in situations like +this, making life easier for your terminal renderer. The ANSIStrings +struct takes a slice of several ANSIString values, and will iterate over +each of them, printing only the codes for the styles that need to be updated +as part of its formatting routine.

+ +

The following code snippet uses this to enclose a binary number displayed in +red bold text inside some red, but not bold, brackets:

+ +
+use ansi_term::Colour::Red;
+use ansi_term::{ANSIString, ANSIStrings};
+let some_value = format!("{:b}", 42);
+let strings: &[ANSIString<'static>] = &[
+    Red.paint("["),
+    Red.bold().paint(some_value),
+    Red.paint("]"),
+];
+println!("Value: {}", ANSIStrings(strings));
+ +

There are several things to note here. Firstly, the paint method can take +either an owned String or a borrowed &str. Internally, an ANSIString +holds a copy-on-write (Cow) string value to deal with both owned and +borrowed strings at the same time. This is used here to display a String, +the result of the format! call, using the same mechanism as some +statically-available &str slices. Secondly, that the ANSIStrings value +works in the same way as its singular counterpart, with a Display +implementation that only performs the formatting when required.

+

Structs

+ + + + + + + + + + + + + + + +
ANSIString +

An ANSI String is a string coupled with the Style to display it +in a terminal.

+
ANSIStrings +

A set of ANSIStrings collected together, in order to be written with a +minimum of control characters.

+
Style +

A style is a collection of properties that can format a string +using ANSI escape codes.

+

Enums

+ + + + + +
Colour +

A colour is one specific type of ANSI escape code, and can refer +to either the foreground or background colour.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/ansi_term/sidebar-items.js b/doc/ansi_term/sidebar-items.js new file mode 100644 index 00000000..dbb7aa66 --- /dev/null +++ b/doc/ansi_term/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["Colour","A colour is one specific type of ANSI escape code, and can refer to either the foreground or background colour."]],"struct":[["ANSIString","An ANSI String is a string coupled with the Style to display it in a terminal."],["ANSIStrings","A set of `ANSIString`s collected together, in order to be written with a minimum of control characters."],["Style","A style is a collection of properties that can format a string using ANSI escape codes."]]}); \ No newline at end of file diff --git a/doc/ansi_term/struct.ANSIString.html b/doc/ansi_term/struct.ANSIString.html new file mode 100644 index 00000000..a49e9ef7 --- /dev/null +++ b/doc/ansi_term/struct.ANSIString.html @@ -0,0 +1,1358 @@ + + + + + + + + + + ansi_term::ANSIString - Rust + + + + + + + + + + + + + + + + +
+

Struct ansi_term::ANSIString + + [] + + [src]

+
pub struct ANSIString<'a> {
+    // some fields omitted
+}

An ANSI String is a string coupled with the Style to display it +in a terminal.

+ +

Although not technically a string itself, it can be turned into +one with the to_string method.

+ +

Examples

+
+use ansi_term::ANSIString;
+use ansi_term::Colour::Red;
+
+let red_string = Red.paint("a red string");
+println!("{}", red_string);
+ +
+use ansi_term::ANSIString;
+
+let plain_string = ANSIString::from("a plain string");
+assert_eq!(&*plain_string, "a plain string");
+

Methods from Deref<Target=str>

1.0.0fn len(&self) -> usize

+

Returns the length of self.

+ +

This length is in bytes, not chars or graphemes. In other words, +it may not be what a human considers the length of the string.

+ +

Examples

+

Basic usage:

+ +
+let len = "foo".len();
+assert_eq!(3, len);
+
+let len = "ƒoo".len(); // fancy f!
+assert_eq!(4, len);
+

1.0.0fn is_empty(&self) -> bool

+

Returns true if this slice has a length of zero bytes.

+ +

Examples

+

Basic usage:

+ +
+let s = "";
+assert!(s.is_empty());
+
+let s = "not empty";
+assert!(!s.is_empty());
+

fn is_char_boundary(&self, index: usize) -> bool

+
Unstable (str_char)

: it is unclear whether this method pulls its weight with the existence of the char_indices iterator or this method may want to be replaced with checked slicing

+

Checks that index-th byte lies at the start and/or end of a +UTF-8 code point sequence.

+ +

The start and end of the string (when index == self.len()) are +considered to be +boundaries.

+ +

Returns false if index is greater than self.len().

+ +

Examples

+
+#![feature(str_char)]
+
+let s = "Löwe 老虎 Léopard";
+assert!(s.is_char_boundary(0));
+// start of `老`
+assert!(s.is_char_boundary(6));
+assert!(s.is_char_boundary(s.len()));
+
+// second byte of `ö`
+assert!(!s.is_char_boundary(2));
+
+// third byte of `老`
+assert!(!s.is_char_boundary(8));
+

1.0.0fn as_bytes(&self) -> &[u8]

+

Converts a string slice to a byte slice.

+ +

Examples

+

Basic usage:

+ +
+let bytes = "bors".as_bytes();
+assert_eq!(b"bors", bytes);
+

1.0.0fn as_ptr(&self) -> *const u8

+

Converts a string slice to a raw pointer.

+ +

As string slices are a slice of bytes, the raw pointer points to a +u8. This pointer will be pointing to the first byte of the string +slice.

+ +

Examples

+

Basic usage:

+ +
+let s = "Hello";
+let ptr = s.as_ptr();
+

1.0.0unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str

+

Creates a string slice from another string slice, bypassing safety +checks.

+ +

This new slice goes from begin to end, including begin but +excluding end.

+ +

To get a mutable string slice instead, see the +slice_mut_unchecked() method.

+ +

Safety

+

Callers of this function are responsible that three preconditions are +satisfied:

+ +
    +
  • begin must come before end.
  • +
  • begin and end must be byte positions within the string slice.
  • +
  • begin and end must lie on UTF-8 sequence boundaries.
  • +
+ +

Examples

+

Basic usage:

+ +
+let s = "Löwe 老虎 Léopard";
+
+unsafe {
+    assert_eq!("Löwe 老虎 Léopard", s.slice_unchecked(0, 21));
+}
+
+let s = "Hello, world!";
+
+unsafe {
+    assert_eq!("world", s.slice_unchecked(7, 12));
+}
+

1.5.0unsafe fn slice_mut_unchecked(&mut self, begin: usize, end: usize) -> &mut str

+

Creates a string slice from another string slice, bypassing safety +checks.

+ +

This new slice goes from begin to end, including begin but +excluding end.

+ +

To get an immutable string slice instead, see the +slice_unchecked() method.

+ +

Safety

+

Callers of this function are responsible that three preconditions are +satisfied:

+ +
    +
  • begin must come before end.
  • +
  • begin and end must be byte positions within the string slice.
  • +
  • begin and end must lie on UTF-8 sequence boundaries.
  • +
+

fn char_range_at(&self, start: usize) -> CharRange

+
Unstable (str_char)

: often replaced by char_indices, this method may be removed in favor of just char_at() or eventually removed altogether

+

Given a byte position, returns the next char and its index.

+ +

Panics

+

If i is greater than or equal to the length of the string. +If i is not the index of the beginning of a valid UTF-8 sequence.

+ +

Examples

+

This example manually iterates through the code points of a string; +this should normally be +done by .chars() or .char_indices().

+ +
+#![feature(str_char)]
+
+use std::str::CharRange;
+
+let s = "中华Việt Nam";
+let mut i = 0;
+while i < s.len() {
+    let CharRange {ch, next} = s.char_range_at(i);
+    println!("{}: {}", i, ch);
+    i = next;
+}
+ +

This outputs:

+ +
0: 中
+3: 华
+6: V
+7: i
+8: e
+9:
+11:
+13: t
+14:
+15: N
+16: a
+17: m
+
+

fn char_range_at_reverse(&self, start: usize) -> CharRange

+
Unstable (str_char)

: often replaced by char_indices, this method may be removed in favor of just char_at_reverse() or eventually removed altogether

+

Given a byte position, returns the previous char and its position.

+ +

Note that Unicode has many features, such as combining marks, ligatures, +and direction marks, that need to be taken into account to correctly reverse a string.

+ +

Returns 0 for next index if called on start index 0.

+ +

Panics

+

If i is greater than the length of the string. +If i is not an index following a valid UTF-8 sequence.

+ +

Examples

+

This example manually iterates through the code points of a string; +this should normally be +done by .chars().rev() or .char_indices().

+ +
+#![feature(str_char)]
+
+use std::str::CharRange;
+
+let s = "中华Việt Nam";
+let mut i = s.len();
+while i > 0 {
+    let CharRange {ch, next} = s.char_range_at_reverse(i);
+    println!("{}: {}", i, ch);
+    i = next;
+}
+ +

This outputs:

+ +
18: m
+17: a
+16: N
+15:
+14: t
+13:
+11:
+9: e
+8: i
+7: V
+6: 华
+3: 中
+
+

fn char_at(&self, i: usize) -> char

+
Unstable (str_char)

: frequently replaced by the chars() iterator, this method may be removed or possibly renamed in the future; it is normally replaced by chars/char_indices iterators or by getting the first char from a subslice

+

Given a byte position, returns the char at that position.

+ +

Panics

+

If i is greater than or equal to the length of the string. +If i is not the index of the beginning of a valid UTF-8 sequence.

+ +

Examples

+
+#![feature(str_char)]
+
+let s = "abπc";
+assert_eq!(s.char_at(1), 'b');
+assert_eq!(s.char_at(2), 'π');
+assert_eq!(s.char_at(4), 'c');
+

fn char_at_reverse(&self, i: usize) -> char

+
Unstable (str_char)

: see char_at for more details, but reverse semantics are also somewhat unclear, especially with which cases generate panics

+

Given a byte position, returns the char at that position, counting +from the end.

+ +

Panics

+

If i is greater than the length of the string. +If i is not an index following a valid UTF-8 sequence.

+ +

Examples

+
+#![feature(str_char)]
+
+let s = "abπc";
+assert_eq!(s.char_at_reverse(1), 'a');
+assert_eq!(s.char_at_reverse(2), 'b');
+assert_eq!(s.char_at_reverse(3), 'π');
+

fn slice_shift_char(&self) -> Option<(char, &str)>

+
Unstable (str_char)

: awaiting conventions about shifting and slices and may not be warranted with the existence of the chars and/or char_indices iterators

+

Retrieves the first char from a &str and returns it.

+ +

Note that a single Unicode character (grapheme cluster) +can be composed of multiple chars.

+ +

This does not allocate a new string; instead, it returns a slice that +points one code point beyond the code point that was shifted.

+ +

None is returned if the slice is empty.

+ +

Examples

+
+#![feature(str_char)]
+
+let s = "Łódź"; // \u{141}o\u{301}dz\u{301}
+let (c, s1) = s.slice_shift_char().unwrap();
+
+assert_eq!(c, 'Ł');
+assert_eq!(s1, "ódź");
+
+let (c, s2) = s1.slice_shift_char().unwrap();
+
+assert_eq!(c, 'o');
+assert_eq!(s2, "\u{301}dz\u{301}");
+

1.4.0fn split_at(&self, mid: usize) -> (&str, &str)

+

Divide one string slice into two at an index.

+ +

The argument, mid, should be a byte offset from the start of the +string. It must also be on the boundary of a UTF-8 code point.

+ +

The two slices returned go from the start of the string slice to mid, +and from mid to the end of the string slice.

+ +

To get mutable string slices instead, see the split_at_mut() +method.

+ +

Panics

+

Panics if mid is not on a UTF-8 code point boundary, or if it is +beyond the last code point of the string slice.

+ +

Examples

+

Basic usage:

+ +
+let s = "Per Martin-Löf";
+
+let (first, last) = s.split_at(3);
+
+assert_eq!("Per", first);
+assert_eq!(" Martin-Löf", last);
+

1.4.0fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str)

+

Divide one mutable string slice into two at an index.

+ +

The argument, mid, should be a byte offset from the start of the +string. It must also be on the boundary of a UTF-8 code point.

+ +

The two slices returned go from the start of the string slice to mid, +and from mid to the end of the string slice.

+ +

To get immutable string slices instead, see the split_at() method.

+ +

Panics

+

Panics if mid is not on a UTF-8 code point boundary, or if it is +beyond the last code point of the string slice.

+ +

Examples

+

Basic usage:

+ +
+let s = "Per Martin-Löf";
+
+let (first, last) = s.split_at(3);
+
+assert_eq!("Per", first);
+assert_eq!(" Martin-Löf", last);
+

1.0.0fn chars(&self) -> Chars

+

Returns an iterator over the chars of a string slice.

+ +

As a string slice consists of valid UTF-8, we can iterate through a +string slice by char. This method returns such an iterator.

+ +

It's important to remember that char represents a Unicode Scalar +Value, and may not match your idea of what a 'character' is. Iteration +over grapheme clusters may be what you actually want.

+ +

Examples

+

Basic usage:

+ +
+let word = "goodbye";
+
+let count = word.chars().count();
+assert_eq!(7, count);
+
+let mut chars = word.chars();
+
+assert_eq!(Some('g'), chars.next());
+assert_eq!(Some('o'), chars.next());
+assert_eq!(Some('o'), chars.next());
+assert_eq!(Some('d'), chars.next());
+assert_eq!(Some('b'), chars.next());
+assert_eq!(Some('y'), chars.next());
+assert_eq!(Some('e'), chars.next());
+
+assert_eq!(None, chars.next());
+ +

Remember, chars may not match your human intuition about characters:

+ +
+let y = "y̆";
+
+let mut chars = y.chars();
+
+assert_eq!(Some('y'), chars.next()); // not 'y̆'
+assert_eq!(Some('\u{0306}'), chars.next());
+
+assert_eq!(None, chars.next());
+

1.0.0fn char_indices(&self) -> CharIndices

+

Returns an iterator over the chars of a string slice, and their +positions.

+ +

As a string slice consists of valid UTF-8, we can iterate through a +string slice by char. This method returns an iterator of both +these chars, as well as their byte positions.

+ +

The iterator yields tuples. The position is first, the char is +second.

+ +

Examples

+

Basic usage:

+ +
+let word = "goodbye";
+
+let count = word.char_indices().count();
+assert_eq!(7, count);
+
+let mut char_indices = word.char_indices();
+
+assert_eq!(Some((0, 'g')), char_indices.next());
+assert_eq!(Some((1, 'o')), char_indices.next());
+assert_eq!(Some((2, 'o')), char_indices.next());
+assert_eq!(Some((3, 'd')), char_indices.next());
+assert_eq!(Some((4, 'b')), char_indices.next());
+assert_eq!(Some((5, 'y')), char_indices.next());
+assert_eq!(Some((6, 'e')), char_indices.next());
+
+assert_eq!(None, char_indices.next());
+ +

Remember, chars may not match your human intuition about characters:

+ +
+let y = "y̆";
+
+let mut char_indices = y.char_indices();
+
+assert_eq!(Some((0, 'y')), char_indices.next()); // not (0, 'y̆')
+assert_eq!(Some((1, '\u{0306}')), char_indices.next());
+
+assert_eq!(None, char_indices.next());
+

1.0.0fn bytes(&self) -> Bytes

+

An iterator over the bytes of a string slice.

+ +

As a string slice consists of a sequence of bytes, we can iterate +through a string slice by byte. This method returns such an iterator.

+ +

Examples

+

Basic usage:

+ +
+let mut bytes = "bors".bytes();
+
+assert_eq!(Some(b'b'), bytes.next());
+assert_eq!(Some(b'o'), bytes.next());
+assert_eq!(Some(b'r'), bytes.next());
+assert_eq!(Some(b's'), bytes.next());
+
+assert_eq!(None, bytes.next());
+

1.1.0fn split_whitespace(&self) -> SplitWhitespace

+

Split a string slice by whitespace.

+ +

The iterator returned will return string slices that are sub-slices of +the original string slice, separated by any amount of whitespace.

+ +

'Whitespace' is defined according to the terms of the Unicode Derived +Core Property White_Space.

+ +

Examples

+

Basic usage:

+ +
+let mut iter = "A few words".split_whitespace();
+
+assert_eq!(Some("A"), iter.next());
+assert_eq!(Some("few"), iter.next());
+assert_eq!(Some("words"), iter.next());
+
+assert_eq!(None, iter.next());
+ +

All kinds of whitespace are considered:

+ +
+let mut iter = " Mary   had\ta\u{2009}little  \n\t lamb".split_whitespace();
+assert_eq!(Some("Mary"), iter.next());
+assert_eq!(Some("had"), iter.next());
+assert_eq!(Some("a"), iter.next());
+assert_eq!(Some("little"), iter.next());
+assert_eq!(Some("lamb"), iter.next());
+
+assert_eq!(None, iter.next());
+

1.0.0fn lines(&self) -> Lines

+

An iterator over the lines of a string, as string slices.

+ +

Lines are ended with either a newline (\n) or a carriage return with +a line feed (\r\n).

+ +

The final line ending is optional.

+ +

Examples

+

Basic usage:

+ +
+let text = "foo\r\nbar\n\nbaz\n";
+let mut lines = text.lines();
+
+assert_eq!(Some("foo"), lines.next());
+assert_eq!(Some("bar"), lines.next());
+assert_eq!(Some(""), lines.next());
+assert_eq!(Some("baz"), lines.next());
+
+assert_eq!(None, lines.next());
+ +

The final line ending isn't required:

+ +
+let text = "foo\nbar\n\r\nbaz";
+let mut lines = text.lines();
+
+assert_eq!(Some("foo"), lines.next());
+assert_eq!(Some("bar"), lines.next());
+assert_eq!(Some(""), lines.next());
+assert_eq!(Some("baz"), lines.next());
+
+assert_eq!(None, lines.next());
+

1.0.0fn lines_any(&self) -> LinesAny

+
Deprecated since 1.4.0

: use lines() instead now

+

An iterator over the lines of a string.

+

fn utf16_units(&self) -> EncodeUtf16

+
Deprecated since 1.8.0

: renamed to encode_utf16

+

Returns an iterator of u16 over the string encoded as UTF-16.

+

1.8.0fn encode_utf16(&self) -> EncodeUtf16

+

Returns an iterator of u16 over the string encoded as UTF-16.

+

1.0.0fn contains<'a, P>(&'a self, pat: P) -> bool where P: Pattern<'a>

+

Returns true if the given pattern matches a sub-slice of +this string slice.

+ +

Returns false if it does not.

+ +

Examples

+

Basic usage:

+ +
+let bananas = "bananas";
+
+assert!(bananas.contains("nana"));
+assert!(!bananas.contains("apples"));
+

1.0.0fn starts_with<'a, P>(&'a self, pat: P) -> bool where P: Pattern<'a>

+

Returns true if the given pattern matches a prefix of this +string slice.

+ +

Returns false if it does not.

+ +

Examples

+

Basic usage:

+ +
+let bananas = "bananas";
+
+assert!(bananas.starts_with("bana"));
+assert!(!bananas.starts_with("nana"));
+

1.0.0fn ends_with<'a, P>(&'a self, pat: P) -> bool where P: Pattern<'a>, P::Searcher: ReverseSearcher<'a>

+

Returns true if the given pattern matches a suffix of this +string slice.

+ +

Returns false if it does not.

+ +

Examples

+

Basic usage:

+ +
+let bananas = "bananas";
+
+assert!(bananas.ends_with("anas"));
+assert!(!bananas.ends_with("nana"));
+

1.0.0fn find<'a, P>(&'a self, pat: P) -> Option<usize> where P: Pattern<'a>

+

Returns the byte index of the first character of this string slice that +matches the pattern.

+ +

Returns None if the pattern doesn't match.

+ +

The pattern can be a &str, char, or a closure that determines if +a character matches.

+ +

Examples

+

Simple patterns:

+ +
+let s = "Löwe 老虎 Léopard";
+
+assert_eq!(s.find('L'), Some(0));
+assert_eq!(s.find('é'), Some(14));
+assert_eq!(s.find("Léopard"), Some(13));
+ +

More complex patterns with closures:

+ +
+let s = "Löwe 老虎 Léopard";
+
+assert_eq!(s.find(char::is_whitespace), Some(5));
+assert_eq!(s.find(char::is_lowercase), Some(1));
+ +

Not finding the pattern:

+ +
+let s = "Löwe 老虎 Léopard";
+let x: &[_] = &['1', '2'];
+
+assert_eq!(s.find(x), None);
+

1.0.0fn rfind<'a, P>(&'a self, pat: P) -> Option<usize> where P: Pattern<'a>, P::Searcher: ReverseSearcher<'a>

+

Returns the byte index of the last character of this string slice that +matches the pattern.

+ +

Returns None if the pattern doesn't match.

+ +

The pattern can be a &str, char, or a closure that determines if +a character matches.

+ +

Examples

+

Simple patterns:

+ +
+let s = "Löwe 老虎 Léopard";
+
+assert_eq!(s.rfind('L'), Some(13));
+assert_eq!(s.rfind('é'), Some(14));
+ +

More complex patterns with closures:

+ +
+let s = "Löwe 老虎 Léopard";
+
+assert_eq!(s.rfind(char::is_whitespace), Some(12));
+assert_eq!(s.rfind(char::is_lowercase), Some(20));
+ +

Not finding the pattern:

+ +
+let s = "Löwe 老虎 Léopard";
+let x: &[_] = &['1', '2'];
+
+assert_eq!(s.rfind(x), None);
+

1.0.0fn split<'a, P>(&'a self, pat: P) -> Split<'a, P> where P: Pattern<'a>

+

An iterator over substrings of this string slice, separated by +characters matched by a pattern.

+ +

The pattern can be a &str, char, or a closure that determines the +split.

+ +

Iterator behavior

+

The returned iterator will be a DoubleEndedIterator if the pattern +allows a reverse search and forward/reverse search yields the same +elements. This is true for, eg, char but not for &str.

+ +

If the pattern allows a reverse search but its results might differ +from a forward search, the rsplit() method can be used.

+ +

Examples

+

Simple patterns:

+ +
+let v: Vec<&str> = "Mary had a little lamb".split(' ').collect();
+assert_eq!(v, ["Mary", "had", "a", "little", "lamb"]);
+
+let v: Vec<&str> = "".split('X').collect();
+assert_eq!(v, [""]);
+
+let v: Vec<&str> = "lionXXtigerXleopard".split('X').collect();
+assert_eq!(v, ["lion", "", "tiger", "leopard"]);
+
+let v: Vec<&str> = "lion::tiger::leopard".split("::").collect();
+assert_eq!(v, ["lion", "tiger", "leopard"]);
+
+let v: Vec<&str> = "abc1def2ghi".split(char::is_numeric).collect();
+assert_eq!(v, ["abc", "def", "ghi"]);
+
+let v: Vec<&str> = "lionXtigerXleopard".split(char::is_uppercase).collect();
+assert_eq!(v, ["lion", "tiger", "leopard"]);
+ +

A more complex pattern, using a closure:

+ +
+let v: Vec<&str> = "abc1defXghi".split(|c| c == '1' || c == 'X').collect();
+assert_eq!(v, ["abc", "def", "ghi"]);
+ +

If a string contains multiple contiguous separators, you will end up +with empty strings in the output:

+ +
+let x = "||||a||b|c".to_string();
+let d: Vec<_> = x.split('|').collect();
+
+assert_eq!(d, &["", "", "", "", "a", "", "b", "c"]);
+ +

This can lead to possibly surprising behavior when whitespace is used +as the separator. This code is correct:

+ +
+let x = "    a  b c".to_string();
+let d: Vec<_> = x.split(' ').collect();
+
+assert_eq!(d, &["", "", "", "", "a", "", "b", "c"]);
+ +

It does not give you:

+ +
+assert_eq!(d, &["a", "b", "c"]);
+ +

Use split_whitespace() for this behavior.

+

1.0.0fn rsplit<'a, P>(&'a self, pat: P) -> RSplit<'a, P> where P: Pattern<'a>, P::Searcher: ReverseSearcher<'a>

+

An iterator over substrings of the given string slice, separated by +characters matched by a pattern and yielded in reverse order.

+ +

The pattern can be a &str, char, or a closure that determines the +split.

+ +

Iterator behavior

+

The returned iterator requires that the pattern supports a reverse +search, and it will be a DoubleEndedIterator if a forward/reverse +search yields the same elements.

+ +

For iterating from the front, the split() method can be used.

+ +

Examples

+

Simple patterns:

+ +
+let v: Vec<&str> = "Mary had a little lamb".rsplit(' ').collect();
+assert_eq!(v, ["lamb", "little", "a", "had", "Mary"]);
+
+let v: Vec<&str> = "".rsplit('X').collect();
+assert_eq!(v, [""]);
+
+let v: Vec<&str> = "lionXXtigerXleopard".rsplit('X').collect();
+assert_eq!(v, ["leopard", "tiger", "", "lion"]);
+
+let v: Vec<&str> = "lion::tiger::leopard".rsplit("::").collect();
+assert_eq!(v, ["leopard", "tiger", "lion"]);
+ +

A more complex pattern, using a closure:

+ +
+let v: Vec<&str> = "abc1defXghi".rsplit(|c| c == '1' || c == 'X').collect();
+assert_eq!(v, ["ghi", "def", "abc"]);
+

1.0.0fn split_terminator<'a, P>(&'a self, pat: P) -> SplitTerminator<'a, P> where P: Pattern<'a>

+

An iterator over substrings of the given string slice, separated by +characters matched by a pattern.

+ +

The pattern can be a &str, char, or a closure that determines the +split.

+ +

Equivalent to split(), except that the trailing substring +is skipped if empty.

+ +

This method can be used for string data that is terminated, +rather than separated by a pattern.

+ +

Iterator behavior

+

The returned iterator will be a DoubleEndedIterator if the pattern +allows a reverse search and forward/reverse search yields the same +elements. This is true for, eg, char but not for &str.

+ +

If the pattern allows a reverse search but its results might differ +from a forward search, the rsplit_terminator() method can be used.

+ +

Examples

+

Basic usage:

+ +
+let v: Vec<&str> = "A.B.".split_terminator('.').collect();
+assert_eq!(v, ["A", "B"]);
+
+let v: Vec<&str> = "A..B..".split_terminator(".").collect();
+assert_eq!(v, ["A", "", "B", ""]);
+

1.0.0fn rsplit_terminator<'a, P>(&'a self, pat: P) -> RSplitTerminator<'a, P> where P: Pattern<'a>, P::Searcher: ReverseSearcher<'a>

+

An iterator over substrings of self, separated by characters +matched by a pattern and yielded in reverse order.

+ +

The pattern can be a simple &str, char, or a closure that +determines the split. +Additional libraries might provide more complex patterns like +regular expressions.

+ +

Equivalent to split(), except that the trailing substring is +skipped if empty.

+ +

This method can be used for string data that is terminated, +rather than separated by a pattern.

+ +

Iterator behavior

+

The returned iterator requires that the pattern supports a +reverse search, and it will be double ended if a forward/reverse +search yields the same elements.

+ +

For iterating from the front, the split_terminator() method can be +used.

+ +

Examples

+
+let v: Vec<&str> = "A.B.".rsplit_terminator('.').collect();
+assert_eq!(v, ["B", "A"]);
+
+let v: Vec<&str> = "A..B..".rsplit_terminator(".").collect();
+assert_eq!(v, ["", "B", "", "A"]);
+

1.0.0fn splitn<'a, P>(&'a self, count: usize, pat: P) -> SplitN<'a, P> where P: Pattern<'a>

+

An iterator over substrings of the given string slice, separated by a +pattern, restricted to returning at most count items.

+ +

The last element returned, if any, will contain the remainder of the +string slice.

+ +

The pattern can be a &str, char, or a closure that determines the +split.

+ +

Iterator behavior

+

The returned iterator will not be double ended, because it is +not efficient to support.

+ +

If the pattern allows a reverse search, the rsplitn() method can be +used.

+ +

Examples

+

Simple patterns:

+ +
+let v: Vec<&str> = "Mary had a little lambda".splitn(3, ' ').collect();
+assert_eq!(v, ["Mary", "had", "a little lambda"]);
+
+let v: Vec<&str> = "lionXXtigerXleopard".splitn(3, "X").collect();
+assert_eq!(v, ["lion", "", "tigerXleopard"]);
+
+let v: Vec<&str> = "abcXdef".splitn(1, 'X').collect();
+assert_eq!(v, ["abcXdef"]);
+
+let v: Vec<&str> = "".splitn(1, 'X').collect();
+assert_eq!(v, [""]);
+ +

A more complex pattern, using a closure:

+ +
+let v: Vec<&str> = "abc1defXghi".splitn(2, |c| c == '1' || c == 'X').collect();
+assert_eq!(v, ["abc", "defXghi"]);
+

1.0.0fn rsplitn<'a, P>(&'a self, count: usize, pat: P) -> RSplitN<'a, P> where P: Pattern<'a>, P::Searcher: ReverseSearcher<'a>

+

An iterator over substrings of this string slice, separated by a +pattern, starting from the end of the string, restricted to returning +at most count items.

+ +

The last element returned, if any, will contain the remainder of the +string slice.

+ +

The pattern can be a &str, char, or a closure that +determines the split.

+ +

Iterator behavior

+

The returned iterator will not be double ended, because it is not +efficient to support.

+ +

For splitting from the front, the splitn() method can be used.

+ +

Examples

+

Simple patterns:

+ +
+let v: Vec<&str> = "Mary had a little lamb".rsplitn(3, ' ').collect();
+assert_eq!(v, ["lamb", "little", "Mary had a"]);
+
+let v: Vec<&str> = "lionXXtigerXleopard".rsplitn(3, 'X').collect();
+assert_eq!(v, ["leopard", "tiger", "lionX"]);
+
+let v: Vec<&str> = "lion::tiger::leopard".rsplitn(2, "::").collect();
+assert_eq!(v, ["leopard", "lion::tiger"]);
+ +

A more complex pattern, using a closure:

+ +
+let v: Vec<&str> = "abc1defXghi".rsplitn(2, |c| c == '1' || c == 'X').collect();
+assert_eq!(v, ["ghi", "abc1def"]);
+

1.2.0fn matches<'a, P>(&'a self, pat: P) -> Matches<'a, P> where P: Pattern<'a>

+

An iterator over the matches of a pattern within the given string +slice.

+ +

The pattern can be a &str, char, or a closure that +determines if a character matches.

+ +

Iterator behavior

+

The returned iterator will be a DoubleEndedIterator if the pattern +allows a reverse search and forward/reverse search yields the same +elements. This is true for, eg, char but not for &str.

+ +

If the pattern allows a reverse search but its results might differ +from a forward search, the rmatches() method can be used.

+ +

Examples

+

Basic usage:

+ +
+let v: Vec<&str> = "abcXXXabcYYYabc".matches("abc").collect();
+assert_eq!(v, ["abc", "abc", "abc"]);
+
+let v: Vec<&str> = "1abc2abc3".matches(char::is_numeric).collect();
+assert_eq!(v, ["1", "2", "3"]);
+

1.2.0fn rmatches<'a, P>(&'a self, pat: P) -> RMatches<'a, P> where P: Pattern<'a>, P::Searcher: ReverseSearcher<'a>

+

An iterator over the matches of a pattern within this string slice, +yielded in reverse order.

+ +

The pattern can be a &str, char, or a closure that determines if +a character matches.

+ +

Iterator behavior

+

The returned iterator requires that the pattern supports a reverse +search, and it will be a DoubleEndedIterator if a forward/reverse +search yields the same elements.

+ +

For iterating from the front, the matches() method can be used.

+ +

Examples

+

Basic usage:

+ +
+let v: Vec<&str> = "abcXXXabcYYYabc".rmatches("abc").collect();
+assert_eq!(v, ["abc", "abc", "abc"]);
+
+let v: Vec<&str> = "1abc2abc3".rmatches(char::is_numeric).collect();
+assert_eq!(v, ["3", "2", "1"]);
+

1.5.0fn match_indices<'a, P>(&'a self, pat: P) -> MatchIndices<'a, P> where P: Pattern<'a>

+

An iterator over the disjoint matches of a pattern within this string +slice as well as the index that the match starts at.

+ +

For matches of pat within self that overlap, only the indices +corresponding to the first match are returned.

+ +

The pattern can be a &str, char, or a closure that determines +if a character matches.

+ +

Iterator behavior

+

The returned iterator will be a DoubleEndedIterator if the pattern +allows a reverse search and forward/reverse search yields the same +elements. This is true for, eg, char but not for &str.

+ +

If the pattern allows a reverse search but its results might differ +from a forward search, the rmatch_indices() method can be used.

+ +

Examples

+

Basic usage:

+ +
+let v: Vec<_> = "abcXXXabcYYYabc".match_indices("abc").collect();
+assert_eq!(v, [(0, "abc"), (6, "abc"), (12, "abc")]);
+
+let v: Vec<_> = "1abcabc2".match_indices("abc").collect();
+assert_eq!(v, [(1, "abc"), (4, "abc")]);
+
+let v: Vec<_> = "ababa".match_indices("aba").collect();
+assert_eq!(v, [(0, "aba")]); // only the first `aba`
+

1.5.0fn rmatch_indices<'a, P>(&'a self, pat: P) -> RMatchIndices<'a, P> where P: Pattern<'a>, P::Searcher: ReverseSearcher<'a>

+

An iterator over the disjoint matches of a pattern within self, +yielded in reverse order along with the index of the match.

+ +

For matches of pat within self that overlap, only the indices +corresponding to the last match are returned.

+ +

The pattern can be a &str, char, or a closure that determines if a +character matches.

+ +

Iterator behavior

+

The returned iterator requires that the pattern supports a reverse +search, and it will be a DoubleEndedIterator if a forward/reverse +search yields the same elements.

+ +

For iterating from the front, the match_indices() method can be used.

+ +

Examples

+

Basic usage:

+ +
+let v: Vec<_> = "abcXXXabcYYYabc".rmatch_indices("abc").collect();
+assert_eq!(v, [(12, "abc"), (6, "abc"), (0, "abc")]);
+
+let v: Vec<_> = "1abcabc2".rmatch_indices("abc").collect();
+assert_eq!(v, [(4, "abc"), (1, "abc")]);
+
+let v: Vec<_> = "ababa".rmatch_indices("aba").collect();
+assert_eq!(v, [(2, "aba")]); // only the last `aba`
+

1.0.0fn trim(&self) -> &str

+

Returns a string slice with leading and trailing whitespace removed.

+ +

'Whitespace' is defined according to the terms of the Unicode Derived +Core Property White_Space.

+ +

Examples

+

Basic usage:

+ +
+let s = " Hello\tworld\t";
+
+assert_eq!("Hello\tworld", s.trim());
+

1.0.0fn trim_left(&self) -> &str

+

Returns a string slice with leading whitespace removed.

+ +

'Whitespace' is defined according to the terms of the Unicode Derived +Core Property White_Space.

+ +

Text directionality

+

A string is a sequence of bytes. 'Left' in this context means the first +position of that byte string; for a language like Arabic or Hebrew +which are 'right to left' rather than 'left to right', this will be +the right side, not the left.

+ +

Examples

+

Basic usage:

+ +
+let s = " Hello\tworld\t";
+
+assert_eq!("Hello\tworld\t", s.trim_left());
+ +

Directionality:

+ +
+let s = "  English";
+assert!(Some('E') == s.trim_left().chars().next());
+
+let s = "  עברית";
+assert!(Some('ע') == s.trim_left().chars().next());
+

1.0.0fn trim_right(&self) -> &str

+

Returns a string slice with trailing whitespace removed.

+ +

'Whitespace' is defined according to the terms of the Unicode Derived +Core Property White_Space.

+ +

Text directionality

+

A string is a sequence of bytes. 'Right' in this context means the last +position of that byte string; for a language like Arabic or Hebrew +which are 'right to left' rather than 'left to right', this will be +the left side, not the right.

+ +

Examples

+

Basic usage:

+ +
+let s = " Hello\tworld\t";
+
+assert_eq!(" Hello\tworld", s.trim_right());
+ +

Directionality:

+ +
+let s = "English  ";
+assert!(Some('h') == s.trim_right().chars().rev().next());
+
+let s = "עברית  ";
+assert!(Some('ת') == s.trim_right().chars().rev().next());
+

1.0.0fn trim_matches<'a, P>(&'a self, pat: P) -> &'a str where P: Pattern<'a>, P::Searcher: DoubleEndedSearcher<'a>

+

Returns a string slice with all prefixes and suffixes that match a +pattern repeatedly removed.

+ +

The pattern can be a &str, char, or a closure that determines +if a character matches.

+ +

Examples

+

Simple patterns:

+ +
+assert_eq!("11foo1bar11".trim_matches('1'), "foo1bar");
+assert_eq!("123foo1bar123".trim_matches(char::is_numeric), "foo1bar");
+
+let x: &[_] = &['1', '2'];
+assert_eq!("12foo1bar12".trim_matches(x), "foo1bar");
+ +

A more complex pattern, using a closure:

+ +
+assert_eq!("1foo1barXX".trim_matches(|c| c == '1' || c == 'X'), "foo1bar");
+

1.0.0fn trim_left_matches<'a, P>(&'a self, pat: P) -> &'a str where P: Pattern<'a>

+

Returns a string slice with all prefixes that match a pattern +repeatedly removed.

+ +

The pattern can be a &str, char, or a closure that determines if +a character matches.

+ +

Text directionality

+

A string is a sequence of bytes. 'Left' in this context means the first +position of that byte string; for a language like Arabic or Hebrew +which are 'right to left' rather than 'left to right', this will be +the right side, not the left.

+ +

Examples

+

Basic usage:

+ +
+assert_eq!("11foo1bar11".trim_left_matches('1'), "foo1bar11");
+assert_eq!("123foo1bar123".trim_left_matches(char::is_numeric), "foo1bar123");
+
+let x: &[_] = &['1', '2'];
+assert_eq!("12foo1bar12".trim_left_matches(x), "foo1bar12");
+

1.0.0fn trim_right_matches<'a, P>(&'a self, pat: P) -> &'a str where P: Pattern<'a>, P::Searcher: ReverseSearcher<'a>

+

Returns a string slice with all suffixes that match a pattern +repeatedly removed.

+ +

The pattern can be a &str, char, or a closure that +determines if a character matches.

+ +

Text directionality

+

A string is a sequence of bytes. 'Right' in this context means the last +position of that byte string; for a language like Arabic or Hebrew +which are 'right to left' rather than 'left to right', this will be +the left side, not the right.

+ +

Examples

+

Simple patterns:

+ +
+assert_eq!("11foo1bar11".trim_right_matches('1'), "11foo1bar");
+assert_eq!("123foo1bar123".trim_right_matches(char::is_numeric), "123foo1bar");
+
+let x: &[_] = &['1', '2'];
+assert_eq!("12foo1bar12".trim_right_matches(x), "12foo1bar");
+ +

A more complex pattern, using a closure:

+ +
+assert_eq!("1fooX".trim_left_matches(|c| c == '1' || c == 'X'), "fooX");
+

1.0.0fn parse<F>(&self) -> Result<F, F::Err> where F: FromStr

+

Parses this string slice into another type.

+ +

Because parse() is so general, it can cause problems with type +inference. As such, parse() is one of the few times you'll see +the syntax affectionately known as the 'turbofish': ::<>. This +helps the inference algorithm understand specifically which type +you're trying to parse into.

+ +

parse() can parse any type that implements the FromStr trait.

+ +

Errors

+

Will return Err if it's not possible to parse this string slice into +the desired type.

+ +

Example

+

Basic usage

+ +
+let four: u32 = "4".parse().unwrap();
+
+assert_eq!(4, four);
+ +

Using the 'turbofish' instead of annotating four:

+ +
+let four = "4".parse::<u32>();
+
+assert_eq!(Ok(4), four);
+ +

Failing to parse:

+ +
+let nope = "j".parse::<u32>();
+
+assert!(nope.is_err());
+

1.0.0fn replace<'a, P>(&'a self, from: P, to: &str) -> String where P: Pattern<'a>

+

Replaces all matches of a pattern with another string.

+ +

replace creates a new String, and copies the data from this string slice into it. +While doing so, it attempts to find matches of a pattern. If it finds any, it +replaces them with the replacement string slice.

+ +

Examples

+

Basic usage:

+ +
+let s = "this is old";
+
+assert_eq!("this is new", s.replace("old", "new"));
+ +

When the pattern doesn't match:

+ +
+let s = "this is old";
+assert_eq!(s, s.replace("cookie monster", "little lamb"));
+

1.2.0fn to_lowercase(&self) -> String

+

Returns the lowercase equivalent of this string slice, as a new String.

+ +

'Lowercase' is defined according to the terms of the Unicode Derived Core Property +Lowercase.

+ +

Examples

+

Basic usage:

+ +
+let s = "HELLO";
+
+assert_eq!("hello", s.to_lowercase());
+ +

A tricky example, with sigma:

+ +
+let sigma = "Σ";
+
+assert_eq!("σ", sigma.to_lowercase());
+
+// but at the end of a word, it's ς, not σ:
+let odysseus = "ὈΔΥΣΣΕΎΣ";
+
+assert_eq!("ὀδυσσεύς", odysseus.to_lowercase());
+ +

Languages without case are not changed:

+ +
+let new_year = "农历新年";
+
+assert_eq!(new_year, new_year.to_lowercase());
+

1.2.0fn to_uppercase(&self) -> String

+

Returns the uppercase equivalent of this string slice, as a new String.

+ +

'Uppercase' is defined according to the terms of the Unicode Derived Core Property +Uppercase.

+ +

Examples

+

Basic usage:

+ +
+let s = "hello";
+
+assert_eq!("HELLO", s.to_uppercase());
+ +

Scripts without case are not changed:

+ +
+let new_year = "农历新年";
+
+assert_eq!(new_year, new_year.to_uppercase());
+

fn escape_default(&self) -> String

+
Unstable (str_escape)

: return type may change to be an iterator

+

Escapes each char in s with char::escape_default.

+

fn escape_unicode(&self) -> String

+
Unstable (str_escape)

: return type may change to be an iterator

+

Escapes each char in s with char::escape_unicode.

+

1.4.0fn into_string(self: Box<str>) -> String

+

Converts a Box<str> into a String without copying or allocating.

+ +

Examples

+

Basic usage:

+ +
+let string = String::from("birthday gift");
+let boxed_str = string.clone().into_boxed_str();
+
+assert_eq!(boxed_str.into_string(), string);
+

Trait Implementations

impl<'a> Display for ANSIString<'a>

fn fmt(&self, f: &mut Formatter) -> Result

+

impl<'a, S> From<S> for ANSIString<'a> where S: Into<Cow<'a, str>>

fn from(input: S) -> ANSIString<'a>

+

impl<'a> Deref for ANSIString<'a>

type Target = str

+

fn deref(&self) -> &str

+

Derived Implementations

impl<'a> Clone for ANSIString<'a>

fn clone(&self) -> ANSIString<'a>

+

1.0.0fn clone_from(&mut self, source: &Self)

+

impl<'a> Debug for ANSIString<'a>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+

impl<'a> PartialEq for ANSIString<'a>

fn eq(&self, __arg_0: &ANSIString<'a>) -> bool

+

fn ne(&self, __arg_0: &ANSIString<'a>) -> bool

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/ansi_term/struct.ANSIStrings.html b/doc/ansi_term/struct.ANSIStrings.html new file mode 100644 index 00000000..43a62868 --- /dev/null +++ b/doc/ansi_term/struct.ANSIStrings.html @@ -0,0 +1,114 @@ + + + + + + + + + + ansi_term::ANSIStrings - Rust + + + + + + + + + + + + + + + + +
+

Struct ansi_term::ANSIStrings + + [] + + [src]

+
pub struct ANSIStrings<'a>(pub &'a [ANSIString<'a>]);

A set of ANSIStrings collected together, in order to be written with a +minimum of control characters.

+

Trait Implementations

impl<'a> Display for ANSIStrings<'a>

fn fmt(&self, f: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/ansi_term/struct.Style.html b/doc/ansi_term/struct.Style.html new file mode 100644 index 00000000..e98c82ab --- /dev/null +++ b/doc/ansi_term/struct.Style.html @@ -0,0 +1,141 @@ + + + + + + + + + + ansi_term::Style - Rust + + + + + + + + + + + + + + + + +
+

Struct ansi_term::Style + + [] + + [src]

+
pub struct Style {
+    // some fields omitted
+}

A style is a collection of properties that can format a string +using ANSI escape codes.

+

Methods

impl Style

fn new() -> Style

+

Creates a new Style with no differences.

+

fn paint<'a, S>(self, input: S) -> ANSIString<'a> where S: Into<Cow<'a, str>>

+

Paints the given text with this colour, returning an ANSI string.

+

fn bold(&self) -> Style

+

Returns a Style with the bold property set.

+

fn dimmed(&self) -> Style

+

Returns a Style with the dimmed property set.

+

fn italic(&self) -> Style

+

Returns a Style with the italic property set.

+

fn underline(&self) -> Style

+

Returns a Style with the underline property set.

+
+

Returns a Style with the blink property set.

+

fn reverse(&self) -> Style

+

Returns a Style with the reverse property set.

+

fn hidden(&self) -> Style

+

Returns a Style with the hidden property set.

+

fn on(&self, background: Colour) -> Style

+

Returns a Style with the background colour property set.

+

Trait Implementations

impl Default for Style

fn default() -> Style

+

Derived Implementations

impl Debug for Style

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+

impl Copy for Style

impl Clone for Style

fn clone(&self) -> Style

+

1.0.0fn clone_from(&mut self, source: &Self)

+

impl PartialEq for Style

fn eq(&self, __arg_0: &Style) -> bool

+

fn ne(&self, __arg_0: &Style) -> bool

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/bit_vec/index.html b/doc/bit_vec/index.html new file mode 100644 index 00000000..34463c71 --- /dev/null +++ b/doc/bit_vec/index.html @@ -0,0 +1,203 @@ + + + + + + + + + + bit_vec - Rust + + + + + + + + + + + + + + + + +
+

Crate bit_vec + + [] + + [src]

+

Collections implemented with bit vectors.

+ +

Examples

+

This is a simple example of the Sieve of Eratosthenes +which calculates prime numbers up to a given limit.

+ +
+use bit_vec::BitVec;
+
+let max_prime = 10000;
+
+// Store the primes as a BitVec
+let primes = {
+    // Assume all numbers are prime to begin, and then we
+    // cross off non-primes progressively
+    let mut bv = BitVec::from_elem(max_prime, true);
+
+    // Neither 0 nor 1 are prime
+    bv.set(0, false);
+    bv.set(1, false);
+
+    for i in 2.. 1 + (max_prime as f64).sqrt() as usize {
+        // if i is a prime
+        if bv[i] {
+            // Mark all multiples of i as non-prime (any multiples below i * i
+            // will have been marked as non-prime previously)
+            for j in i.. {
+                if i * j >= max_prime {
+                    break;
+                }
+                bv.set(i * j, false)
+            }
+        }
+    }
+    bv
+};
+
+// Simple primality tests below our max bound
+let print_primes = 20;
+print!("The primes below {} are: ", print_primes);
+for x in 0..print_primes {
+    if primes.get(x).unwrap_or(false) {
+        print!("{} ", x);
+    }
+}
+println!("");
+
+let num_primes = primes.iter().filter(|x| *x).count();
+println!("There are {} primes below {}", num_primes, max_prime);
+assert_eq!(num_primes, 1_229);
+

Structs

+ + + + + + + + + + + + + + + + + + + + +
BitVec +

The bitvector type.

+
Blocks +

An iterator over the blocks of a BitVec.

+
IntoIter + +
Iter +

An iterator for BitVec.

+

Traits

+ + + + + +
BitBlock +

Abstracts over a pile of bits (basically unsigned primitives)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/bit_vec/sidebar-items.js b/doc/bit_vec/sidebar-items.js new file mode 100644 index 00000000..8de5bf7a --- /dev/null +++ b/doc/bit_vec/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["BitVec","The bitvector type."],["Blocks","An iterator over the blocks of a `BitVec`."],["IntoIter",""],["Iter","An iterator for `BitVec`."]],"trait":[["BitBlock","Abstracts over a pile of bits (basically unsigned primitives)"]]}); \ No newline at end of file diff --git a/doc/bit_vec/struct.BitVec.html b/doc/bit_vec/struct.BitVec.html new file mode 100644 index 00000000..7bc562e4 --- /dev/null +++ b/doc/bit_vec/struct.BitVec.html @@ -0,0 +1,537 @@ + + + + + + + + + + bit_vec::BitVec - Rust + + + + + + + + + + + + + + + + +
+

Struct bit_vec::BitVec + + [] + + [src]

+
pub struct BitVec<B = u32> {
+    // some fields omitted
+}

The bitvector type.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::from_elem(10, false);
+
+// insert all primes less than 10
+bv.set(2, true);
+bv.set(3, true);
+bv.set(5, true);
+bv.set(7, true);
+println!("{:?}", bv);
+println!("total bits set to true: {}", bv.iter().filter(|x| *x).count());
+
+// flip all values in bitvector, producing non-primes less than 10
+bv.negate();
+println!("{:?}", bv);
+println!("total bits set to true: {}", bv.iter().filter(|x| *x).count());
+
+// reset bitvector to empty
+bv.clear();
+println!("{:?}", bv);
+println!("total bits set to true: {}", bv.iter().filter(|x| *x).count());
+

Methods

impl BitVec<u32>

fn new() -> Self

+

Creates an empty BitVec.

+ +

Examples

+
+use bit_vec::BitVec;
+let mut bv = BitVec::new();
+

fn from_elem(nbits: usize, bit: bool) -> Self

+

Creates a BitVec that holds nbits elements, setting each element +to bit.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::from_elem(10, false);
+assert_eq!(bv.len(), 10);
+for x in bv.iter() {
+    assert_eq!(x, false);
+}
+

fn with_capacity(nbits: usize) -> Self

+

Constructs a new, empty BitVec with the specified capacity.

+ +

The bitvector will be able to hold at least capacity bits without +reallocating. If capacity is 0, it will not allocate.

+ +

It is important to note that this function does not specify the +length of the returned bitvector, but only the capacity.

+

fn from_bytes(bytes: &[u8]) -> Self

+

Transforms a byte-vector into a BitVec. Each byte becomes eight bits, +with the most significant bits of each byte coming first. Each +bit becomes true if equal to 1 or false if equal to 0.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let bv = BitVec::from_bytes(&[0b10100000, 0b00010010]);
+assert!(bv.eq_vec(&[true, false, true, false,
+                    false, false, false, false,
+                    false, false, false, true,
+                    false, false, true, false]));
+

fn from_fn<F>(len: usize, f: F) -> Self where F: FnMut(usize) -> bool

+

Creates a BitVec of the specified length where the value at each index +is f(index).

+ +

Examples

+
+use bit_vec::BitVec;
+
+let bv = BitVec::from_fn(5, |i| { i % 2 == 0 });
+assert!(bv.eq_vec(&[true, false, true, false, true]));
+

impl<B: BitBlock> BitVec<B>

fn blocks(&self) -> Blocks<B>

+

Iterator over the underlying blocks of data

+

fn storage(&self) -> &[B]

+

Exposes the raw block storage of this BitVec

+ +

Only really intended for BitSet.

+

unsafe fn storage_mut(&mut self) -> &mut Vec<B>

+

Exposes the raw block storage of this BitVec

+ +

Can probably cause unsafety. Only really intended for BitSet.

+

fn get(&self, i: usize) -> Option<bool>

+

Retrieves the value at index i, or None if the index is out of bounds.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let bv = BitVec::from_bytes(&[0b01100000]);
+assert_eq!(bv.get(0), Some(false));
+assert_eq!(bv.get(1), Some(true));
+assert_eq!(bv.get(100), None);
+
+// Can also use array indexing
+assert_eq!(bv[1], true);
+

fn set(&mut self, i: usize, x: bool)

+

Sets the value of a bit at an index i.

+ +

Panics

+

Panics if i is out of bounds.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::from_elem(5, false);
+bv.set(3, true);
+assert_eq!(bv[3], true);
+

fn set_all(&mut self)

+

Sets all bits to 1.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let before = 0b01100000;
+let after  = 0b11111111;
+
+let mut bv = BitVec::from_bytes(&[before]);
+bv.set_all();
+assert_eq!(bv, BitVec::from_bytes(&[after]));
+

fn negate(&mut self)

+

Flips all bits.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let before = 0b01100000;
+let after  = 0b10011111;
+
+let mut bv = BitVec::from_bytes(&[before]);
+bv.negate();
+assert_eq!(bv, BitVec::from_bytes(&[after]));
+

fn union(&mut self, other: &Self) -> bool

+

Calculates the union of two bitvectors. This acts like the bitwise or +function.

+ +

Sets self to the union of self and other. Both bitvectors must be +the same length. Returns true if self changed.

+ +

Panics

+

Panics if the bitvectors are of different lengths.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let a   = 0b01100100;
+let b   = 0b01011010;
+let res = 0b01111110;
+
+let mut a = BitVec::from_bytes(&[a]);
+let b = BitVec::from_bytes(&[b]);
+
+assert!(a.union(&b));
+assert_eq!(a, BitVec::from_bytes(&[res]));
+

fn intersect(&mut self, other: &Self) -> bool

+

Calculates the intersection of two bitvectors. This acts like the +bitwise and function.

+ +

Sets self to the intersection of self and other. Both bitvectors +must be the same length. Returns true if self changed.

+ +

Panics

+

Panics if the bitvectors are of different lengths.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let a   = 0b01100100;
+let b   = 0b01011010;
+let res = 0b01000000;
+
+let mut a = BitVec::from_bytes(&[a]);
+let b = BitVec::from_bytes(&[b]);
+
+assert!(a.intersect(&b));
+assert_eq!(a, BitVec::from_bytes(&[res]));
+

fn difference(&mut self, other: &Self) -> bool

+

Calculates the difference between two bitvectors.

+ +

Sets each element of self to the value of that element minus the +element of other at the same index. Both bitvectors must be the same +length. Returns true if self changed.

+ +

Panics

+

Panics if the bitvectors are of different length.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let a   = 0b01100100;
+let b   = 0b01011010;
+let a_b = 0b00100100; // a - b
+let b_a = 0b00011010; // b - a
+
+let mut bva = BitVec::from_bytes(&[a]);
+let bvb = BitVec::from_bytes(&[b]);
+
+assert!(bva.difference(&bvb));
+assert_eq!(bva, BitVec::from_bytes(&[a_b]));
+
+let bva = BitVec::from_bytes(&[a]);
+let mut bvb = BitVec::from_bytes(&[b]);
+
+assert!(bvb.difference(&bva));
+assert_eq!(bvb, BitVec::from_bytes(&[b_a]));
+

fn all(&self) -> bool

+

Returns true if all bits are 1.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::from_elem(5, true);
+assert_eq!(bv.all(), true);
+
+bv.set(1, false);
+assert_eq!(bv.all(), false);
+

fn iter(&self) -> Iter<B>

+

Returns an iterator over the elements of the vector in order.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let bv = BitVec::from_bytes(&[0b01110100, 0b10010010]);
+assert_eq!(bv.iter().filter(|x| *x).count(), 7);
+

fn none(&self) -> bool

+

Returns true if all bits are 0.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::from_elem(10, false);
+assert_eq!(bv.none(), true);
+
+bv.set(3, true);
+assert_eq!(bv.none(), false);
+

fn any(&self) -> bool

+

Returns true if any bit is 1.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::from_elem(10, false);
+assert_eq!(bv.any(), false);
+
+bv.set(3, true);
+assert_eq!(bv.any(), true);
+

fn to_bytes(&self) -> Vec<u8>

+

Organises the bits into bytes, such that the first bit in the +BitVec becomes the high-order bit of the first byte. If the +size of the BitVec is not a multiple of eight then trailing bits +will be filled-in with false.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::from_elem(3, true);
+bv.set(1, false);
+
+assert_eq!(bv.to_bytes(), [0b10100000]);
+
+let mut bv = BitVec::from_elem(9, false);
+bv.set(2, true);
+bv.set(8, true);
+
+assert_eq!(bv.to_bytes(), [0b00100000, 0b10000000]);
+

fn eq_vec(&self, v: &[bool]) -> bool

+

Compares a BitVec to a slice of bools. +Both the BitVec and slice must have the same length.

+ +

Panics

+

Panics if the BitVec and slice are of different length.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let bv = BitVec::from_bytes(&[0b10100000]);
+
+assert!(bv.eq_vec(&[true, false, true, false,
+                    false, false, false, false]));
+

fn truncate(&mut self, len: usize)

+

Shortens a BitVec, dropping excess elements.

+ +

If len is greater than the vector's current length, this has no +effect.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::from_bytes(&[0b01001011]);
+bv.truncate(2);
+assert!(bv.eq_vec(&[false, true]));
+

fn reserve(&mut self, additional: usize)

+

Reserves capacity for at least additional more bits to be inserted in the given +BitVec. The collection may reserve more space to avoid frequent reallocations.

+ +

Panics

+

Panics if the new capacity overflows usize.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::from_elem(3, false);
+bv.reserve(10);
+assert_eq!(bv.len(), 3);
+assert!(bv.capacity() >= 13);
+

fn reserve_exact(&mut self, additional: usize)

+

Reserves the minimum capacity for exactly additional more bits to be inserted in the +given BitVec. Does nothing if the capacity is already sufficient.

+ +

Note that the allocator may give the collection more space than it requests. Therefore +capacity can not be relied upon to be precisely minimal. Prefer reserve if future +insertions are expected.

+ +

Panics

+

Panics if the new capacity overflows usize.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::from_elem(3, false);
+bv.reserve(10);
+assert_eq!(bv.len(), 3);
+assert!(bv.capacity() >= 13);
+

fn capacity(&self) -> usize

+

Returns the capacity in bits for this bit vector. Inserting any +element less than this amount will not trigger a resizing.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::new();
+bv.reserve(10);
+assert!(bv.capacity() >= 10);
+

fn grow(&mut self, n: usize, value: bool)

+

Grows the BitVec in-place, adding n copies of value to the BitVec.

+ +

Panics

+

Panics if the new len overflows a usize.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::from_bytes(&[0b01001011]);
+bv.grow(2, true);
+assert_eq!(bv.len(), 10);
+assert_eq!(bv.to_bytes(), [0b01001011, 0b11000000]);
+

fn pop(&mut self) -> Option<bool>

+

Removes the last bit from the BitVec, and returns it. Returns None if the BitVec is empty.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::from_bytes(&[0b01001001]);
+assert_eq!(bv.pop(), Some(true));
+assert_eq!(bv.pop(), Some(false));
+assert_eq!(bv.len(), 6);
+

fn push(&mut self, elem: bool)

+

Pushes a bool onto the end.

+ +

Examples

+
+use bit_vec::BitVec;
+
+let mut bv = BitVec::new();
+bv.push(true);
+bv.push(false);
+assert!(bv.eq_vec(&[true, false]));
+

fn len(&self) -> usize

+

Returns the total number of bits in this vector

+

unsafe fn set_len(&mut self, len: usize)

+

Sets the number of bits that this BitVec considers initialized.

+ +

Almost certainly can cause bad stuff. Only really intended for BitSet.

+

fn is_empty(&self) -> bool

+

Returns true if there are no bits in this vector

+

fn clear(&mut self)

+

Clears all bits in this vector.

+

Trait Implementations

impl<B: BitBlock> Index<usize> for BitVec<B>

type Output = bool

+

fn index(&self, i: usize) -> &bool

+

impl<B: BitBlock> Default for BitVec<B>

fn default() -> Self

+

impl<B: BitBlock> FromIterator<bool> for BitVec<B>

fn from_iter<I: IntoIterator<Item=bool>>(iter: I) -> Self

+

impl<B: BitBlock> Extend<bool> for BitVec<B>

fn extend<I: IntoIterator<Item=bool>>(&mut self, iterable: I)

+

impl<B: BitBlock> Clone for BitVec<B>

fn clone(&self) -> Self

+

fn clone_from(&mut self, source: &Self)

+

impl<B: BitBlock> PartialOrd for BitVec<B>

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

+

1.0.0fn lt(&self, other: &Rhs) -> bool

+

1.0.0fn le(&self, other: &Rhs) -> bool

+

1.0.0fn gt(&self, other: &Rhs) -> bool

+

1.0.0fn ge(&self, other: &Rhs) -> bool

+

impl<B: BitBlock> Ord for BitVec<B>

fn cmp(&self, other: &Self) -> Ordering

+

impl<B: BitBlock> Debug for BitVec<B>

fn fmt(&self, fmt: &mut Formatter) -> Result

+

impl<B: BitBlock> Hash for BitVec<B>

fn hash<H: Hasher>(&self, state: &mut H)

+

1.3.0fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

+

impl<B: BitBlock> PartialEq for BitVec<B>

fn eq(&self, other: &Self) -> bool

+

1.0.0fn ne(&self, other: &Rhs) -> bool

+

impl<B: BitBlock> Eq for BitVec<B>

impl<'a, B: BitBlock> IntoIterator for &'a BitVec<B>

type Item = bool

+

type IntoIter = Iter<'a, B>

+

fn into_iter(self) -> Iter<'a, B>

+

impl<B: BitBlock> IntoIterator for BitVec<B>

type Item = bool

+

type IntoIter = IntoIter<B>

+

fn into_iter(self) -> IntoIter<B>

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/bit_vec/struct.Blocks.html b/doc/bit_vec/struct.Blocks.html new file mode 100644 index 00000000..6a20b18b --- /dev/null +++ b/doc/bit_vec/struct.Blocks.html @@ -0,0 +1,168 @@ + + + + + + + + + + bit_vec::Blocks - Rust + + + + + + + + + + + + + + + + +
+

Struct bit_vec::Blocks + + [] + + [src]

+
pub struct Blocks<'a, B: 'a> {
+    // some fields omitted
+}

An iterator over the blocks of a BitVec.

+

Trait Implementations

impl<'a, B: BitBlock> Iterator for Blocks<'a, B>

type Item = B

+

fn next(&mut self) -> Option<B>

+

fn size_hint(&self) -> (usize, Option<usize>)

+

1.0.0fn count(self) -> usize

+

1.0.0fn last(self) -> Option<Self::Item>

+

1.0.0fn nth(&mut self, n: usize) -> Option<Self::Item>

+

1.0.0fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter> where U: IntoIterator<Item=Self::Item>

+

1.0.0fn zip<U>(self, other: U) -> Zip<Self, U::IntoIter> where U: IntoIterator

+

1.0.0fn map<B, F>(self, f: F) -> Map<Self, F> where F: FnMut(Self::Item) -> B

+

1.0.0fn filter<P>(self, predicate: P) -> Filter<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where F: FnMut(Self::Item) -> Option<B>

+

1.0.0fn enumerate(self) -> Enumerate<Self>

+

1.0.0fn peekable(self) -> Peekable<Self>

+

1.0.0fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn skip(self, n: usize) -> Skip<Self>

+

1.0.0fn take(self, n: usize) -> Take<Self>

+

1.0.0fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where F: FnMut(&mut St, Self::Item) -> Option<B>

+

1.0.0fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where U: IntoIterator, F: FnMut(Self::Item) -> U

+

1.0.0fn fuse(self) -> Fuse<Self>

+

1.0.0fn inspect<F>(self, f: F) -> Inspect<Self, F> where F: FnMut(&Self::Item) -> ()

+

1.0.0fn by_ref(&mut self) -> &mut Self

+

1.0.0fn collect<B>(self) -> B where B: FromIterator<Self::Item>

+

1.0.0fn partition<B, F>(self, f: F) -> (B, B) where F: FnMut(&Self::Item) -> bool, B: Default + Extend<Self::Item>

+

1.0.0fn fold<B, F>(self, init: B, f: F) -> B where F: FnMut(B, Self::Item) -> B

+

1.0.0fn all<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn any<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn find<P>(&mut self, predicate: P) -> Option<Self::Item> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn position<P>(&mut self, predicate: P) -> Option<usize> where P: FnMut(Self::Item) -> bool

+

1.0.0fn rposition<P>(&mut self, predicate: P) -> Option<usize> where P: FnMut(Self::Item) -> bool, Self: ExactSizeIterator + DoubleEndedIterator

+

1.0.0fn max(self) -> Option<Self::Item> where Self::Item: Ord

+

1.0.0fn min(self) -> Option<Self::Item> where Self::Item: Ord

+

fn max_by<B, F>(self, f: F) -> Option<Self::Item> where F: FnMut(&Self::Item) -> B, B: Ord

+

1.6.0fn max_by_key<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

fn min_by<B, F>(self, f: F) -> Option<Self::Item> where F: FnMut(&Self::Item) -> B, B: Ord

+

1.6.0fn min_by_key<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

1.0.0fn rev(self) -> Rev<Self> where Self: DoubleEndedIterator

+

1.0.0fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where FromB: Default + Extend<B>, FromA: Default + Extend<A>, Self: Iterator<Item=(A, B)>

+

1.0.0fn cloned<'a, T>(self) -> Cloned<Self> where T: 'a + Clone, Self: Iterator<Item=&'a T>

+

1.0.0fn cycle(self) -> Cycle<Self> where Self: Clone

+

fn sum<S>(self) -> S where S: Add<Self::Item, Output=S> + Zero

+

fn product<P>(self) -> P where P: Mul<Self::Item, Output=P> + One

+

1.5.0fn cmp<I>(self, other: I) -> Ordering where I: IntoIterator<Item=Self::Item>, Self::Item: Ord

+

1.5.0fn partial_cmp<I>(self, other: I) -> Option<Ordering> where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn eq<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn ne<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn lt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn le<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn gt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn ge<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

impl<'a, B: BitBlock> DoubleEndedIterator for Blocks<'a, B>

fn next_back(&mut self) -> Option<B>

+

impl<'a, B: BitBlock> ExactSizeIterator for Blocks<'a, B>

1.0.0fn len(&self) -> usize

+

Derived Implementations

impl<'a, B: Clone + 'a> Clone for Blocks<'a, B>

fn clone(&self) -> Blocks<'a, B>

+

1.0.0fn clone_from(&mut self, source: &Self)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/bit_vec/struct.IntoIter.html b/doc/bit_vec/struct.IntoIter.html new file mode 100644 index 00000000..9c568faa --- /dev/null +++ b/doc/bit_vec/struct.IntoIter.html @@ -0,0 +1,165 @@ + + + + + + + + + + bit_vec::IntoIter - Rust + + + + + + + + + + + + + + + + +
+

Struct bit_vec::IntoIter + + [] + + [src]

+
pub struct IntoIter<B = u32> {
+    // some fields omitted
+}

Trait Implementations

impl<B: BitBlock> Iterator for IntoIter<B>

type Item = bool

+

fn next(&mut self) -> Option<bool>

+

1.0.0fn size_hint(&self) -> (usize, Option<usize>)

+

1.0.0fn count(self) -> usize

+

1.0.0fn last(self) -> Option<Self::Item>

+

1.0.0fn nth(&mut self, n: usize) -> Option<Self::Item>

+

1.0.0fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter> where U: IntoIterator<Item=Self::Item>

+

1.0.0fn zip<U>(self, other: U) -> Zip<Self, U::IntoIter> where U: IntoIterator

+

1.0.0fn map<B, F>(self, f: F) -> Map<Self, F> where F: FnMut(Self::Item) -> B

+

1.0.0fn filter<P>(self, predicate: P) -> Filter<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where F: FnMut(Self::Item) -> Option<B>

+

1.0.0fn enumerate(self) -> Enumerate<Self>

+

1.0.0fn peekable(self) -> Peekable<Self>

+

1.0.0fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn skip(self, n: usize) -> Skip<Self>

+

1.0.0fn take(self, n: usize) -> Take<Self>

+

1.0.0fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where F: FnMut(&mut St, Self::Item) -> Option<B>

+

1.0.0fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where U: IntoIterator, F: FnMut(Self::Item) -> U

+

1.0.0fn fuse(self) -> Fuse<Self>

+

1.0.0fn inspect<F>(self, f: F) -> Inspect<Self, F> where F: FnMut(&Self::Item) -> ()

+

1.0.0fn by_ref(&mut self) -> &mut Self

+

1.0.0fn collect<B>(self) -> B where B: FromIterator<Self::Item>

+

1.0.0fn partition<B, F>(self, f: F) -> (B, B) where F: FnMut(&Self::Item) -> bool, B: Default + Extend<Self::Item>

+

1.0.0fn fold<B, F>(self, init: B, f: F) -> B where F: FnMut(B, Self::Item) -> B

+

1.0.0fn all<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn any<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn find<P>(&mut self, predicate: P) -> Option<Self::Item> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn position<P>(&mut self, predicate: P) -> Option<usize> where P: FnMut(Self::Item) -> bool

+

1.0.0fn rposition<P>(&mut self, predicate: P) -> Option<usize> where P: FnMut(Self::Item) -> bool, Self: ExactSizeIterator + DoubleEndedIterator

+

1.0.0fn max(self) -> Option<Self::Item> where Self::Item: Ord

+

1.0.0fn min(self) -> Option<Self::Item> where Self::Item: Ord

+

fn max_by<B, F>(self, f: F) -> Option<Self::Item> where F: FnMut(&Self::Item) -> B, B: Ord

+

1.6.0fn max_by_key<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

fn min_by<B, F>(self, f: F) -> Option<Self::Item> where F: FnMut(&Self::Item) -> B, B: Ord

+

1.6.0fn min_by_key<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

1.0.0fn rev(self) -> Rev<Self> where Self: DoubleEndedIterator

+

1.0.0fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where FromB: Default + Extend<B>, FromA: Default + Extend<A>, Self: Iterator<Item=(A, B)>

+

1.0.0fn cloned<'a, T>(self) -> Cloned<Self> where T: 'a + Clone, Self: Iterator<Item=&'a T>

+

1.0.0fn cycle(self) -> Cycle<Self> where Self: Clone

+

fn sum<S>(self) -> S where S: Add<Self::Item, Output=S> + Zero

+

fn product<P>(self) -> P where P: Mul<Self::Item, Output=P> + One

+

1.5.0fn cmp<I>(self, other: I) -> Ordering where I: IntoIterator<Item=Self::Item>, Self::Item: Ord

+

1.5.0fn partial_cmp<I>(self, other: I) -> Option<Ordering> where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn eq<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn ne<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn lt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn le<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn gt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn ge<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

impl<B: BitBlock> DoubleEndedIterator for IntoIter<B>

fn next_back(&mut self) -> Option<bool>

+

impl<B: BitBlock> ExactSizeIterator for IntoIter<B>

1.0.0fn len(&self) -> usize

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/bit_vec/struct.Iter.html b/doc/bit_vec/struct.Iter.html new file mode 100644 index 00000000..da43c70a --- /dev/null +++ b/doc/bit_vec/struct.Iter.html @@ -0,0 +1,168 @@ + + + + + + + + + + bit_vec::Iter - Rust + + + + + + + + + + + + + + + + +
+

Struct bit_vec::Iter + + [] + + [src]

+
pub struct Iter<'a, B: 'a = u32> {
+    // some fields omitted
+}

An iterator for BitVec.

+

Trait Implementations

impl<'a, B: BitBlock> Iterator for Iter<'a, B>

type Item = bool

+

fn next(&mut self) -> Option<bool>

+

fn size_hint(&self) -> (usize, Option<usize>)

+

1.0.0fn count(self) -> usize

+

1.0.0fn last(self) -> Option<Self::Item>

+

1.0.0fn nth(&mut self, n: usize) -> Option<Self::Item>

+

1.0.0fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter> where U: IntoIterator<Item=Self::Item>

+

1.0.0fn zip<U>(self, other: U) -> Zip<Self, U::IntoIter> where U: IntoIterator

+

1.0.0fn map<B, F>(self, f: F) -> Map<Self, F> where F: FnMut(Self::Item) -> B

+

1.0.0fn filter<P>(self, predicate: P) -> Filter<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where F: FnMut(Self::Item) -> Option<B>

+

1.0.0fn enumerate(self) -> Enumerate<Self>

+

1.0.0fn peekable(self) -> Peekable<Self>

+

1.0.0fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn skip(self, n: usize) -> Skip<Self>

+

1.0.0fn take(self, n: usize) -> Take<Self>

+

1.0.0fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where F: FnMut(&mut St, Self::Item) -> Option<B>

+

1.0.0fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where U: IntoIterator, F: FnMut(Self::Item) -> U

+

1.0.0fn fuse(self) -> Fuse<Self>

+

1.0.0fn inspect<F>(self, f: F) -> Inspect<Self, F> where F: FnMut(&Self::Item) -> ()

+

1.0.0fn by_ref(&mut self) -> &mut Self

+

1.0.0fn collect<B>(self) -> B where B: FromIterator<Self::Item>

+

1.0.0fn partition<B, F>(self, f: F) -> (B, B) where F: FnMut(&Self::Item) -> bool, B: Default + Extend<Self::Item>

+

1.0.0fn fold<B, F>(self, init: B, f: F) -> B where F: FnMut(B, Self::Item) -> B

+

1.0.0fn all<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn any<F>(&mut self, f: F) -> bool where F: FnMut(Self::Item) -> bool

+

1.0.0fn find<P>(&mut self, predicate: P) -> Option<Self::Item> where P: FnMut(&Self::Item) -> bool

+

1.0.0fn position<P>(&mut self, predicate: P) -> Option<usize> where P: FnMut(Self::Item) -> bool

+

1.0.0fn rposition<P>(&mut self, predicate: P) -> Option<usize> where P: FnMut(Self::Item) -> bool, Self: ExactSizeIterator + DoubleEndedIterator

+

1.0.0fn max(self) -> Option<Self::Item> where Self::Item: Ord

+

1.0.0fn min(self) -> Option<Self::Item> where Self::Item: Ord

+

fn max_by<B, F>(self, f: F) -> Option<Self::Item> where F: FnMut(&Self::Item) -> B, B: Ord

+

1.6.0fn max_by_key<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

fn min_by<B, F>(self, f: F) -> Option<Self::Item> where F: FnMut(&Self::Item) -> B, B: Ord

+

1.6.0fn min_by_key<B, F>(self, f: F) -> Option<Self::Item> where B: Ord, F: FnMut(&Self::Item) -> B

+

1.0.0fn rev(self) -> Rev<Self> where Self: DoubleEndedIterator

+

1.0.0fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where FromB: Default + Extend<B>, FromA: Default + Extend<A>, Self: Iterator<Item=(A, B)>

+

1.0.0fn cloned<'a, T>(self) -> Cloned<Self> where T: 'a + Clone, Self: Iterator<Item=&'a T>

+

1.0.0fn cycle(self) -> Cycle<Self> where Self: Clone

+

fn sum<S>(self) -> S where S: Add<Self::Item, Output=S> + Zero

+

fn product<P>(self) -> P where P: Mul<Self::Item, Output=P> + One

+

1.5.0fn cmp<I>(self, other: I) -> Ordering where I: IntoIterator<Item=Self::Item>, Self::Item: Ord

+

1.5.0fn partial_cmp<I>(self, other: I) -> Option<Ordering> where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn eq<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn ne<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialEq<I::Item>

+

1.5.0fn lt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn le<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn gt<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

1.5.0fn ge<I>(self, other: I) -> bool where I: IntoIterator, Self::Item: PartialOrd<I::Item>

+

impl<'a, B: BitBlock> DoubleEndedIterator for Iter<'a, B>

fn next_back(&mut self) -> Option<bool>

+

impl<'a, B: BitBlock> ExactSizeIterator for Iter<'a, B>

1.0.0fn len(&self) -> usize

+

Derived Implementations

impl<'a, B: Clone + 'a> Clone for Iter<'a, B>

fn clone(&self) -> Iter<'a, B>

+

1.0.0fn clone_from(&mut self, source: &Self)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/bit_vec/trait.BitBlock.html b/doc/bit_vec/trait.BitBlock.html new file mode 100644 index 00000000..16c9875d --- /dev/null +++ b/doc/bit_vec/trait.BitBlock.html @@ -0,0 +1,142 @@ + + + + + + + + + + bit_vec::BitBlock - Rust + + + + + + + + + + + + + + + + +
+

Trait bit_vec::BitBlock + + [] + + [src]

+
pub trait BitBlock: Copy + Add<Self, Output=Self> + Sub<Self, Output=Self> + Shl<usize, Output=Self> + Shr<usize, Output=Self> + Not<Output=Self> + BitAnd<Self, Output=Self> + BitOr<Self, Output=Self> + BitXor<Self, Output=Self> + Rem<Self, Output=Self> + Eq + Ord + Hash {
+    fn bits() -> usize;
+    fn from_byte(byte: u8) -> Self;
+    fn count_ones(self) -> usize;
+    fn zero() -> Self;
+    fn one() -> Self;
+
+    fn bytes() -> usize { ... }
+}

Abstracts over a pile of bits (basically unsigned primitives)

+
+

Required Methods

+
+

fn bits() -> usize

How many bits it has

+

fn from_byte(byte: u8) -> Self

Convert a byte into this type (lowest-order bits set)

+

fn count_ones(self) -> usize

Count the number of 1's in the bitwise repr

+

fn zero() -> Self

Get 0

+

fn one() -> Self

Get 1

+
+

Provided Methods

+
+

fn bytes() -> usize

How many bytes it has

+
+

Implementors

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/bitflags/index.html b/doc/bitflags/index.html new file mode 100644 index 00000000..5412a286 --- /dev/null +++ b/doc/bitflags/index.html @@ -0,0 +1,122 @@ + + + + + + + + + + bitflags - Rust + + + + + + + + + + + + + + + + +
+

Crate bitflags + + [] + + [src]

+

A typesafe bitmask flag generator.

+

Macros

+ + + + + +
bitflags! +

The bitflags! macro generates a struct that holds a set of C-style +bitmask flags. It is useful for creating typesafe wrappers for C APIs.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/bitflags/macro.bitflags!.html b/doc/bitflags/macro.bitflags!.html new file mode 100644 index 00000000..57738785 --- /dev/null +++ b/doc/bitflags/macro.bitflags!.html @@ -0,0 +1,236 @@ + + + + + + + + + + bitflags::bitflags! - Rust + + + + + + + + + + + + + + + + +
+

bitflags::bitflags! + + [] + + [src]

+
+macro_rules! bitflags {
+    ($(#[$attr:meta])* flags $BitFlags:ident: $T:ty {
+        $($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+
+    }) => { ... };
+    ($(#[$attr:meta])* flags $BitFlags:ident: $T:ty {
+        $($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+,
+    }) => { ... };
+}
+

The bitflags! macro generates a struct that holds a set of C-style +bitmask flags. It is useful for creating typesafe wrappers for C APIs.

+ +

The flags should only be defined for integer types, otherwise unexpected +type errors may occur at compile time.

+ +

Example

+
+#[macro_use]
+extern crate bitflags;
+
+bitflags! {
+    flags Flags: u32 {
+        const FLAG_A       = 0b00000001,
+        const FLAG_B       = 0b00000010,
+        const FLAG_C       = 0b00000100,
+        const FLAG_ABC     = FLAG_A.bits
+                           | FLAG_B.bits
+                           | FLAG_C.bits,
+    }
+}
+
+fn main() {
+    let e1 = FLAG_A | FLAG_C;
+    let e2 = FLAG_B | FLAG_C;
+    assert!((e1 | e2) == FLAG_ABC);   // union
+    assert!((e1 & e2) == FLAG_C);     // intersection
+    assert!((e1 - e2) == FLAG_A);     // set difference
+    assert!(!e2 == FLAG_A);           // set complement
+}
+ +

The generated structs can also be extended with type and trait +implementations:

+ +
+#[macro_use]
+extern crate bitflags;
+
+use std::fmt;
+
+bitflags! {
+    flags Flags: u32 {
+        const FLAG_A   = 0b00000001,
+        const FLAG_B   = 0b00000010,
+    }
+}
+
+impl Flags {
+    pub fn clear(&mut self) {
+        self.bits = 0;  // The `bits` field can be accessed from within the
+                        // same module where the `bitflags!` macro was invoked.
+    }
+}
+
+impl fmt::Display for Flags {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        write!(f, "hi!")
+    }
+}
+
+fn main() {
+    let mut flags = FLAG_A | FLAG_B;
+    flags.clear();
+    assert!(flags.is_empty());
+    assert_eq!(format!("{}", flags), "hi!");
+    assert_eq!(format!("{:?}", FLAG_A | FLAG_B), "FLAG_A | FLAG_B");
+    assert_eq!(format!("{:?}", FLAG_B), "FLAG_B");
+}
+ +

Attributes

+

Attributes can be attached to the generated struct by placing them +before the flags keyword.

+ +

Trait implementations

+

The Copy, Clone, PartialEq, Eq, PartialOrd, Ord and Hash +traits automatically derived for the struct using the derive attribute. +Additional traits can be derived by providing an explicit derive +attribute on flags.

+ +

The FromIterator trait is implemented for the struct, too, calculating +the union of the instances of the struct iterated over.

+ +

The Debug trait is also implemented by displaying the bits value of the +internal struct.

+ +

Operators

+

The following operator traits are implemented for the generated struct:

+ + + +

Methods

+

The following methods are defined for the generated struct:

+ + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/bitflags/sidebar-items.js b/doc/bitflags/sidebar-items.js new file mode 100644 index 00000000..f37c8e56 --- /dev/null +++ b/doc/bitflags/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"macro":[["bitflags!","The `bitflags!` macro generates a `struct` that holds a set of C-style bitmask flags. It is useful for creating typesafe wrappers for C APIs."]]}); \ No newline at end of file diff --git a/doc/byteorder/enum.BigEndian.html b/doc/byteorder/enum.BigEndian.html new file mode 100644 index 00000000..5d43ab4d --- /dev/null +++ b/doc/byteorder/enum.BigEndian.html @@ -0,0 +1,135 @@ + + + + + + + + + + byteorder::BigEndian - Rust + + + + + + + + + + + + + + + + +
+

Enum byteorder::BigEndian + + [] + + [src]

+
pub enum BigEndian {}

Defines big-endian serialization.

+ +

Note that this type has no value constructor. It is used purely at the +type level.

+

Trait Implementations

impl ByteOrder for BigEndian

fn read_u16(buf: &[u8]) -> u16

+

fn read_u32(buf: &[u8]) -> u32

+

fn read_u64(buf: &[u8]) -> u64

+

fn read_uint(buf: &[u8], nbytes: usize) -> u64

+

fn write_u16(buf: &mut [u8], n: u16)

+

fn write_u32(buf: &mut [u8], n: u32)

+

fn write_u64(buf: &mut [u8], n: u64)

+

fn write_uint(buf: &mut [u8], n: u64, nbytes: usize)

+

fn read_i16(buf: &[u8]) -> i16

+

fn read_i32(buf: &[u8]) -> i32

+

fn read_i64(buf: &[u8]) -> i64

+

fn read_int(buf: &[u8], nbytes: usize) -> i64

+

fn read_f32(buf: &[u8]) -> f32

+

fn read_f64(buf: &[u8]) -> f64

+

fn write_i16(buf: &mut [u8], n: i16)

+

fn write_i32(buf: &mut [u8], n: i32)

+

fn write_i64(buf: &mut [u8], n: i64)

+

fn write_int(buf: &mut [u8], n: i64, nbytes: usize)

+

fn write_f32(buf: &mut [u8], n: f32)

+

fn write_f64(buf: &mut [u8], n: f64)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/byteorder/enum.Error.html b/doc/byteorder/enum.Error.html new file mode 100644 index 00000000..3ea621bb --- /dev/null +++ b/doc/byteorder/enum.Error.html @@ -0,0 +1,132 @@ + + + + + + + + + + byteorder::Error - Rust + + + + + + + + + + + + + + + + +
+

Enum byteorder::Error + + [] + + [src]

+
pub enum Error {
+    UnexpectedEOF,
+    Io(Error),
+}

An error type for reading bytes.

+ +

This is a thin wrapper over the standard io::Error type. Namely, it +adds one additional error case: an unexpected EOF.

+ +

Note that this error is also used for the write methods to keep things +consistent.

+

Variants

+
UnexpectedEOF

An unexpected EOF.

+ +

This occurs when a call to the underlying reader returns 0 bytes, +but more bytes are required to decode a meaningful value.

+
Io

Any underlying IO error that occurs while reading bytes.

+

Trait Implementations

impl From<Error> for Error

fn from(err: Error) -> Error

+

impl Display for Error

fn fmt(&self, f: &mut Formatter) -> Result

+

impl Error for Error

fn description(&self) -> &str

+

fn cause(&self) -> Option<&Error>

+

Derived Implementations

impl Debug for Error

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/byteorder/enum.LittleEndian.html b/doc/byteorder/enum.LittleEndian.html new file mode 100644 index 00000000..5a638721 --- /dev/null +++ b/doc/byteorder/enum.LittleEndian.html @@ -0,0 +1,135 @@ + + + + + + + + + + byteorder::LittleEndian - Rust + + + + + + + + + + + + + + + + +
+

Enum byteorder::LittleEndian + + [] + + [src]

+
pub enum LittleEndian {}

Defines little-endian serialization.

+ +

Note that this type has no value constructor. It is used purely at the +type level.

+

Trait Implementations

impl ByteOrder for LittleEndian

fn read_u16(buf: &[u8]) -> u16

+

fn read_u32(buf: &[u8]) -> u32

+

fn read_u64(buf: &[u8]) -> u64

+

fn read_uint(buf: &[u8], nbytes: usize) -> u64

+

fn write_u16(buf: &mut [u8], n: u16)

+

fn write_u32(buf: &mut [u8], n: u32)

+

fn write_u64(buf: &mut [u8], n: u64)

+

fn write_uint(buf: &mut [u8], n: u64, nbytes: usize)

+

fn read_i16(buf: &[u8]) -> i16

+

fn read_i32(buf: &[u8]) -> i32

+

fn read_i64(buf: &[u8]) -> i64

+

fn read_int(buf: &[u8], nbytes: usize) -> i64

+

fn read_f32(buf: &[u8]) -> f32

+

fn read_f64(buf: &[u8]) -> f64

+

fn write_i16(buf: &mut [u8], n: i16)

+

fn write_i32(buf: &mut [u8], n: i32)

+

fn write_i64(buf: &mut [u8], n: i64)

+

fn write_int(buf: &mut [u8], n: i64, nbytes: usize)

+

fn write_f32(buf: &mut [u8], n: f32)

+

fn write_f64(buf: &mut [u8], n: f64)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/byteorder/index.html b/doc/byteorder/index.html new file mode 100644 index 00000000..50870f4d --- /dev/null +++ b/doc/byteorder/index.html @@ -0,0 +1,210 @@ + + + + + + + + + + byteorder - Rust + + + + + + + + + + + + + + + + +
+

Crate byteorder + + [] + + [src]

+

This crate provides convenience methods for encoding and decoding numbers +in either big-endian or little-endian order.

+ +

The organization of the crate is pretty simple. A trait, ByteOrder, specifies +byte conversion methods for each type of number in Rust (sans numbers that have +a platform dependent size like usize and isize). Two types, BigEndian +and LittleEndian implement these methods. Finally, ReadBytesExt and +WriteBytesExt provide convenience methods available to all types that +implement Read and Write.

+ +

Examples

+

Read unsigned 16 bit big-endian integers from a Read type:

+ +
+use std::io::Cursor;
+use byteorder::{BigEndian, ReadBytesExt};
+
+let mut rdr = Cursor::new(vec![2, 5, 3, 0]);
+// Note that we use type parameters to indicate which kind of byte order
+// we want!
+assert_eq!(517, rdr.read_u16::<BigEndian>().unwrap());
+assert_eq!(768, rdr.read_u16::<BigEndian>().unwrap());
+ +

Write unsigned 16 bit little-endian integers to a Write type:

+ +
+use byteorder::{LittleEndian, WriteBytesExt};
+
+let mut wtr = vec![];
+wtr.write_u16::<LittleEndian>(517).unwrap();
+wtr.write_u16::<LittleEndian>(768).unwrap();
+assert_eq!(wtr, vec![5, 2, 0, 3]);
+

Enums

+ + + + + + + + + + + + + + + +
BigEndian +

Defines big-endian serialization.

+
Error +

An error type for reading bytes.

+
LittleEndian +

Defines little-endian serialization.

+

Traits

+ + + + + + + + + + + + + + + +
ByteOrder +

ByteOrder describes types that can serialize integers as bytes.

+
ReadBytesExt +

Extends Read with methods for reading numbers. (For std::io.)

+
WriteBytesExt +

Extends Write with methods for writing numbers. (For std::io.)

+

Type Definitions

+ + + + + + + + + + +
NativeEndian +

Defines system native-endian serialization.

+
Result +

A short-hand for result::Result<T, byteorder::Error>.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/byteorder/new/enum.Error.html b/doc/byteorder/new/enum.Error.html new file mode 100644 index 00000000..344b64e5 --- /dev/null +++ b/doc/byteorder/new/enum.Error.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../byteorder/enum.Error.html...

+ + + \ No newline at end of file diff --git a/doc/byteorder/new/index.html b/doc/byteorder/new/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/byteorder/new/sidebar-items.js b/doc/byteorder/new/sidebar-items.js new file mode 100644 index 00000000..7f95b932 --- /dev/null +++ b/doc/byteorder/new/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["Error","An error type for reading bytes."]],"trait":[["ReadBytesExt","Extends `Read` with methods for reading numbers. (For `std::io`.)"],["WriteBytesExt","Extends `Write` with methods for writing numbers. (For `std::io`.)"]],"type":[["Result","A short-hand for `result::Result`."]]}); \ No newline at end of file diff --git a/doc/byteorder/new/trait.ReadBytesExt.html b/doc/byteorder/new/trait.ReadBytesExt.html new file mode 100644 index 00000000..c93c35ff --- /dev/null +++ b/doc/byteorder/new/trait.ReadBytesExt.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../byteorder/trait.ReadBytesExt.html...

+ + + \ No newline at end of file diff --git a/doc/byteorder/new/trait.WriteBytesExt.html b/doc/byteorder/new/trait.WriteBytesExt.html new file mode 100644 index 00000000..bd7d12d0 --- /dev/null +++ b/doc/byteorder/new/trait.WriteBytesExt.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../byteorder/trait.WriteBytesExt.html...

+ + + \ No newline at end of file diff --git a/doc/byteorder/new/type.Result.html b/doc/byteorder/new/type.Result.html new file mode 100644 index 00000000..d521c519 --- /dev/null +++ b/doc/byteorder/new/type.Result.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../byteorder/type.Result.html...

+ + + \ No newline at end of file diff --git a/doc/byteorder/sidebar-items.js b/doc/byteorder/sidebar-items.js new file mode 100644 index 00000000..a8d38b8f --- /dev/null +++ b/doc/byteorder/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["BigEndian","Defines big-endian serialization."],["Error","An error type for reading bytes."],["LittleEndian","Defines little-endian serialization."]],"trait":[["ByteOrder","ByteOrder describes types that can serialize integers as bytes."],["ReadBytesExt","Extends `Read` with methods for reading numbers. (For `std::io`.)"],["WriteBytesExt","Extends `Write` with methods for writing numbers. (For `std::io`.)"]],"type":[["NativeEndian","Defines system native-endian serialization."],["Result","A short-hand for `result::Result`."]]}); \ No newline at end of file diff --git a/doc/byteorder/trait.ByteOrder.html b/doc/byteorder/trait.ByteOrder.html new file mode 100644 index 00000000..b30d39b7 --- /dev/null +++ b/doc/byteorder/trait.ByteOrder.html @@ -0,0 +1,237 @@ + + + + + + + + + + byteorder::ByteOrder - Rust + + + + + + + + + + + + + + + + +
+

Trait byteorder::ByteOrder + + [] + + [src]

+
pub trait ByteOrder {
+    fn read_u16(buf: &[u8]) -> u16;
+    fn read_u32(buf: &[u8]) -> u32;
+    fn read_u64(buf: &[u8]) -> u64;
+    fn read_uint(buf: &[u8], nbytes: usize) -> u64;
+    fn write_u16(buf: &mut [u8], n: u16);
+    fn write_u32(buf: &mut [u8], n: u32);
+    fn write_u64(buf: &mut [u8], n: u64);
+    fn write_uint(buf: &mut [u8], n: u64, nbytes: usize);
+
+    fn read_i16(buf: &[u8]) -> i16 { ... }
+    fn read_i32(buf: &[u8]) -> i32 { ... }
+    fn read_i64(buf: &[u8]) -> i64 { ... }
+    fn read_int(buf: &[u8], nbytes: usize) -> i64 { ... }
+    fn read_f32(buf: &[u8]) -> f32 { ... }
+    fn read_f64(buf: &[u8]) -> f64 { ... }
+    fn write_i16(buf: &mut [u8], n: i16) { ... }
+    fn write_i32(buf: &mut [u8], n: i32) { ... }
+    fn write_i64(buf: &mut [u8], n: i64) { ... }
+    fn write_int(buf: &mut [u8], n: i64, nbytes: usize) { ... }
+    fn write_f32(buf: &mut [u8], n: f32) { ... }
+    fn write_f64(buf: &mut [u8], n: f64) { ... }
+}

ByteOrder describes types that can serialize integers as bytes.

+ +

Note that Self does not appear anywhere in this trait's definition! +Therefore, in order to use it, you'll need to use syntax like +T::read_u16(&[0, 1]) where T implements ByteOrder.

+ +

This crate provides two types that implement ByteOrder: BigEndian +and LittleEndian.

+ +

Examples

+

Write and read u32 numbers in little endian order:

+ +
+use byteorder::{ByteOrder, LittleEndian};
+
+let mut buf = [0; 4];
+LittleEndian::write_u32(&mut buf, 1_000_000);
+assert_eq!(1_000_000, LittleEndian::read_u32(&buf));
+ +

Write and read i16 numbers in big endian order:

+ +
+use byteorder::{ByteOrder, BigEndian};
+
+let mut buf = [0; 2];
+BigEndian::write_i16(&mut buf, -50_000);
+assert_eq!(-50_000, BigEndian::read_i16(&buf));
+
+

Required Methods

+
+

fn read_u16(buf: &[u8]) -> u16

Reads an unsigned 16 bit integer from buf.

+ +

Panics when buf.len() < 2.

+

fn read_u32(buf: &[u8]) -> u32

Reads an unsigned 32 bit integer from buf.

+ +

Panics when buf.len() < 4.

+

fn read_u64(buf: &[u8]) -> u64

Reads an unsigned 64 bit integer from buf.

+ +

Panics when buf.len() < 8.

+

fn read_uint(buf: &[u8], nbytes: usize) -> u64

Reads an unsigned n-bytes integer from buf.

+ +

Panics when nbytes < 1 or nbytes > 8 or +buf.len() < nbytes

+

fn write_u16(buf: &mut [u8], n: u16)

Writes an unsigned 16 bit integer n to buf.

+ +

Panics when buf.len() < 2.

+

fn write_u32(buf: &mut [u8], n: u32)

Writes an unsigned 32 bit integer n to buf.

+ +

Panics when buf.len() < 4.

+

fn write_u64(buf: &mut [u8], n: u64)

Writes an unsigned 64 bit integer n to buf.

+ +

Panics when buf.len() < 8.

+

fn write_uint(buf: &mut [u8], n: u64, nbytes: usize)

Writes an unsigned integer n to buf using only nbytes.

+ +

If n is not representable in nbytes, or if nbytes is > 8, then +this method panics.

+
+

Provided Methods

+
+

fn read_i16(buf: &[u8]) -> i16

Reads a signed 16 bit integer from buf.

+ +

Panics when buf.len() < 2.

+

fn read_i32(buf: &[u8]) -> i32

Reads a signed 32 bit integer from buf.

+ +

Panics when buf.len() < 4.

+

fn read_i64(buf: &[u8]) -> i64

Reads a signed 64 bit integer from buf.

+ +

Panics when buf.len() < 8.

+

fn read_int(buf: &[u8], nbytes: usize) -> i64

Reads a signed n-bytes integer from buf.

+ +

Panics when nbytes < 1 or nbytes > 8 or +buf.len() < nbytes

+

fn read_f32(buf: &[u8]) -> f32

Reads a IEEE754 single-precision (4 bytes) floating point number.

+ +

Panics when buf.len() < 4.

+

fn read_f64(buf: &[u8]) -> f64

Reads a IEEE754 double-precision (8 bytes) floating point number.

+ +

Panics when buf.len() < 8.

+

fn write_i16(buf: &mut [u8], n: i16)

Writes a signed 16 bit integer n to buf.

+ +

Panics when buf.len() < 2.

+

fn write_i32(buf: &mut [u8], n: i32)

Writes a signed 32 bit integer n to buf.

+ +

Panics when buf.len() < 4.

+

fn write_i64(buf: &mut [u8], n: i64)

Writes a signed 64 bit integer n to buf.

+ +

Panics when buf.len() < 8.

+

fn write_int(buf: &mut [u8], n: i64, nbytes: usize)

Writes a signed integer n to buf using only nbytes.

+ +

If n is not representable in nbytes, or if nbytes is > 8, then +this method panics.

+

fn write_f32(buf: &mut [u8], n: f32)

Writes a IEEE754 single-precision (4 bytes) floating point number.

+ +

Panics when buf.len() < 4.

+

fn write_f64(buf: &mut [u8], n: f64)

Writes a IEEE754 double-precision (8 bytes) floating point number.

+ +

Panics when buf.len() < 8.

+
+

Implementors

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/byteorder/trait.ReadBytesExt.html b/doc/byteorder/trait.ReadBytesExt.html new file mode 100644 index 00000000..451ca254 --- /dev/null +++ b/doc/byteorder/trait.ReadBytesExt.html @@ -0,0 +1,168 @@ + + + + + + + + + + byteorder::ReadBytesExt - Rust + + + + + + + + + + + + + + + + +
+

Trait byteorder::ReadBytesExt + + [] + + [src]

+
pub trait ReadBytesExt: Read {
+    fn read_u8(&mut self) -> Result<u8> { ... }
+    fn read_i8(&mut self) -> Result<i8> { ... }
+    fn read_u16<T: ByteOrder>(&mut self) -> Result<u16> { ... }
+    fn read_i16<T: ByteOrder>(&mut self) -> Result<i16> { ... }
+    fn read_u32<T: ByteOrder>(&mut self) -> Result<u32> { ... }
+    fn read_i32<T: ByteOrder>(&mut self) -> Result<i32> { ... }
+    fn read_u64<T: ByteOrder>(&mut self) -> Result<u64> { ... }
+    fn read_i64<T: ByteOrder>(&mut self) -> Result<i64> { ... }
+    fn read_uint<T: ByteOrder>(&mut self, nbytes: usize) -> Result<u64> { ... }
+    fn read_int<T: ByteOrder>(&mut self, nbytes: usize) -> Result<i64> { ... }
+    fn read_f32<T: ByteOrder>(&mut self) -> Result<f32> { ... }
+    fn read_f64<T: ByteOrder>(&mut self) -> Result<f64> { ... }
+}

Extends Read with methods for reading numbers. (For std::io.)

+ +

Most of the methods defined here have an unconstrained type parameter that +must be explicitly instantiated. Typically, it is instantiated with either +the BigEndian or LittleEndian types defined in this crate.

+ +

Examples

+

Read unsigned 16 bit big-endian integers from a Read:

+ +
+use std::io::Cursor;
+use byteorder::{BigEndian, ReadBytesExt};
+
+let mut rdr = Cursor::new(vec![2, 5, 3, 0]);
+assert_eq!(517, rdr.read_u16::<BigEndian>().unwrap());
+assert_eq!(768, rdr.read_u16::<BigEndian>().unwrap());
+
+

Provided Methods

+
+

fn read_u8(&mut self) -> Result<u8>

Reads an unsigned 8 bit integer from the underlying reader.

+ +

Note that since this reads a single byte, no byte order conversions +are used. It is included for completeness.

+

fn read_i8(&mut self) -> Result<i8>

Reads a signed 8 bit integer from the underlying reader.

+ +

Note that since this reads a single byte, no byte order conversions +are used. It is included for completeness.

+

fn read_u16<T: ByteOrder>(&mut self) -> Result<u16>

Reads an unsigned 16 bit integer from the underlying reader.

+

fn read_i16<T: ByteOrder>(&mut self) -> Result<i16>

Reads a signed 16 bit integer from the underlying reader.

+

fn read_u32<T: ByteOrder>(&mut self) -> Result<u32>

Reads an unsigned 32 bit integer from the underlying reader.

+

fn read_i32<T: ByteOrder>(&mut self) -> Result<i32>

Reads a signed 32 bit integer from the underlying reader.

+

fn read_u64<T: ByteOrder>(&mut self) -> Result<u64>

Reads an unsigned 64 bit integer from the underlying reader.

+

fn read_i64<T: ByteOrder>(&mut self) -> Result<i64>

Reads a signed 64 bit integer from the underlying reader.

+

fn read_uint<T: ByteOrder>(&mut self, nbytes: usize) -> Result<u64>

Reads an unsigned n-bytes integer from the underlying reader.

+

fn read_int<T: ByteOrder>(&mut self, nbytes: usize) -> Result<i64>

Reads a signed n-bytes integer from the underlying reader.

+

fn read_f32<T: ByteOrder>(&mut self) -> Result<f32>

Reads a IEEE754 single-precision (4 bytes) floating point number from +the underlying reader.

+

fn read_f64<T: ByteOrder>(&mut self) -> Result<f64>

Reads a IEEE754 double-precision (8 bytes) floating point number from +the underlying reader.

+
+

Implementors

+
    +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/byteorder/trait.WriteBytesExt.html b/doc/byteorder/trait.WriteBytesExt.html new file mode 100644 index 00000000..12620541 --- /dev/null +++ b/doc/byteorder/trait.WriteBytesExt.html @@ -0,0 +1,174 @@ + + + + + + + + + + byteorder::WriteBytesExt - Rust + + + + + + + + + + + + + + + + +
+

Trait byteorder::WriteBytesExt + + [] + + [src]

+
pub trait WriteBytesExt: Write {
+    fn write_u8(&mut self, n: u8) -> Result<()> { ... }
+    fn write_i8(&mut self, n: i8) -> Result<()> { ... }
+    fn write_u16<T: ByteOrder>(&mut self, n: u16) -> Result<()> { ... }
+    fn write_i16<T: ByteOrder>(&mut self, n: i16) -> Result<()> { ... }
+    fn write_u32<T: ByteOrder>(&mut self, n: u32) -> Result<()> { ... }
+    fn write_i32<T: ByteOrder>(&mut self, n: i32) -> Result<()> { ... }
+    fn write_u64<T: ByteOrder>(&mut self, n: u64) -> Result<()> { ... }
+    fn write_i64<T: ByteOrder>(&mut self, n: i64) -> Result<()> { ... }
+    fn write_uint<T: ByteOrder>(&mut self, n: u64, nbytes: usize) -> Result<()> { ... }
+    fn write_int<T: ByteOrder>(&mut self, n: i64, nbytes: usize) -> Result<()> { ... }
+    fn write_f32<T: ByteOrder>(&mut self, n: f32) -> Result<()> { ... }
+    fn write_f64<T: ByteOrder>(&mut self, n: f64) -> Result<()> { ... }
+}

Extends Write with methods for writing numbers. (For std::io.)

+ +

Most of the methods defined here have an unconstrained type parameter that +must be explicitly instantiated. Typically, it is instantiated with either +the BigEndian or LittleEndian types defined in this crate.

+ +

Examples

+

Write unsigned 16 bit big-endian integers to a Write:

+ +
+use byteorder::{BigEndian, WriteBytesExt};
+
+let mut wtr = vec![];
+wtr.write_u16::<BigEndian>(517).unwrap();
+wtr.write_u16::<BigEndian>(768).unwrap();
+assert_eq!(wtr, vec![2, 5, 3, 0]);
+
+

Provided Methods

+
+

fn write_u8(&mut self, n: u8) -> Result<()>

Writes an unsigned 8 bit integer to the underlying writer.

+ +

Note that since this writes a single byte, no byte order conversions +are used. It is included for completeness.

+

fn write_i8(&mut self, n: i8) -> Result<()>

Writes a signed 8 bit integer to the underlying writer.

+ +

Note that since this writes a single byte, no byte order conversions +are used. It is included for completeness.

+

fn write_u16<T: ByteOrder>(&mut self, n: u16) -> Result<()>

Writes an unsigned 16 bit integer to the underlying writer.

+

fn write_i16<T: ByteOrder>(&mut self, n: i16) -> Result<()>

Writes a signed 16 bit integer to the underlying writer.

+

fn write_u32<T: ByteOrder>(&mut self, n: u32) -> Result<()>

Writes an unsigned 32 bit integer to the underlying writer.

+

fn write_i32<T: ByteOrder>(&mut self, n: i32) -> Result<()>

Writes a signed 32 bit integer to the underlying writer.

+

fn write_u64<T: ByteOrder>(&mut self, n: u64) -> Result<()>

Writes an unsigned 64 bit integer to the underlying writer.

+

fn write_i64<T: ByteOrder>(&mut self, n: i64) -> Result<()>

Writes a signed 64 bit integer to the underlying writer.

+

fn write_uint<T: ByteOrder>(&mut self, n: u64, nbytes: usize) -> Result<()>

Writes an unsigned n-bytes integer to the underlying writer.

+ +

If the given integer is not representable in the given number of bytes, +this method panics. If nbytes > 8, this method panics.

+

fn write_int<T: ByteOrder>(&mut self, n: i64, nbytes: usize) -> Result<()>

Writes a signed n-bytes integer to the underlying writer.

+ +

If the given integer is not representable in the given number of bytes, +this method panics. If nbytes > 8, this method panics.

+

fn write_f32<T: ByteOrder>(&mut self, n: f32) -> Result<()>

Writes a IEEE754 single-precision (4 bytes) floating point number to +the underlying writer.

+

fn write_f64<T: ByteOrder>(&mut self, n: f64) -> Result<()>

Writes a IEEE754 double-precision (8 bytes) floating point number to +the underlying writer.

+
+

Implementors

+
    +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/byteorder/type.NativeEndian.html b/doc/byteorder/type.NativeEndian.html new file mode 100644 index 00000000..5d537995 --- /dev/null +++ b/doc/byteorder/type.NativeEndian.html @@ -0,0 +1,115 @@ + + + + + + + + + + byteorder::NativeEndian - Rust + + + + + + + + + + + + + + + + +
+

byteorder::NativeEndian + + [] + + [src]

+
type NativeEndian = LittleEndian;

Defines system native-endian serialization.

+ +

Note that this type has no value constructor. It is used purely at the +type level.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/byteorder/type.Result.html b/doc/byteorder/type.Result.html new file mode 100644 index 00000000..69bd9101 --- /dev/null +++ b/doc/byteorder/type.Result.html @@ -0,0 +1,112 @@ + + + + + + + + + + byteorder::Result - Rust + + + + + + + + + + + + + + + + +
+

byteorder::Result + + [] + + [src]

+
type Result<T> = Result<T, Error>;

A short-hand for result::Result<T, byteorder::Error>.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/app/enum.AppSettings.html b/doc/clap/app/enum.AppSettings.html new file mode 100644 index 00000000..8ea40af4 --- /dev/null +++ b/doc/clap/app/enum.AppSettings.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../clap/enum.AppSettings.html...

+ + + \ No newline at end of file diff --git a/doc/clap/app/index.html b/doc/clap/app/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/app/macros/index.html b/doc/clap/app/macros/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/app/macros/sidebar-items.js b/doc/clap/app/macros/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/clap/app/macros/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/clap/app/settings/enum.AppSettings.html b/doc/clap/app/settings/enum.AppSettings.html new file mode 100644 index 00000000..12aff316 --- /dev/null +++ b/doc/clap/app/settings/enum.AppSettings.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../clap/enum.AppSettings.html...

+ + + \ No newline at end of file diff --git a/doc/clap/app/settings/index.html b/doc/clap/app/settings/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/app/settings/sidebar-items.js b/doc/clap/app/settings/sidebar-items.js new file mode 100644 index 00000000..0e8b09bc --- /dev/null +++ b/doc/clap/app/settings/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["AppSettings","Application level settings, which affect how `App` operates"]]}); \ No newline at end of file diff --git a/doc/clap/app/sidebar-items.js b/doc/clap/app/sidebar-items.js new file mode 100644 index 00000000..a6c4531d --- /dev/null +++ b/doc/clap/app/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["AppSettings","Application level settings, which affect how `App` operates"]],"struct":[["App","Used to create a representation of a command line program and all possible command line arguments."]]}); \ No newline at end of file diff --git a/doc/clap/app/struct.App.html b/doc/clap/app/struct.App.html new file mode 100644 index 00000000..7fb5a751 --- /dev/null +++ b/doc/clap/app/struct.App.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../clap/struct.App.html...

+ + + \ No newline at end of file diff --git a/doc/clap/args/any_arg/index.html b/doc/clap/args/any_arg/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/args/any_arg/sidebar-items.js b/doc/clap/args/any_arg/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/clap/args/any_arg/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/clap/args/arg/index.html b/doc/clap/args/arg/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/args/arg/sidebar-items.js b/doc/clap/args/arg/sidebar-items.js new file mode 100644 index 00000000..6187370d --- /dev/null +++ b/doc/clap/args/arg/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Arg","The abstract representation of a command line argument used by the consumer of the library. Used to set all the options and relationships that define a valid argument for the program."]]}); \ No newline at end of file diff --git a/doc/clap/args/arg/struct.Arg.html b/doc/clap/args/arg/struct.Arg.html new file mode 100644 index 00000000..66cac627 --- /dev/null +++ b/doc/clap/args/arg/struct.Arg.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../clap/struct.Arg.html...

+ + + \ No newline at end of file diff --git a/doc/clap/args/arg_builder/flag/index.html b/doc/clap/args/arg_builder/flag/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/args/arg_builder/flag/sidebar-items.js b/doc/clap/args/arg_builder/flag/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/clap/args/arg_builder/flag/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/clap/args/arg_builder/index.html b/doc/clap/args/arg_builder/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/args/arg_builder/option/index.html b/doc/clap/args/arg_builder/option/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/args/arg_builder/option/sidebar-items.js b/doc/clap/args/arg_builder/option/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/clap/args/arg_builder/option/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/clap/args/arg_builder/positional/index.html b/doc/clap/args/arg_builder/positional/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/args/arg_builder/positional/sidebar-items.js b/doc/clap/args/arg_builder/positional/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/clap/args/arg_builder/positional/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/clap/args/arg_builder/sidebar-items.js b/doc/clap/args/arg_builder/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/clap/args/arg_builder/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/clap/args/arg_matcher/index.html b/doc/clap/args/arg_matcher/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/args/arg_matcher/sidebar-items.js b/doc/clap/args/arg_matcher/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/clap/args/arg_matcher/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/clap/args/arg_matches/index.html b/doc/clap/args/arg_matches/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/args/arg_matches/sidebar-items.js b/doc/clap/args/arg_matches/sidebar-items.js new file mode 100644 index 00000000..4ed6e932 --- /dev/null +++ b/doc/clap/args/arg_matches/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["ArgMatches","Used to get information about the arguments that where supplied to the program at runtime by the user. To get a new instance of this struct you use `.get_matches()` of the `App` struct."]]}); \ No newline at end of file diff --git a/doc/clap/args/arg_matches/struct.ArgMatches.html b/doc/clap/args/arg_matches/struct.ArgMatches.html new file mode 100644 index 00000000..7cb34723 --- /dev/null +++ b/doc/clap/args/arg_matches/struct.ArgMatches.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../clap/struct.ArgMatches.html...

+ + + \ No newline at end of file diff --git a/doc/clap/args/group/index.html b/doc/clap/args/group/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/args/group/sidebar-items.js b/doc/clap/args/group/sidebar-items.js new file mode 100644 index 00000000..364ac459 --- /dev/null +++ b/doc/clap/args/group/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["ArgGroup","`ArgGroup`s are a family of related arguments and way for you to say, \"Any of these arguments\". By placing arguments in a logical group, you can make easier requirement and exclusion rules instead of having to list each individually, or when you want a rule to apply \"any but not all\" arguments."]]}); \ No newline at end of file diff --git a/doc/clap/args/group/struct.ArgGroup.html b/doc/clap/args/group/struct.ArgGroup.html new file mode 100644 index 00000000..6084eb59 --- /dev/null +++ b/doc/clap/args/group/struct.ArgGroup.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../clap/struct.ArgGroup.html...

+ + + \ No newline at end of file diff --git a/doc/clap/args/index.html b/doc/clap/args/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/args/matched_arg/index.html b/doc/clap/args/matched_arg/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/args/matched_arg/sidebar-items.js b/doc/clap/args/matched_arg/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/clap/args/matched_arg/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/clap/args/settings/index.html b/doc/clap/args/settings/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/args/settings/sidebar-items.js b/doc/clap/args/settings/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/clap/args/settings/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/clap/args/sidebar-items.js b/doc/clap/args/sidebar-items.js new file mode 100644 index 00000000..3e7a0a35 --- /dev/null +++ b/doc/clap/args/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["any_arg",""],["settings",""]],"struct":[["Arg","The abstract representation of a command line argument used by the consumer of the library. Used to set all the options and relationships that define a valid argument for the program."],["ArgGroup","`ArgGroup`s are a family of related arguments and way for you to say, \"Any of these arguments\". By placing arguments in a logical group, you can make easier requirement and exclusion rules instead of having to list each individually, or when you want a rule to apply \"any but not all\" arguments."],["ArgMatches","Used to get information about the arguments that where supplied to the program at runtime by the user. To get a new instance of this struct you use `.get_matches()` of the `App` struct."],["SubCommand","The abstract representation of a command line subcommand used by the consumer of the library."]]}); \ No newline at end of file diff --git a/doc/clap/args/struct.Arg.html b/doc/clap/args/struct.Arg.html new file mode 100644 index 00000000..31e9776e --- /dev/null +++ b/doc/clap/args/struct.Arg.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../clap/struct.Arg.html...

+ + + \ No newline at end of file diff --git a/doc/clap/args/struct.ArgGroup.html b/doc/clap/args/struct.ArgGroup.html new file mode 100644 index 00000000..452ca3bc --- /dev/null +++ b/doc/clap/args/struct.ArgGroup.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../clap/struct.ArgGroup.html...

+ + + \ No newline at end of file diff --git a/doc/clap/args/struct.ArgMatches.html b/doc/clap/args/struct.ArgMatches.html new file mode 100644 index 00000000..23f44eff --- /dev/null +++ b/doc/clap/args/struct.ArgMatches.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../clap/struct.ArgMatches.html...

+ + + \ No newline at end of file diff --git a/doc/clap/args/struct.SubCommand.html b/doc/clap/args/struct.SubCommand.html new file mode 100644 index 00000000..3f25d990 --- /dev/null +++ b/doc/clap/args/struct.SubCommand.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../clap/struct.SubCommand.html...

+ + + \ No newline at end of file diff --git a/doc/clap/args/subcommand/index.html b/doc/clap/args/subcommand/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/args/subcommand/sidebar-items.js b/doc/clap/args/subcommand/sidebar-items.js new file mode 100644 index 00000000..b13e205f --- /dev/null +++ b/doc/clap/args/subcommand/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["SubCommand","The abstract representation of a command line subcommand used by the consumer of the library."]]}); \ No newline at end of file diff --git a/doc/clap/args/subcommand/struct.SubCommand.html b/doc/clap/args/subcommand/struct.SubCommand.html new file mode 100644 index 00000000..88a4e642 --- /dev/null +++ b/doc/clap/args/subcommand/struct.SubCommand.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../clap/struct.SubCommand.html...

+ + + \ No newline at end of file diff --git a/doc/clap/enum.AppSettings.html b/doc/clap/enum.AppSettings.html new file mode 100644 index 00000000..fd79acf2 --- /dev/null +++ b/doc/clap/enum.AppSettings.html @@ -0,0 +1,270 @@ + + + + + + + + + + clap::AppSettings - Rust + + + + + + + + + + + + + + + + +
+

Enum clap::AppSettings + + [] + + [src]

+
pub enum AppSettings {
+    SubcommandsNegateReqs,
+    SubcommandRequired,
+    ArgRequiredElseHelp,
+    GlobalVersion,
+    VersionlessSubcommands,
+    UnifiedHelpMessage,
+    WaitOnError,
+    SubcommandRequiredElseHelp,
+    Hidden,
+    TrailingVarArg,
+    NoBinaryName,
+    // some variants omitted
+}

Application level settings, which affect how App operates

+

Variants

+
SubcommandsNegateReqs

Allows subcommands to override all requirements of the parent (this command). For example +if you had a subcommand or even top level application which had a required arguments that +are only required as long as there is no subcommand present.

+ +

NOTE: This defaults to false (using subcommand does not negate requirements)

+ +

Examples

+
+App::new("myprog")
+    .setting(AppSettings::SubcommandsNegateReqs)
+
SubcommandRequired

Allows specifying that if no subcommand is present at runtime, error and exit gracefully

+ +

NOTE: This defaults to false (subcommands do not need to be present)

+ +

Examples

+
+App::new("myprog")
+    .setting(AppSettings::SubcommandRequired)
+
ArgRequiredElseHelp

Specifies that the help text should be displayed (and then exit gracefully), if no +arguments are present at runtime (i.e. an empty run such as, $ myprog.

+ +

NOTE: Subcommands count as arguments

+ +

Examples

+
+App::new("myprog")
+    .setting(AppSettings::ArgRequiredElseHelp)
+
GlobalVersion

Uses version of the current command for all subcommands. (Defaults to false; subcommands +have independant version strings)

+ +

NOTE: The version for the current command and this setting must be set prior to +adding any subcommands

+ +

Examples

+
+App::new("myprog")
+    .version("v1.1")
+    .setting(AppSettings::GlobalVersion)
+    .subcommand(SubCommand::with_name("test"))
+    .get_matches();
+// running `myprog test --version` will display
+// "myprog-test v1.1"
+
VersionlessSubcommands

Disables -V and --version for all subcommands (Defaults to false; subcommands have +version flags)

+ +

NOTE: This setting must be set prior adding any subcommands

+ +

NOTE: Do not set this value to false, it will have undesired results!

+ +

Examples

+
+App::new("myprog")
+    .version("v1.1")
+    .setting(AppSettings::VersionlessSubcommands)
+    .subcommand(SubCommand::with_name("test"))
+    .get_matches();
+// running `myprog test --version` will display unknown argument error
+
UnifiedHelpMessage

By default the auto-generated help message groups flags, options, and positional arguments +separately. This setting disable that and groups flags and options together presenting a +more unified help message (a la getopts or docopt style).

+ +

NOTE: This setting is cosmetic only and does not affect any functionality.

+ +

Examples

+
+App::new("myprog")
+    .setting(AppSettings::UnifiedHelpMessage)
+    .get_matches();
+// running `myprog --help` will display a unified "docopt" or "getopts" style help message
+
WaitOnError

Will display a message "Press [ENTER]/[RETURN] to continue..." and wait user before +exiting

+ +

This is most useful when writing an application which is run from a GUI shortcut, or on +Windows where a user tries to open the binary by double-clicking instead of using the +command line (i.e. set .arg_required_else_help(true) and .wait_on_error(true) to +display the help in such a case).

+ +

NOTE: This setting is not recursive with subcommands, meaning if you wish this +behavior for all subcommands, you must set this on each command (needing this is extremely +rare)

+ +

Examples

+
+App::new("myprog")
+    .setting(AppSettings::WaitOnError)
+
SubcommandRequiredElseHelp

Specifies that the help text should be displayed (and then exit gracefully), if no +subcommands are present at runtime (i.e. an empty run such as, $ myprog.

+ +

NOTE: This should not be used with .subcommand_required() as they do the same +thing, except one prints the help text, and one prints an error.

+ +

NOTE: If the user specifies arguments at runtime, but no subcommand the help text will +still be displayed and exit. If this is not the desired result, consider using +.arg_required_else_help()

+ +

Examples

+
+App::new("myprog")
+    .setting(AppSettings::SubcommandRequiredElseHelp)
+
Hidden

Specifies that this subcommand should be hidden from help messages

+ +

Examples

+
+App::new("myprog")
+    .subcommand(SubCommand::with_name("test")
+    .setting(AppSettings::Hidden))
+
TrailingVarArg

Specifies that the final positional argument is a vararg and that clap should not attempt +to parse any further args.

+ +

The values of the trailing positional argument will contain all args from itself on.

+ +

NOTE: The final positional argument must have .multiple(true) or usage token +equivalent.

+ +

Examples

+
+let m = App::new("myprog")
+    .setting(AppSettings::TrailingVarArg)
+    .arg(Arg::from_usage("<cmd>... 'commands to run'"))
+    .get_matches_from(vec!["myprog", "some_command", "-r", "set"]);
+
+assert_eq!(m.values_of("cmd").unwrap(), &["some_command", "-r", "set"]);
+
NoBinaryName

Specifies that the parser should not assume the first argument passed is the binary name. +This is normally the case when using a "daemon" style mode, or an interactive CLI where one +one would not normally type the binary or program name for each command.

+ +

NOTE: This should only be used when you absolutely know it's what you need. 99% of the +cases out there don't need this setting.

+ +

Examples

+
+let m = App::new("myprog")
+    .setting(AppSettings::NoBinaryName)
+    .arg(Arg::from_usage("<cmd>... 'commands to run'"))
+    .get_matches_from(vec!["some_command", "-r", "set"]);
+
+assert_eq!(m.values_of("cmd").unwrap(), &["some_command", "-r", "set"]);
+

Trait Implementations

impl FromStr for AppSettings

type Err = String

+

fn from_str(s: &str) -> Result<Self, Self::Err>

+

Derived Implementations

impl Clone for AppSettings

fn clone(&self) -> AppSettings

+

1.0.0fn clone_from(&mut self, source: &Self)

+

impl Copy for AppSettings

impl PartialEq for AppSettings

fn eq(&self, __arg_0: &AppSettings) -> bool

+

fn ne(&self, __arg_0: &AppSettings) -> bool

+

impl Debug for AppSettings

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/enum.ClapErrorType.html b/doc/clap/enum.ClapErrorType.html new file mode 100644 index 00000000..0e9e2095 --- /dev/null +++ b/doc/clap/enum.ClapErrorType.html @@ -0,0 +1,301 @@ + + + + + + + + + + clap::ClapErrorType - Rust + + + + + + + + + + + + + + + + +
+

Enum clap::ClapErrorType + + [] + + [src]

+
pub enum ClapErrorType {
+    InvalidValue,
+    InvalidArgument,
+    InvalidSubcommand,
+    EmptyValue,
+    ValueValidationError,
+    ArgumentError,
+    TooManyArgs,
+    TooManyValues,
+    TooFewValues,
+    WrongNumValues,
+    ArgumentConflict,
+    MissingRequiredArgument,
+    MissingSubcommand,
+    MissingArgumentOrSubcommand,
+    UnexpectedArgument,
+    UnexpectedMultipleUsage,
+    InvalidUnicode,
+    HelpDisplayed,
+    VersionDisplayed,
+    InternalError,
+    Io,
+    Format,
+}

Command line argument parser error types

+

Variants

+
InvalidValue

Error occurs when some possible values were set, but clap found unexpected value

+ +

Examples

+
+let result = App::new("myprog")
+    .arg(Arg::with_name("debug").index(1)
+        .possible_value("fast")
+        .possible_value("slow"))
+    .get_matches_from_safe(vec!["", "other"]);
+
InvalidArgument

Error occurs when clap found unexpected flag or option

+ +

Examples

+
+let result = App::new("myprog")
+    .arg(Arg::from_usage("-f, --flag 'some flag'"))
+    .get_matches_from_safe(vec!["", "--other"]);
+
InvalidSubcommand

Error occurs when clap found unexpected subcommand

+ +

Examples

+
+let result = App::new("myprog")
+    .subcommand(SubCommand::with_name("config")
+        .about("Used for configuration")
+        .arg(Arg::with_name("config_file")
+            .help("The configuration file to use")
+            .index(1)))
+    .get_matches_from_safe(vec!["", "other"]);
+
EmptyValue

Error occurs when option does not allow empty values but some was found

+ +

Examples

+
+let result = App::new("myprog")
+    .arg(Arg::with_name("debug")
+         .empty_values(false))
+    .arg(Arg::with_name("color"))
+    .get_matches_from_safe(vec!["", "--debug", "--color"]);
+
ValueValidationError

Option fails validation of a custom validator

+
ArgumentError

Parser inner error

+
TooManyArgs

Error occurs when an application got more arguments then were expected

+ +

Examples

+
+let result = App::new("myprog")
+    .arg(Arg::with_name("debug").index(1)
+        .max_values(2))
+    .get_matches_from_safe(vec!["", "too", "much", "values"]);
+
TooManyValues

Error occurs when argument got more values then were expected

+ +

Examples

+
+let result = App::new("myprog")
+    .arg(Arg::with_name("debug").index(1)
+        .max_values(2))
+    .get_matches_from_safe(vec!["", "too", "much", "values"]);
+
TooFewValues

Error occurs when argument got less values then were expected

+ +

Examples

+
+let result = App::new("myprog")
+    .arg(Arg::with_name("debug").index(1)
+        .min_values(3))
+    .get_matches_from_safe(vec!["", "too", "few"]);
+
WrongNumValues

Error occurs when argument got a different number of values then were expected

+ +

Examples

+
+let result = App::new("myprog")
+    .arg(Arg::with_name("debug").index(1)
+        .max_values(2))
+    .get_matches_from_safe(vec!["", "too", "much", "values"]);
+
ArgumentConflict

Error occurs when clap find two ore more conflicting arguments

+ +

Examples

+
+let result = App::new("myprog")
+    .arg(Arg::with_name("debug")
+        .conflicts_with("color"))
+    .get_matches_from_safe(vec!["", "--debug", "--color"]);
+
MissingRequiredArgument

Error occurs when one or more required arguments missing

+ +

Examples

+
+let result = App::new("myprog")
+    .arg(Arg::with_name("debug")
+        .required(true))
+    .get_matches_from_safe(vec![""]);
+
MissingSubcommand

Error occurs when required subcommand missing

+ +

Examples

+
+let result = App::new("myprog")
+    .setting(AppSettings::SubcommandRequired)
+    .subcommand(SubCommand::with_name("config")
+        .about("Used for configuration")
+        .arg(Arg::with_name("config_file")
+            .help("The configuration file to use")
+            .index(1)))
+    .get_matches_from_safe(vec![""]);
+
MissingArgumentOrSubcommand

Occurs when no argument or subcommand has been supplied and +AppSettings::ArgRequiredElseHelp was used

+ +

Examples

+
+let result = App::new("myprog")
+    .setting(AppSettings::ArgRequiredElseHelp)
+    .subcommand(SubCommand::with_name("config")
+        .about("Used for configuration")
+        .arg(Arg::with_name("config_file")
+            .help("The configuration file to use")
+            .index(1)))
+    .get_matches_from_safe(vec![""]);
+
UnexpectedArgument

Error occurs when clap find argument while is was not expecting any

+ +

Examples

+
+let result = App::new("myprog")
+    .get_matches_from_safe(vec!["", "--arg"]);
+
UnexpectedMultipleUsage

Error occurs when argument was used multiple times and was not set as multiple.

+ +

Examples

+
+let result = App::new("myprog")
+    .arg(Arg::with_name("debug")
+        .multiple(false))
+    .get_matches_from_safe(vec!["", "--debug", "--debug"]);
+
InvalidUnicode

Error occurs when argument contains invalid unicode characters

+ +

Note: Non-Windows OS only

+ +

Examples

+
+let result = App::new("myprog")
+    .arg(Arg::with_name("debug")
+        .short("u")
+        .takes_value(true))
+    .get_matches_from_safe(vec![OsString::from_vec(vec![0x20]),
+                                OsString::from_vec(vec![0xE9])]);
+assert!(result.is_err());
+
HelpDisplayed

Not a true 'error' as it means --help or similar was used. The help message will be sent +to stdout unless the help is displayed due to an error (such as missing subcommands) at +which point it will be sent to stderr

+ +

Examples

+
+let result = App::new("myprog")
+    .get_matches_from_safe(vec!["", "--help"]);
+assert!(result.is_err());
+assert_eq!(result.unwrap_err().error_type, ClapErrorType::HelpDisplayed);
+
VersionDisplayed

Not a true 'error' as it means --version or similar was used. The message will be sent +to stdout

+ +

Examples

+
+let result = App::new("myprog")
+    .get_matches_from_safe(vec!["", "--version"]);
+assert!(result.is_err());
+assert_eq!(result.unwrap_err().error_type, ClapErrorType::VersionDisplayed);
+
InternalError

Represents an internal error, please consider filing a bug report if this happens!

+
Io

Represents an I/O error, typically white writing to stderr or stdout

+
Format

Represents an Rust Display Format error, typically white writing to stderr or stdout

+

Trait Implementations

Derived Implementations

impl PartialEq for ClapErrorType

fn eq(&self, __arg_0: &ClapErrorType) -> bool

+

fn ne(&self, __arg_0: &ClapErrorType) -> bool

+

impl Clone for ClapErrorType

fn clone(&self) -> ClapErrorType

+

1.0.0fn clone_from(&mut self, source: &Self)

+

impl Copy for ClapErrorType

impl Debug for ClapErrorType

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/enum.Format.html b/doc/clap/enum.Format.html new file mode 100644 index 00000000..35165d0b --- /dev/null +++ b/doc/clap/enum.Format.html @@ -0,0 +1,123 @@ + + + + + + + + + + clap::Format - Rust + + + + + + + + + + + + + + + + +
+

Enum clap::Format + + [] + + [src]

+
pub enum Format<T> {
+    Error(T),
+    Warning(T),
+    Good(T),
+}

Defines styles for different types of error messages. Defaults to Error=Red, Warning=Yellow, +and Good=Green

+

Variants

+
Error

Defines the style used for errors, defaults to Red

+
Warning

Defines the style used for warnings, defaults to Yellow

+
Good

Defines the style used for good values, defaults to Green

+

Trait Implementations

impl<T: AsRef<str>> Display for Format<T>

fn fmt(&self, f: &mut Formatter) -> Result

+

Derived Implementations

impl<T: Debug> Debug for Format<T>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/errors/enum.ClapErrorType.html b/doc/clap/errors/enum.ClapErrorType.html new file mode 100644 index 00000000..1177f3b9 --- /dev/null +++ b/doc/clap/errors/enum.ClapErrorType.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../clap/enum.ClapErrorType.html...

+ + + \ No newline at end of file diff --git a/doc/clap/errors/index.html b/doc/clap/errors/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/errors/sidebar-items.js b/doc/clap/errors/sidebar-items.js new file mode 100644 index 00000000..9a440fab --- /dev/null +++ b/doc/clap/errors/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["ClapErrorType","Command line argument parser error types"]],"struct":[["ClapError","Command line argument parser error"]]}); \ No newline at end of file diff --git a/doc/clap/errors/struct.ClapError.html b/doc/clap/errors/struct.ClapError.html new file mode 100644 index 00000000..bb1d07b6 --- /dev/null +++ b/doc/clap/errors/struct.ClapError.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../clap/struct.ClapError.html...

+ + + \ No newline at end of file diff --git a/doc/clap/fmt/enum.Format.html b/doc/clap/fmt/enum.Format.html new file mode 100644 index 00000000..e0cf4217 --- /dev/null +++ b/doc/clap/fmt/enum.Format.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../clap/enum.Format.html...

+ + + \ No newline at end of file diff --git a/doc/clap/fmt/index.html b/doc/clap/fmt/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/fmt/sidebar-items.js b/doc/clap/fmt/sidebar-items.js new file mode 100644 index 00000000..86b6b0b7 --- /dev/null +++ b/doc/clap/fmt/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["Format","Defines styles for different types of error messages. Defaults to Error=Red, Warning=Yellow, and Good=Green"]]}); \ No newline at end of file diff --git a/doc/clap/index.html b/doc/clap/index.html new file mode 100644 index 00000000..819d0b75 --- /dev/null +++ b/doc/clap/index.html @@ -0,0 +1,864 @@ + + + + + + + + + + clap - Rust + + + + + + + + + + + + + + + + +
+

Crate clap + + [] + + [src]

+

Command Line Argument Parser for Rust

+ +

It is a simple to use, efficient, and full featured library for parsing +command line arguments +and subcommands when writing console, or terminal applications.

+ +

About

+

clap is used to parse and validate the string of command line arguments +provided by the +user at runtime. You provide the list of valid possibilities, and clap +handles the rest. This +means you focus on your applications functionality, and less on the +parsing and validating of +arguments.

+ +

clap also provides the traditional version and help switches (or flags) +'for free' meaning +automatically with no configuration. It does this by checking list of valid +possibilities you +supplied and if you haven't them already (or only defined some of them), +clap will auto- +generate the applicable ones. If you are using subcommands, clap will +also auto-generate a +help subcommand for you in addition to the traditional flags.

+ +

Once clap parses the user provided string of arguments, it returns the +matches along with any +applicable values. If the user made an error or typo, clap informs them +of the mistake and +exits gracefully. Because of this, you can make reasonable assumptions in +your code about the +validity of the arguments.

+ +

FAQ

+

For a full FAQ and more in depth details, see +the wiki page

+ +

Comparisons

+

First, let me say that these comparisons are highly subjective, and not +meant +in a critical or harsh manner. All the argument parsing libraries out there +(to include clap) have their own strengths and weaknesses. Sometimes it +just +comes down to personal taste when all other factors are equal. When in +doubt, +try them all and pick one that you enjoy :) There's plenty of room in the +Rust +community for multiple implementations!

+ +

How does clap compare to getopts?

+

getopts is a very basic, +fairly +minimalist argument parsing library. This isn't a bad thing, sometimes you +don't need tons of features, you just want to parse some simple arguments, +and +have some help text generated for you based on valid arguments you specify. +When using getopts you must manually implement most of the common features +(such as checking to display help messages, usage strings, etc.). If you +want a +highly custom argument parser, and don't mind writing most the argument +parser +yourself, getopts is an excellent base.

+ +

Due to it's lack of features, getopts also doesn't allocate much, or at +all. +This gives it somewhat of a performance boost. Although, as you start +implementing those features you need manually, that boost quickly +disappears.

+ +

Personally, I find many, many people that use getopts are manually +implementing features that clap has by default. Using clap simplifies +your +codebase allowing you to focus on your application, and not argument +parsing.

+ +

Reasons to use getopts instead of clap

+ +
    +
  • You need a few allocations as possible, don't plan on implementing any +additional features
  • +
  • You want a highly custom argument parser, but want to use an established +parser as a base
  • +
+ +

How does clap compare to docopt.rs?

+

I first want to say I'm a big a fan of BurntSushi's work, the creator of +Docopt.rs. I aspire to produce the +quality of libraries that this man does! When it comes to comparing these +two +libraries they are very different. docopt tasks you with writing a help +message, and then it parsers that message for you to determine all valid +arguments and their use. Some people LOVE this, others not so much. If +you're +willing to write a detailed help message, it's nice that you can stick that +in +your program and have docopt do the rest. On the downside, it's somewhat +less +flexible than other options out there, and requires the help message change +if +you need to make changes.

+ +

docopt is also excellent at translating arguments into Rust types +automatically. There is even a syntax extension which will do all this for +you, +ifou to manually translate from arguments to Rust types). To use +BurntSushi's +words, docopt is also somewhat of a black box. You get what you get, and +it's +hard to tweak implementation or customise your experience for your use case.

+ +

Because docopt is doing a ton of work to parse your help messages and +determine what you were trying to communicate as valid arguments, it's also +one +of the more heavy weight parsers performance-wise. For most applications +this +isn't a concern, but it's something to keep in mind.

+ +

Reasons to use docopt instead of clap +* You want automatic translation from arguments to Rust types, and are +using a + nightly compiler + * Performance isn't a concern + * You don't have any complex relationships between arguments

+ +

All else being equal, what are some reasons to use clap?

+

clap is fast, and as lightweight as possible while still giving all the +features you'd expect from a modern argument parser. If you use clap when +just need some simple arguments parsed, you'll find it a walk in the park. +But +clap also makes it possible to represent extremely complex, and advanced +requirements, without too much thought. clap aims to be intuitive, easy to +use, and fully capable for wide variety use cases and needs.

+ +

Quick Examples

+

The following examples show a quick example of some of the very basic +functionality of clap. +For more advanced usage, such as requirements, exclusions, groups, multiple +values and +occurrences see the video tutorials, +documentation, or +examples/ directory of this crate's repository.

+ +

NOTE: All these examples are functionally the same, but show three +different styles in +which to use clap

+ +
+// (Full example with detailed comments in examples/01a_quick_example.rs)
+//
+// This example demonstrates clap's "usage strings" method of creating
+// arguments which is less less verbose
+extern crate clap;
+use clap::{Arg, App, SubCommand};
+
+fn main() {
+    let matches = App::new("myapp")
+        .version("1.0")
+        .author("Kevin K. <kbknapp@gmail.com>")
+        .about("Does awesome things")
+        .args_from_usage(
+            "-c --config=[CONFIG] 'Sets a custom config file'
+             <INPUT> 'Sets the input file to use'
+             [debug]... -d 'Sets the level of debugging information'")
+        .subcommand(SubCommand::with_name("test")
+            .about("controls testing features")
+            .version("1.3")
+            .author("Someone E. <someone_else@other.com>")
+            .arg_from_usage(
+                "-v --verbose 'Print test information verbosely'"))
+        .get_matches();
+
+    // Calling .unwrap() is safe here because "INPUT" is required (if
+    // "INPUT" wasn't required we could have used an 'if let' to
+    // conditionally get the value)
+    println!("Using input file: {}", matches.value_of("INPUT").unwrap());
+
+    // Gets a value for config if supplied by user, or defaults to
+    // "default.conf"
+    let config = matches.value_of("CONFIG").unwrap_or("default.conf");
+    println!("Value for config: {}", config);
+
+    // Vary the output based on how many times the user used the "debug"
+    // flag (i.e. 'myapp -d -d -d' or 'myapp -ddd' vs 'myapp -d')
+    match matches.occurrences_of("debug") {
+        0 => println!("Debug mode is off"),
+        1 => println!("Debug mode is kind of on"),
+        2 => println!("Debug mode is on"),
+        3 | _ => println!("Don't be crazy"),
+    }
+
+    // You can information about subcommands by requesting their matches by
+    // name (as below), requesting just the name used, or both at the same
+    // time
+    if let Some(matches) = matches.subcommand_matches("test") {
+        if matches.is_present("verbose") {
+            println!("Printing verbosely...");
+        } else {
+            println!("Printing normally...");
+        }
+    }
+
+    // more program logic goes here...
+}
+ +

The following example is functionally the same as the one above, but this +method allows more +advanced configuration options (not shown in this small example), or even +dynamically +generating arguments when desired. Both methods can be used together to get +the best of both +worlds (see the documentation, examples/, or video tutorials).

+ +
+// (Full example with detailed comments in examples/01b_quick_example.rs)
+//
+// This example demonstrates clap's full 'builder pattern' style of
+// creating arguments which is
+// more verbose, but allows easier editing, and at times more advanced
+// options, or the possibility
+// to generate arguments dynamically.
+extern crate clap;
+use clap::{Arg, App, SubCommand};
+
+fn main() {
+    let matches = App::new("myapp")
+        .version("1.0")
+        .author("Kevin K. <kbknapp@gmail.com>")
+        .about("Does awesome things")
+        .arg(Arg::with_name("CONFIG")
+            .short("c")
+            .long("config")
+            .help("Sets a custom config file")
+            .takes_value(true))
+        .arg(Arg::with_name("INPUT")
+            .help("Sets the input file to use")
+            .required(true)
+            .index(1))
+        .arg(Arg::with_name("debug")
+            .short("d")
+            .multiple(true)
+            .help("Sets the level of debugging information"))
+        .subcommand(SubCommand::with_name("test")
+            .about("controls testing features")
+            .version("1.3")
+            .author("Someone E. <someone_else@other.com>")
+            .arg(Arg::with_name("verbose")
+                .short("v")
+                .help("print test information verbosely")))
+        .get_matches();
+
+    // Calling .unwrap() is safe here because "INPUT" is required (if
+    // "INPUT" wasn't required we could have used an 'if let' to
+    // conditionally get the value)
+    println!("Using input file: {}", matches.value_of("INPUT").unwrap());
+
+    // Gets a value for config if supplied by user, or defaults to
+    // "default.conf"
+    let config = matches.value_of("CONFIG").unwrap_or("default.conf");
+    println!("Value for config: {}", config);
+
+    // Vary the output based on how many times the user used the "debug"
+    // flag (i.e. 'myapp -d -d -d' or 'myapp -ddd' vs 'myapp -d')
+    match matches.occurrences_of("debug") {
+        0 => println!("Debug mode is off"),
+        1 => println!("Debug mode is kind of on"),
+        2 => println!("Debug mode is on"),
+        3 | _ => println!("Don't be crazy"),
+    }
+
+    // You can information about subcommands by requesting their matches by
+    // name (as below), requesting just the name used, or both at the same
+    // time
+    if let Some(matches) = matches.subcommand_matches("test") {
+        if matches.is_present("verbose") {
+            println!("Printing verbosely...");
+        } else {
+            println!("Printing normally...");
+        }
+    }
+
+    // more program logic goes here...
+}
+ +

The following combines the previous two examples by using the simplicity of +the from_usage +methods and the performance of the Builder Pattern.

+ +
+// (Full example with detailed comments in examples/01c_quick_example.rs)
+//
+// This example demonstrates clap's "usage strings" method of creating
+// arguments which is less verbose
+#[macro_use]
+extern crate clap;
+
+fn main() {
+    let matches = clap_app!(myapp =>
+        (version: "1.0")
+        (author: "Kevin K. <kbknapp@gmail.com>")
+        (about: "Does awesome things")
+        (@arg CONFIG: -c --config +takes_value "Sets a custom config file")
+        (@arg INPUT: +required "Sets the input file to use")
+        (@arg debug: -d ... "Sets the level of debugging information")
+        (@subcommand test =>
+            (about: "controls testing features")
+            (version: "1.3")
+            (author: "Someone E. <someone_else@other.com>")
+            (@arg verbose: -v --verbose "Print test information verbosely")
+        )
+    ).get_matches();
+
+    // Calling .unwrap() is safe here because "INPUT" is required (if
+    // "INPUT" wasn't required we could have used an 'if let' to
+    // conditionally get the value)
+    println!("Using input file: {}", matches.value_of("INPUT").unwrap());
+
+    // Gets a value for config if supplied by user, or defaults to
+    // "default.conf"
+    let config = matches.value_of("CONFIG").unwrap_or("default.conf");
+    println!("Value for config: {}", config);
+
+    // Vary the output based on how many times the user used the "debug"
+    // flag (i.e. 'myapp -d -d -d' or 'myapp -ddd' vs 'myapp -d')
+    match matches.occurrences_of("debug") {
+        0 => println!("Debug mode is off"),
+        1 => println!("Debug mode is kind of on"),
+        2 => println!("Debug mode is on"),
+        3 | _ => println!("Don't be crazy"),
+    }
+
+    // You can information about subcommands by requesting their matches by
+    // name (as below), requesting just the name used, or both at the same
+    // time
+    if let Some(matches) = matches.subcommand_matches("test") {
+        if matches.is_present("verbose") {
+            println!("Printing verbosely...");
+        } else {
+            println!("Printing normally...");
+        }
+    }
+
+    // more program logic goes here...
+}
+ +

This final method shows how you can use a YAML file to build your CLI and +keep your Rust source +tidy. First, create the cli.yml file to hold your CLI options, but it +could be called +anything we like (we'll use the same both examples above to keep it +functionally equivalent):

+ +
name: myapp
+version: 1.0
+author: Kevin K. <kbknapp@gmail.com>
+about: Does awesome things
+args:
+    - CONFIG:
+        short: c
+        long: config
+        help: Sets a custom config file
+        takes_value: true
+    - INPUT:
+        help: Sets the input file to use
+        required: true
+        index: 1
+    - debug:
+        short: d
+        multiple: true
+        help: Sets the level of debugging information
+subcommands:
+    - test:
+        about: controls testing features
+        version: 1.3
+        author: Someone E. <someone_else@other.com>
+        args:
+            - verbose:
+                short: v
+                help: print test information verbosely
+
+ +

Now we create our main.rs file just like we would have with the previous +two examples:

+ +
+// (Full example with detailed comments in examples/17_yaml.rs)
+//
+// This example demonstrates clap's building from YAML style of creating
+arguments which is far
+// more clean, but takes a very small performance hit compared to the other
+two methods.
+#[macro_use]
+extern crate clap;
+use clap::App;
+
+fn main() {
+// The YAML file is found relative to the current file, similar to how
+modules are found
+    let yaml = load_yaml!("cli.yml");
+    let matches = App::from_yaml(yaml).get_matches();
+
+// Calling .unwrap() is safe here because "INPUT" is required (if
+"INPUT" wasn't
+// required we could have used an 'if let' to conditionally get the
+value)
+    println!("Using input file: {}", matches.value_of("INPUT").unwrap());
+
+// Gets a value for config if supplied by user, or defaults to
+"default.conf"
+    let config = matches.value_of("CONFIG").unwrap_or("default.conf");
+    println!("Value for config: {}", config);
+
+// Vary the output based on how many times the user used the "debug"
+flag
+    // (i.e. 'myapp -d -d -d' or 'myapp -ddd' vs 'myapp -d'
+    match matches.occurrences_of("debug") {
+        0 => println!("Debug mode is off"),
+        1 => println!("Debug mode is kind of on"),
+        2 => println!("Debug mode is on"),
+        3 | _ => println!("Don't be crazy"),
+    }
+
+// You can information about subcommands by requesting their matches by
+name
+    // (as below), requesting just the name used, or both at the same time
+    if let Some(matches) = matches.subcommand_matches("test") {
+        if matches.is_present("verbose") {
+            println!("Printing verbosely...");
+        } else {
+            println!("Printing normally...");
+        }
+    }
+
+    // more program logic goes here...
+}
+ +

If you were to compile any of the above programs and run them with the flag +--help or -h +(or help subcommand, since we defined test as a subcommand) the +following would be output

+ +

NOTE: The YAML option requires adding a special features flag when +compiling clap +because it is not compiled by default since it takes additional +dependencies that some people +may not need. Simply change your clap = "1" to clap = {version = "1", features = ["yaml"]} +in your Cargo.toml to use the YAML version.

+ +
$ myapp --help
+myapp 1.0
+Kevin K. <kbknapp@gmail.com>
+Does awesome things
+
+USAGE:
+    MyApp [FLAGS] [OPTIONS] <INPUT> [SUBCOMMAND]
+
+FLAGS:
+    -d               Turn debugging information on
+    -h, --help       Prints this message
+    -V, --version    Prints version information
+
+OPTIONS:
+    -c, --config <CONFIG>    Sets a custom config file
+
+ARGS:
+    INPUT    The input file to use
+
+SUBCOMMANDS:
+    help    Prints this message
+    test    Controls testing features
+
+ +

NOTE: You could also run myapp test --help to see similar output and +options for the +test subcommand.

+ +

Try it!

+

Pre-Built Test

+

To try out the pre-built example, use the following steps:

+ +
    +
  • Clone the repo $ git clone https://github.com/kbknapp/clap-rs && cd clap-rs/clap-tests
  • +
  • Compile the example $ cargo build --release
  • +
  • Run the help info $ ./target/release/claptests --help
  • +
  • Play with the arguments!
  • +
+ +

BYOB (Build Your Own Binary)

+

To test out clap's default auto-generated help/version follow these steps: +* Create a new cargo project $ cargo new fake --bin && cd fake +* Add clap to your Cargo.toml +* +toml [dependencies] clap = "1"

+ +
    +
  • Add the following to your src/main.rs
  • +
+ +
+extern crate clap;
+use clap::App;
+
+fn main() {
+  let _ = App::new("fake").version("v1.0-beta").get_matches();
+}
+ +
    +
  • Build your program $ cargo build --release
  • +
  • Run w/ help or version $ ./target/release/fake --help or $ ./target/release/fake --version
  • +
+ +

Usage

+

For full usage, add clap as a dependency in your Cargo.toml file to use +from crates.io:

+ +
 [dependencies]
+ clap = "1"
+
+ +

Or track the latest on the master branch at github:

+ +
[dependencies.clap]
+git = "https://github.com/kbknapp/clap-rs.git"
+
+ +

Add extern crate clap; to your crate root.

+ +

Define a list of valid arguments for your program (see the +documentation or +examples/ directory of this repo)

+ +

Then run cargo build or cargo update && cargo build for your project.

+ +

Optional Dependencies / Features

+

If you'd like to keep your dependency list to only clap, you can +disable any features +that require an additional dependency. To do this, add this to your +Cargo.toml:

+ +
[dependencies.clap]
+version = "1"
+default-features = false
+
+ +

You can also selectively enable only the features you'd like to include, by +adding:

+ +
[dependencies.clap]
+version = "1"
+default-features = false
+
+# Cherry-pick the features you'd like to use
+features = [ "suggestions", "color" ]
+
+ +

The following is a list of optional clap features:

+ +
    +
  • "suggestions": Turns on the Did you mean '--myoption' ? feature for +when users make +typos.
  • +
  • "color": Turns on red error messages. This feature only works on +non-Windows OSs.
  • +
  • "lints": This is not included by default and should only be used +while developing to +run basic lints against changes. This can only be used on Rust nightly.
  • +
+ +

Dependencies Tree

+

The following graphic depicts claps dependency graph.

+ +
    +
  • Dashed Line: Optional dependency
  • +
  • Red Color: NOT included by default (must use cargo features to +enable)
  • +
+ +

clap dependencies

+ +

More Information

+

You can find complete documentation on the github-pages site for +this project.

+ +

You can also find usage examples in the examples/ directory of +this repo.

+ +

Video Tutorials

+

There's also the video tutorial series [Argument Parsing with Rust]video +tutorials that I've +been working on.

+ +

Note: Two new videos have just been added (08 From +Usage, and +09 Typed Values), if you're already +familiar with clap but +want to know more about these two details you can check out those videos +without watching the +previous few.

+ +

Note: Apologies for the resolution of the first video, it will be updated +to a better +resolution soon. The other videos have a proper resolution.

+ +

Running the tests

+

If contributing, you can run the tests as follows (assuming you're in the +clap-rs directory)

+ +
cargo test --features yaml && make -C clap-tests test
+
+ +

License

+

clap is licensed under the MIT license. Please read the +LICENSE-MIT +file in +this repository for more information.

+

Macros

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
arg_enum! +

Convenience macro to generate more complete enums with variants to be used as a type when +parsing arguments. This enum also provides a variants() function which can be used to retrieve a +Vec<&'static str> of the variant names.

+
clap_app! +

App, Arg, SubCommand and Group builder macro (Usage-string like input)

+
crate_version! +

Allows you pull the version for an from your Cargo.toml as MAJOR.MINOR.PATCH_PKGVERSION_PRE

+
simple_enum! +

Convenience macro generated a simple enum with variants to be used as a type when parsing +arguments. This enum also provides a variants() function which can be used to retrieve a +Vec<&'static str> of the variant names.

+
value_t! +

Convenience macro getting a typed value T where T implements std::str::FromStr +This macro returns a Result<T,String> which allows you as the developer to decide +what you'd like to do on a failed parse. There are two types of errors, parse failures +and those where the argument wasn't present (such as a non-required argument).

+
value_t_or_exit! +

Convenience macro getting a typed value T where T implements std::str::FromStr +This macro returns a T or Vec<T> or exits with a usage string upon failure. This +removes some of the boiler plate to handle failures from value_t! above.

+

Structs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
App +

Used to create a representation of a command line program and all possible command line +arguments.

+
Arg +

The abstract representation of a command line argument used by the consumer of the library. +Used to set all the options and relationships that define a valid argument for the program.

+
ArgGroup +

ArgGroups are a family of related arguments and way for you to say, "Any of these arguments". +By placing arguments in a logical group, you can make easier requirement and exclusion rules +instead of having to list each individually, or when you want a rule to apply "any but not all" +arguments.

+
ArgMatches +

Used to get information about the arguments that where supplied to the program at runtime by +the user. To get a new instance of this struct you use .get_matches() of the App struct.

+
ClapError +

Command line argument parser error

+
SubCommand +

The abstract representation of a command line subcommand used by the consumer of the library.

+

Enums

+ + + + + + + + + + + + + + + +
AppSettings +

Application level settings, which affect how App operates

+
ClapErrorType +

Command line argument parser error types

+
Format +

Defines styles for different types of error messages. Defaults to Error=Red, Warning=Yellow, +and Good=Green

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/macro.arg_enum!.html b/doc/clap/macro.arg_enum!.html new file mode 100644 index 00000000..9153d17a --- /dev/null +++ b/doc/clap/macro.arg_enum!.html @@ -0,0 +1,148 @@ + + + + + + + + + + clap::arg_enum! - Rust + + + + + + + + + + + + + + + + +
+

clap::arg_enum! + + [] + + [src]

+
+macro_rules! arg_enum {
+    (enum $e:ident { $($v:ident),+ } ) => { ... };
+    (pub enum $e:ident { $($v:ident),+ } ) => { ... };
+    (#[derive($($d:ident),+)] enum $e:ident { $($v:ident),+ } ) => { ... };
+    (#[derive($($d:ident),+)] pub enum $e:ident { $($v:ident),+ } ) => { ... };
+}
+

Convenience macro to generate more complete enums with variants to be used as a type when +parsing arguments. This enum also provides a variants() function which can be used to retrieve a +Vec<&'static str> of the variant names.

+ +

NOTE: Case insensitivity is supported for ASCII characters

+ +

NOTE: This macro automatically implements std::str::FromStr and std::fmt::Display

+ +

These enums support pub (or not) and use of the #[derive()] traits

+ +

Examples

+
+arg_enum!{
+    #[derive(Debug)]
+    pub enum Foo {
+        Bar,
+        Baz,
+        Qux
+    }
+}
+// Foo enum can now be used via Foo::Bar, or Foo::Baz, etc
+// and implements std::str::FromStr to use with the value_t! macros
+fn main() {
+    let m = App::new("app")
+                .arg_from_usage("<foo> 'the foo'")
+                .get_matches();
+    let f = value_t_or_exit!(m.value_of("foo"), Foo);
+
+    // Use f like any other Foo variant...
+}
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/macro.clap_app!.html b/doc/clap/macro.clap_app!.html new file mode 100644 index 00000000..2a9d1027 --- /dev/null +++ b/doc/clap/macro.clap_app!.html @@ -0,0 +1,144 @@ + + + + + + + + + + clap::clap_app! - Rust + + + + + + + + + + + + + + + + +
+

clap::clap_app! + + [] + + [src]

+
+macro_rules! clap_app {
+    (@app ($builder:expr)) => { ... };
+    (@app ($builder:expr) (@arg $name:ident: $($tail:tt)*) $($tt:tt)*) => { ... };
+    (@app ($builder:expr) (@setting $setting:ident) $($tt:tt)*) => { ... };
+    (@app ($builder:expr) (@attributes $($attr:tt)*) $($tt:tt)*) => { ... };
+    (@app ($builder:expr) (@group $name:ident => $($tail:tt)*) $($tt:tt)*) => { ... };
+    (@app ($builder:expr) (@subcommand $name:ident => $($tail:tt)*) $($tt:tt)*) => { ... };
+    (@app ($builder:expr) ($ident:ident: $($v:expr),*) $($tt:tt)*) => { ... };
+    (@group ($builder:expr, $group:expr)) => { ... };
+    (@group ($builder:expr, $group:expr) (@attributes $($attr:tt)*) $($tt:tt)*) => { ... };
+    (@group ($builder:expr, $group:expr) (@arg $name:ident: $($tail:tt)*) $($tt:tt)*) => { ... };
+    (@arg ($arg:expr) $modes:tt) => { ... };
+    (@arg ($arg:expr) $modes:tt --$long:ident $($tail:tt)*) => { ... };
+    (@arg ($arg:expr) $modes:tt -$short:ident $($tail:tt)*) => { ... };
+    (@arg ($arg:expr) (-) <$var:ident> $($tail:tt)*) => { ... };
+    (@arg ($arg:expr) (+) <$var:ident> $($tail:tt)*) => { ... };
+    (@arg ($arg:expr) (-) [$var:ident] $($tail:tt)*) => { ... };
+    (@arg ($arg:expr) (+) [$var:ident] $($tail:tt)*) => { ... };
+    (@arg ($arg:expr) $modes:tt ... $($tail:tt)*) => { ... };
+    (@arg ($arg:expr) $modes:tt #{$n:expr, $m:expr} $($tail:tt)*) => { ... };
+    (@arg ($arg:expr) $modes:tt * $($tail:tt)*) => { ... };
+    (@arg ($arg:expr) $modes:tt !$ident $($tail:tt)*) => { ... };
+    (@arg ($arg:expr) $modes:tt +$ident:ident $($tail:tt)*) => { ... };
+    (@arg ($arg:expr) $modes:tt {$fn_:expr} $($tail:tt)*) => { ... };
+    (@as_expr $expr:expr) => { ... };
+    (@arg ($arg:expr) $modes:tt $desc:tt) => { ... };
+    (@arg ($arg:expr) $modes:tt $ident:ident[$($target:ident)*] $($tail:tt)*) => { ... };
+    (@arg ($arg:expr) $modes:tt $ident:ident($($expr:expr)*) $($tail:tt)*) => { ... };
+    (@subcommand $name:ident => $($tail:tt)*) => { ... };
+    ($name:ident => $($tail:tt)*) => { ... };
+}
+

App, Arg, SubCommand and Group builder macro (Usage-string like input)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/macro.crate_version!.html b/doc/clap/macro.crate_version!.html new file mode 100644 index 00000000..764da72b --- /dev/null +++ b/doc/clap/macro.crate_version!.html @@ -0,0 +1,122 @@ + + + + + + + + + + clap::crate_version! - Rust + + + + + + + + + + + + + + + + +
+

clap::crate_version! + + [] + + [src]

+
+macro_rules! crate_version {
+    () => { ... };
+}
+

Allows you pull the version for an from your Cargo.toml as MAJOR.MINOR.PATCH_PKGVERSION_PRE

+ +

Examples

+
+    let m = App::new("app")
+                .version(&crate_version!()[..])
+                .get_matches();
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/macro.simple_enum!.html b/doc/clap/macro.simple_enum!.html new file mode 100644 index 00000000..46a516fb --- /dev/null +++ b/doc/clap/macro.simple_enum!.html @@ -0,0 +1,136 @@ + + + + + + + + + + clap::simple_enum! - Rust + + + + + + + + + + + + + + + + +
+

clap::simple_enum! + + [] + + [src]

+
+macro_rules! simple_enum {
+    ($e:ident => $($v:ident),+) => { ... };
+}
+

Convenience macro generated a simple enum with variants to be used as a type when parsing +arguments. This enum also provides a variants() function which can be used to retrieve a +Vec<&'static str> of the variant names.

+ +

NOTE: This macro automatically implements std::str::FromStr and std::fmt::Display

+ +

Examples

+
+simple_enum!{Foo => Bar, Baz, Qux}
+// Foo enum can now be used via Foo::Bar, or Foo::Baz, etc
+// and implements std::str::FromStr to use with the value_t! macros
+fn main() {
+    let enum_vals = ["Bar", "Baz", "Qux"];
+    let m = App::new("app")
+                .arg(Arg::from_usage("<foo> 'the foo'")
+                    .possible_values(&enum_vals))
+                .get_matches();
+    let f = value_t_or_exit!(m.value_of("foo"), Foo);
+
+    // Use f like any other Foo variant...
+}
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/macro.value_t!.html b/doc/clap/macro.value_t!.html new file mode 100644 index 00000000..e395efde --- /dev/null +++ b/doc/clap/macro.value_t!.html @@ -0,0 +1,151 @@ + + + + + + + + + + clap::value_t! - Rust + + + + + + + + + + + + + + + + +
+

clap::value_t! + + [] + + [src]

+
+macro_rules! value_t {
+    ($m:ident.value_of($v:expr), $t:ty) => { ... };
+    ($m:ident.values_of($v:expr), $t:ty) => { ... };
+}
+

Convenience macro getting a typed value T where T implements std::str::FromStr +This macro returns a Result<T,String> which allows you as the developer to decide +what you'd like to do on a failed parse. There are two types of errors, parse failures +and those where the argument wasn't present (such as a non-required argument).

+ +

You can use it to get a single value, or a Vec<T> with the values_of()

+ +

NOTE: Be cautious, as since this a macro invocation it's not exactly like +standard syntax.

+ +

Examples single value

+
+let matches = App::new("myapp")
+              .arg_from_usage("[length] 'Set the length to use as a pos whole num, i.e. 20'")
+              .get_matches();
+let len = value_t!(matches.value_of("length"), u32)
+                .unwrap_or_else(|e|{
+                    println!("{}",e);
+                    std::process::exit(1)
+                });
+
+println!("{} + 2: {}", len, len + 2);
+ +

Examples multiple values

+
+let matches = App::new("myapp")
+              .arg_from_usage("[seq]... 'A sequence of pos whole nums, i.e. 20 45'")
+              .get_matches();
+for v in value_t!(matches.values_of("seq"), u32)
+            .unwrap_or_else(|e|{
+                println!("{}",e);
+                std::process::exit(1)
+            }) {
+    println!("{} + 2: {}", v, v + 2);
+}
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/macro.value_t_or_exit!.html b/doc/clap/macro.value_t_or_exit!.html new file mode 100644 index 00000000..0fefcbf0 --- /dev/null +++ b/doc/clap/macro.value_t_or_exit!.html @@ -0,0 +1,145 @@ + + + + + + + + + + clap::value_t_or_exit! - Rust + + + + + + + + + + + + + + + + +
+

clap::value_t_or_exit! + + [] + + [src]

+
+macro_rules! value_t_or_exit {
+    ($m:ident.value_of($v:expr), $t:ty) => { ... };
+    ($m:ident.values_of($v:expr), $t:ty) => { ... };
+}
+

Convenience macro getting a typed value T where T implements std::str::FromStr +This macro returns a T or Vec<T> or exits with a usage string upon failure. This +removes some of the boiler plate to handle failures from value_t! above.

+ +

You can use it to get a single value T, or a Vec<T> with the values_of()

+ +

NOTE: This should only be used on required arguments, as it can be confusing to the user +why they are getting error messages when it appears they're entering all required arguments.

+ +

NOTE: Be cautious, as since this a macro invocation it's not exactly like +standard syntax.

+ +

Examples single value

+
+let matches = App::new("myapp")
+              .arg_from_usage("[length] 'Set the length to use as a pos whole num, i.e. 20'")
+              .get_matches();
+let len = value_t_or_exit!(matches.value_of("length"), u32);
+
+println!("{} + 2: {}", len, len + 2);
+ +

Examples multiple values

+
+let matches = App::new("myapp")
+                  .arg_from_usage("[seq]... 'A sequence of pos whole nums, i.e. 20 45'")
+                  .get_matches();
+for v in value_t_or_exit!(matches.values_of("seq"), u32) {
+    println!("{} + 2: {}", v, v + 2);
+}
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/macros/index.html b/doc/clap/macros/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/macros/sidebar-items.js b/doc/clap/macros/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/clap/macros/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/clap/sidebar-items.js b/doc/clap/sidebar-items.js new file mode 100644 index 00000000..b6236ebf --- /dev/null +++ b/doc/clap/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["AppSettings","Application level settings, which affect how `App` operates"],["ClapErrorType","Command line argument parser error types"],["Format","Defines styles for different types of error messages. Defaults to Error=Red, Warning=Yellow, and Good=Green"]],"macro":[["arg_enum!","Convenience macro to generate more complete enums with variants to be used as a type when parsing arguments. This enum also provides a `variants()` function which can be used to retrieve a `Vec<&'static str>` of the variant names."],["clap_app!","App, Arg, SubCommand and Group builder macro (Usage-string like input)"],["crate_version!","Allows you pull the version for an from your Cargo.toml as MAJOR.MINOR.PATCH_PKGVERSION_PRE"],["simple_enum!","Convenience macro generated a simple enum with variants to be used as a type when parsing arguments. This enum also provides a `variants()` function which can be used to retrieve a `Vec<&'static str>` of the variant names."],["value_t!","Convenience macro getting a typed value `T` where `T` implements `std::str::FromStr` This macro returns a `Result` which allows you as the developer to decide what you'd like to do on a failed parse. There are two types of errors, parse failures and those where the argument wasn't present (such as a non-required argument)."],["value_t_or_exit!","Convenience macro getting a typed value `T` where `T` implements `std::str::FromStr` This macro returns a `T` or `Vec` or exits with a usage string upon failure. This removes some of the boiler plate to handle failures from value_t! above."]],"struct":[["App","Used to create a representation of a command line program and all possible command line arguments."],["Arg","The abstract representation of a command line argument used by the consumer of the library. Used to set all the options and relationships that define a valid argument for the program."],["ArgGroup","`ArgGroup`s are a family of related arguments and way for you to say, \"Any of these arguments\". By placing arguments in a logical group, you can make easier requirement and exclusion rules instead of having to list each individually, or when you want a rule to apply \"any but not all\" arguments."],["ArgMatches","Used to get information about the arguments that where supplied to the program at runtime by the user. To get a new instance of this struct you use `.get_matches()` of the `App` struct."],["ClapError","Command line argument parser error"],["SubCommand","The abstract representation of a command line subcommand used by the consumer of the library."]]}); \ No newline at end of file diff --git a/doc/clap/struct.App.html b/doc/clap/struct.App.html new file mode 100644 index 00000000..ea9922e6 --- /dev/null +++ b/doc/clap/struct.App.html @@ -0,0 +1,775 @@ + + + + + + + + + + clap::App - Rust + + + + + + + + + + + + + + + + +
+

Struct clap::App + + [] + + [src]

+
pub struct App<'a, 'v, 'ab, 'u, 'h, 'ar> {
+    // some fields omitted
+}

Used to create a representation of a command line program and all possible command line +arguments.

+ +

Application settings are set using the "builder pattern" with .get_matches() being the +terminal method that starts the runtime-parsing process and returns information about +the user supplied arguments (or lack there of).

+ +

There aren't any mandatory "options" that one must set. The "options" may also appear in any +order (so long as .get_matches() is the last method called).

+ +

Examples

+
+let matches = App::new("myprog")
+                  .author("Me, me@mail.com")
+                  .version("1.0.2")
+                  .about("Explains in brief what the program does")
+                  .arg(
+                           Arg::with_name("in_file").index(1)
+                   )
+                  .after_help("Longer explaination to appear after the options when \
+                               displaying the help information from --help or -h")
+                  .get_matches();
+
+// Your program logic starts here...
+

Methods

impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>

fn new(n: &'ar str) -> Self

+

Creates a new instance of an application requiring a name (such as the binary). The name +will be displayed to the user when they request to print version or help and usage +information. The name should not contain spaces (hyphens '-' are ok).

+ +

Examples

+
+let prog = App::new("myprog")
+

fn author(self, a: &'a str) -> Self

+

Sets a string of author(s) and will be displayed to the user when they request the help +information with --help or -h.

+ +

Examples

+
+App::new("myprog")
+     .author("Me, me@mymain.com")
+

fn bin_name(self, a: &str) -> Self

+

Overrides the system-determined binary name. This should only be used when absolutely +neccessary, such as the binary name for your application is misleading, or perhaps not +how the user should invoke your program.

+ +

NOTE: This command should not be used for SubCommands.

+ +

Examples

+
+App::new("myprog")
+     .bin_name("my_binary")
+

fn about(self, a: &'ab str) -> Self

+

Sets a string briefly describing what the program does and will be displayed when +displaying help information.

+ +

Examples

+
+App::new("myprog")
+    .about("Does really amazing things to great people")
+

fn after_help(self, h: &'h str) -> Self

+

Adds additional help information to be displayed in addition to and directly after +auto-generated help. This information is displayed after the auto-generated help +information. This additional help is often used to describe how to use the arguments, +or caveats to be noted.

+ +

Examples

+
+App::new("myprog")
+    .after_help("Does really amazing things to great people")
+

fn subcommands_negate_reqs(self, n: bool) -> Self

+

Allows subcommands to override all requirements of the parent (this command). For example +if you had a subcommand or even top level application which had a required arguments that +are only required as long as there is no subcommand present.

+ +

Deprecated: Use App::setting() with AppSettings::SubcommandsNegateReqs instead. +This method will be removed at 2.x

+ +

NOTE: This defaults to false (using subcommand does not negate requirements)

+ +

Examples

+
+App::new("myprog")
+    .subcommands_negate_reqs(true)
+

fn subcommand_required(self, n: bool) -> Self

+

Allows specifying that if no subcommand is present at runtime, error and exit gracefully

+ +

Deprecated: Use App::setting() with AppSettings::SubcommandRequired instead. This +method will be removed at 2.x

+ +

NOTE: This defaults to false (subcommands do not need to be present)

+ +

Examples

+
+App::new("myprog")
+    .subcommand_required(true)
+

fn version(self, v: &'v str) -> Self

+

Sets a string of the version number to be displayed when displaying version or help +information.

+ +

Examples

+
+App::new("myprog")
+    .version("v0.1.24")
+

fn usage(self, u: &'u str) -> Self

+

Sets a custom usage string to override the auto-generated usage string.

+ +

This will be displayed to the user when errors are found in argument parsing, or when you +call ArgMatcher::usage()

+ +

NOTE: You do not need to specify the "USAGE: \n\t" portion, as that will +still be applied by clap, you only need to specify the portion starting +with the binary name.

+ +

NOTE: This will not replace the entire help message, only the portion +showing the usage.

+ +

Examples

+
+App::new("myprog")
+    .usage("myapp [-clDas] <some_file>")
+

fn help(self, h: &'u str) -> Self

+

Sets a custom help message and overrides the auto-generated one. This should only be used +when the auto-generated message does not suffice.

+ +

This will be displayed to the user when they use the default --help or -h

+ +

NOTE: This replaces the entire help message, so nothing will be auto-generated.

+ +

NOTE: This only replaces the help message for the current command, meaning if you +are using subcommands, those help messages will still be auto-generated unless you +specify a .help() for them as well.

+ +

Examples

+
+App::new("myapp")
+    .help("myapp v1.0\n\
+           Does awesome things\n\
+           (C) me@mail.com\n\n\
+
+           USAGE: myapp <opts> <comamnd>\n\n\
+
+           Options:\n\
+           -h, --helpe      Dispay this message\n\
+           -V, --version    Display version info\n\
+           -s <stuff>       Do something with stuff\n\
+           -v               Be verbose\n\n\
+
+           Commmands:\n\
+           help             Prints this message\n\
+           work             Do some work")
+

fn help_short(self, s: &str) -> Self

+

Sets the short version of the help argument without the preceding -.

+ +

By default clap automatically assigns h, but this can be overridden

+ +

NOTE: Any leading - characters will be stripped, and only the first +non - chacter will be used as the short version

+ +

Examples

+
+App::new("myprog")
+    // Using an uppercase `H` instead of the default lowercase `h`
+    .help_short("H")
+

fn version_short(self, s: &str) -> Self

+

Sets the short version of the version argument without the preceding -.

+ +

By default clap automatically assigns V, but this can be overridden

+ +

NOTE: Any leading - characters will be stripped, and only the first +non - chacter will be used as the short version

+ +

Examples

+
+App::new("myprog")
+    // Using a lowercase `v` instead of the default capital `V`
+    .version_short("v")
+

fn arg_required_else_help(self, tf: bool) -> Self

+

Specifies that the help text sould be displayed (and then exit gracefully), if no +arguments are present at runtime (i.e. an empty run such as, $ myprog.

+ +

Deprecated: Use App::setting() with AppSettings::ArgRequiredElseHelp instead. This +method will be removed at 2.x

+ +

NOTE: Subcommands count as arguments

+ +

Examples

+
+App::new("myprog")
+    .arg_required_else_help(true)
+

fn hidden(self, h: bool) -> Self

+

Hides a subcommand from help message output.

+ +

NOTE: This does not hide the subcommand from usage strings on error

+ +

Examples

+
+.hidden(true)
+

fn global_version(self, gv: bool) -> Self

+

Uses version of the current command for all subcommands. (Defaults to false; subcommands +have independant version strings)

+ +

Deprecated: Use App::setting() with AppSettings::GlobalVersion instead. This +method will be removed at 2.x

+ +

NOTE: The version for the current command and this setting must be set prior to +adding any subcommands

+ +

Examples

+
+App::new("myprog")
+    .version("v1.1")
+    .global_version(true)
+    .subcommand(SubCommand::with_name("test"))
+    .get_matches();
+// running `myprog test --version` will display
+// "myprog-test v1.1"
+

fn versionless_subcommands(self, vers: bool) -> Self

+

Disables -V and --version for all subcommands (Defaults to false; subcommands have +version flags)

+ +

Deprecated: Use App::setting() with AppSettings::VersionlessSubcommands instead. +This method will be removed at 2.x

+ +

NOTE: This setting must be set prior adding any subcommands

+ +

NOTE: Do not set this value to false, it will have undesired results!

+ +

Examples

+
+App::new("myprog")
+    .version("v1.1")
+    .versionless_subcommands(true)
+    .subcommand(SubCommand::with_name("test"))
+    .get_matches();
+// running `myprog test --version` will display unknown argument error
+

fn unified_help_message(self, uni_help: bool) -> Self

+

By default the auto-generated help message groups flags, options, and positional arguments +separately. This setting disable that and groups flags and options together presenting a +more unified help message (a la getopts or docopt style).

+ +

Deprecated: Use App::setting() with AppSettings::UnifiedHelpMessage instead. This +method will be removed at 2.x

+ +

NOTE: This setting is cosmetic only and does not affect any functionality.

+ +

Examples

+
+App::new("myprog")
+    .unified_help_message(true)
+    .get_matches();
+// running `myprog --help` will display a unified "docopt" or "getopts" style help message
+

fn wait_on_error(self, w: bool) -> Self

+

Will display a message "Press [ENTER]/[RETURN] to continue..." and wait user before +exiting

+ +

This is most useful when writing an application which is run from a GUI shortcut, or on +Windows where a user tries to open the binary by double-clicking instead of using the +command line (i.e. set .arg_required_else_help(true) and .wait_on_error(true) to +display the help in such a case).

+ +

Deprecated: Use App::setting() with AppSettings::WaitOnError instead. This +method will be removed at 2.x

+ +

NOTE: This setting is not recursive with subcommands, meaning if you wish this +behavior for all subcommands, you must set this on each command (needing this is extremely +rare)

+ +

Examples

+
+App::new("myprog")
+    .arg_required_else_help(true)
+

fn subcommand_required_else_help(self, tf: bool) -> Self

+

Specifies that the help text sould be displayed (and then exit gracefully), if no +subcommands are present at runtime (i.e. an empty run such as, $ myprog.

+ +

Deprecated: Use App::setting() with AppSettings::SubcommandRequiredElseHelp +instead. This method will be removed at 2.x

+ +

NOTE: This should not be used with .subcommand_required() as they do the same +thing, except one prints the help text, and one prints an error.

+ +

NOTE: If the user specifies arguments at runtime, but no subcommand the help text will +still be displayed and exit. If this is not the desired result, consider using +.arg_required_else_help()

+ +

Examples

+
+App::new("myprog")
+    .subcommand_required_else_help(true)
+

fn setting(self, setting: AppSettings) -> Self

+

Enables Application level settings, passed as argument

+ +

Examples

+
+App::new("myprog")
+    .setting(AppSettings::SubcommandRequired)
+    .setting(AppSettings::WaitOnError)
+

fn settings(self, settings: &[AppSettings]) -> Self

+

Enables multiple Application level settings, passed as argument

+ +

Examples

+
+App::new("myprog")
+    .settings( &[AppSettings::SubcommandRequired,
+                 AppSettings::WaitOnError])
+

fn arg(self, a: Arg<'ar, 'ar, 'ar, 'ar, 'ar, 'ar>) -> Self

+

Adds an argument to the list of valid possibilties manually. This method allows you full +control over the arguments settings and options (as well as dynamic generation). It also +allows you specify several more advanced configuration options such as relational rules +(exclusions and requirements).

+ +

The only disadvantage to this method is that it's more verbose, and arguments must be added +one at a time. Using Arg::from_usage helps with the verbosity, and still allows full +control over the advanced configuration options.

+ +

Examples

+
+App::new("myprog")
+    // Adding a single "flag" argument with a short and help text, using Arg::with_name()
+    .arg(
+        Arg::with_name("debug")
+           .short("d")
+           .help("turns on debugging mode")
+    )
+    // Adding a single "option" argument with a short, a long, and help text using the less
+    // verbose Arg::from_usage()
+    .arg(
+        Arg::from_usage("-c --config=[CONFIG] 'Optionally sets a config file to use'")
+    )
+

fn args(self, args: Vec<Arg<'ar, 'ar, 'ar, 'ar, 'ar, 'ar>>) -> Self

+

Adds multiple arguments to the list of valid possibilties by iterating over a Vec of Args

+ +

Examples

+
+App::new("myprog")
+    .args(
+        vec![Arg::from_usage("[debug] -d 'turns on debugging info"),
+             Arg::with_name("input").index(1).help("the input file to use")]
+    )
+

fn arg_from_usage(self, usage: &'ar str) -> Self

+

A convienience method for adding a single basic argument (one without advanced +relational rules) from a usage type string. The string used follows the same rules and +syntax as Arg::from_usage()

+ +

The downside to using this method is that you can not set any additional properties of the +Arg other than what Arg::from_usage() supports.

+ +

Examples

+
+App::new("myprog")
+    .arg_from_usage("-c --conf=<config> 'Sets a configuration file to use'")
+

fn args_from_usage(self, usage: &'ar str) -> Self

+

Adds multiple arguments at once from a usage string, one per line. See Arg::from_usage() +for details on the syntax and rules supported.

+ +

Like App::arg_from_usage() the downside is you only set properties for the Args which +Arg::from_usage() supports. But here the benefit is pretty strong, as the readability is +greatly enhanced, especially if you don't need any of the more advanced configuration +options.

+ +

Examples

+
+App::new("myprog")
+    .args_from_usage(
+        "-c --conf=[config] 'Sets a configuration file to use'
+         [debug]... -d 'Sets the debugging level'
+         <input> 'The input file to use'"
+    )
+

fn arg_group(self, group: ArgGroup<'ar, 'ar>) -> Self

+

Adds an ArgGroup to the application. ArgGroups are a family of related arguments. By +placing them in a logical group, you make easier requirement and exclusion rules. For +instance, you can make an ArgGroup required, this means that one (and only one) argument +from that group must be present. Using more than one argument from an ArgGroup causes a +failure (graceful exit).

+ +

You can also do things such as name an ArgGroup as a confliction, meaning any of the +arguments that belong to that group will cause a failure if present.

+ +

Perhaps the most common use of ArgGroups is to require one and only one argument to be +present out of a given set. For example, lets say that you were building an application +where one could set a given version number by supplying a string using an option argument, +such as --set-ver v1.2.3, you also wanted to support automatically using a previous +version numer and simply incrementing one of the three numbers, so you create three flags +--major, --minor, and --patch. All of these arguments shouldn't be used at one time +but perhaps you want to specify that at least one of them is used. You can create a +group

+ +

Examples

+
+.args_from_usage("--set-ver [ver] 'set the version manually'
+                  --major         'auto increase major'
+                  --minor         'auto increase minor'
+                  --patch         'auto increase patch")
+.arg_group(ArgGroup::with_name("vers")
+                    .add_all(&["ver", "major", "minor","patch"])
+                    .required(true))
+

fn arg_groups(self, groups: Vec<ArgGroup<'ar, 'ar>>) -> Self

+

Adds a ArgGroups to the application. ArgGroups are a family of related arguments. By +placing them in a logical group, you make easier requirement and exclusion rules. For +instance, you can make an ArgGroup required, this means that one (and only one) argument +from that group must be present. Using more than one argument from an ArgGroup causes a +failure (graceful exit).

+ +

You can also do things such as name an ArgGroup as a confliction, meaning any of the +arguments that belong to that group will cause a failure if present.

+ +

Perhaps the most common use of ArgGroups is to require one and only one argument to be +present out of a given set. For example, lets say that you were building an application +where one could set a given version number by supplying a string using an option argument, +such as --set-ver v1.2.3, you also wanted to support automatically using a previous +version numer and simply incrementing one of the three numbers, so you create three flags +--major, --minor, and --patch. All of these arguments shouldn't be used at one time +but perhaps you want to specify that at least one of them is used. You can create a +group

+ +

Examples

+
+.args_from_usage("--set-ver [ver] 'set the version manually'
+                  --major         'auto increase major'
+                  --minor         'auto increase minor'
+                  --patch         'auto increase patch")
+.arg_group(ArgGroup::with_name("vers")
+                    .add_all(&["ver", "major", "minor","patch"])
+                    .required(true))
+

fn subcommand(self, subcmd: App<'a, 'v, 'ab, 'u, 'h, 'ar>) -> Self

+

Adds a subcommand to the list of valid possibilties. Subcommands are effectively sub apps, +because they can contain their own arguments, subcommands, version, usage, etc. They also +function just like apps, in that they get their own auto generated help, version, and +usage.

+ +

Examples

+
+.subcommand(SubCommand::with_name("config")
+               .about("Controls configuration features")
+               .arg_from_usage("<config> 'Required configuration file to use'"))
+            // Additional subcommand configuration goes here, such as other arguments...
+

fn subcommands(self, subcmds: Vec<App<'a, 'v, 'ab, 'u, 'h, 'ar>>) -> Self

+

Adds multiple subcommands to the list of valid possibilties by iterating over a Vec of +SubCommands

+ +

Examples

+
+.subcommands( vec![
+       SubCommand::with_name("config").about("Controls configuration functionality")
+                                .arg(Arg::with_name("config_file").index(1)),
+       SubCommand::with_name("debug").about("Controls debug functionality")])
+

fn print_help(&self) -> ClapResult<()>

+

Prints the full help message to io::stdout() using a BufWriter

+ +

Examples

+
+let mut app = App::new("myprog");
+let mut out = io::stdout();
+app.write_help(&mut out).ok().expect("failed to write to stdout");
+

fn write_help<W: Write>(&self, w: &mut W) -> ClapResult<()>

+

Writes the full help message to the user to a io::Write object

+ +
+let mut app = App::new("myprog");
+let mut out = io::stdout();
+app.write_help(&mut out).ok().expect("failed to write to stdout");
+

fn get_matches(self) -> ArgMatches<'ar, 'ar>

+

Starts the parsing process. Called on top level parent app ONLY then recursively calls +the real parsing function for all subcommands

+ +

Panics

+

If any arguments contain invalid unicode characters. If this is not desired it is +recommended to use the *_safe() or *_lossy() versions of this method.

+ +

Examples

+
+let matches = App::new("myprog")
+    // Args and options go here...
+    .get_matches();
+

fn get_matches_lossy(self) -> ArgMatches<'ar, 'ar>

+

Starts the parsing process. Called on top level parent app ONLY then recursively calls +the real parsing function for all subcommands. Invalid unicode characters are replaced with +U+FFFD REPLACEMENT CHARACTER

+ +

Examples

+
+let matches = App::new("myprog")
+    // Args and options go here...
+    .get_matches();
+

fn get_matches_safe(self) -> ClapResult<ArgMatches<'ar, 'ar>>

+

Starts the parsing process. Called on top level parent app ONLY then recursively calls +the real parsing function for all subcommands

+ +

NOTE: This method WILL NOT exit when --help or --version (or short versions) are +used. It will return an error, where the error_type is a ClapErrorType::HelpDisplayed +or ClapErrorType::VersionDisplayed respectively. You must call error.exit() or +perform a std::process::exit yourself.

+ +

NOTE: This method should only be used when is absolutely necessary to handle errors +manually.

+ +

Examples

+
+let matches = App::new("myprog")
+    // Args and options go here...
+    .get_matches_safe()
+    .unwrap_or_else( |e| { panic!("An error occurs: {}", e) });
+

fn get_matches_safe_lossy(self) -> ClapResult<ArgMatches<'ar, 'ar>>

+

Starts the parsing process. Called on top level parent app ONLY then recursively calls +the real parsing function for all subcommands. Invalid unicode characters are replaced with +U+FFFD REPLACEMENT CHARACTER

+ +

NOTE: This method WILL NOT exit when --help or --version (or short versions) are +used. It will return an error, where the error_type is a ClapErrorType::HelpDisplayed +or ClapErrorType::VersionDisplayed respectively. You must call error.exit() or +perform a std::process::exit yourself.

+ +

NOTE: This method should only be used when is absolutely necessary to handle errors +manually.

+ +

Examples

+
+let matches = App::new("myprog")
+    // Args and options go here...
+    .get_matches_safe()
+    .unwrap_or_else( |e| { panic!("An error occurs: {}", e) });
+

fn get_matches_from<I, T>(self, itr: I) -> ArgMatches<'ar, 'ar> where I: IntoIterator<Item=T>, T: AsRef<OsStr>

+

Starts the parsing process. Called on top level parent app ONLY then recursively calls +the real parsing function for all subcommands

+ +

NOTE: The first argument will be parsed as the binary name.

+ +

NOTE: This method should only be used when absolutely necessary, such as needing to +parse arguments from something other than std::env::args(). If you are unsure, use +App::get_matches()

+ +

Examples

+
+let arg_vec = vec!["my_prog", "some", "args", "to", "parse"];
+
+let matches = App::new("myprog")
+    // Args and options go here...
+    .get_matches_from(arg_vec);
+

fn get_matches_from_lossy<I, T>(self, itr: I) -> ArgMatches<'ar, 'ar> where I: IntoIterator<Item=T>, T: AsRef<OsStr>

+

Starts the parsing process. Called on top level parent app ONLY then recursively calls +the real parsing function for all subcommands. Invalid unicode characters are replaced with +U+FFFD REPLACEMENT CHARACTER

+ +

NOTE: The first argument will be parsed as the binary name.

+ +

NOTE: This method should only be used when absolutely necessary, such as needing to +parse arguments from something other than std::env::args(). If you are unsure, use +App::get_matches()

+ +

Examples

+
+let arg_vec = vec!["my_prog", "some", "args", "to", "parse"];
+
+let matches = App::new("myprog")
+    // Args and options go here...
+    .get_matches_from(arg_vec);
+

fn get_matches_from_safe<I, T>(self, itr: I) -> ClapResult<ArgMatches<'ar, 'ar>> where I: IntoIterator<Item=T>, T: AsRef<OsStr>

+

Starts the parsing process. Called on top level parent app ONLY then recursively calls +the real parsing function for all subcommands

+ +

NOTE: This method WILL NOT exit when --help or --version (or short versions) are +used. It will return an error, where the error_type is a ClapErrorType::HelpDisplayed +or ClapErrorType::VersionDisplayed respectively. You must call error.exit() or +perform a std::process::exit yourself.

+ +

NOTE: The first argument will be parsed as the binary name.

+ +

NOTE: This method should only be used when absolutely necessary, such as needing to +parse arguments from something other than std::env::args(). If you are unsure, use +App::get_matches_safe()

+ +

NOTE: This method should only be used when is absolutely necessary to handle errors +manually.

+ +

NOTE: Invalid unicode characters will result in an Err with type +ClapErrorType::InvalidUnicode

+ +

Examples

+
+let arg_vec = vec!["my_prog", "some", "args", "to", "parse"];
+
+let matches = App::new("myprog")
+    // Args and options go here...
+    .get_matches_from_safe(arg_vec)
+    .unwrap_or_else( |e| { panic!("An error occurs: {}", e) });
+

fn get_matches_from_safe_lossy<I, T>(self, itr: I) -> ClapResult<ArgMatches<'ar, 'ar>> where I: IntoIterator<Item=T>, T: AsRef<OsStr>

+

Starts the parsing process. Called on top level parent app ONLY then recursively calls +the real parsing function for all subcommands. Invalid unicode characters are replaced with +U+FFFD REPLACEMENT CHARACTER

+ +

NOTE: This method WILL NOT exit when --help or --version (or short versions) are +used. It will return an error, where the error_type is a ClapErrorType::HelpDisplayed +or ClapErrorType::VersionDisplayed respectively. You must call error.exit() or +perform a std::process::exit yourself.

+ +

NOTE: The first argument will be parsed as the binary name.

+ +

NOTE: This method should only be used when absolutely necessary, such as needing to +parse arguments from something other than std::env::args(). If you are unsure, use +App::get_matches_safe()

+ +

NOTE: This method should only be used when is absolutely necessary to handle errors +manually.

+ +

Examples

+
+let arg_vec = vec!["my_prog", "some", "args", "to", "parse"];
+
+let matches = App::new("myprog")
+    // Args and options go here...
+    .get_matches_from_safe(arg_vec)
+    .unwrap_or_else( |e| { panic!("An error occurs: {}", e) });
+

fn get_matches_from_safe_borrow<I, T>(&mut self, itr: I) -> ClapResult<ArgMatches<'ar, 'ar>> where I: IntoIterator<Item=T>, T: AsRef<OsStr>

+

Starts the parsing process without consuming the App struct self. This is normally not +the desired functionality, instead prefer App::get_matches_from_safe which does +consume self.

+ +

NOTE: The first argument will be parsed as the binary name.

+ +

NOTE: This method should only be used when absolutely necessary, such as needing to +parse arguments from something other than std::env::args(). If you are unsure, use +App::get_matches_safe()

+ +

NOTE: This method should only be used when is absolutely necessary to handle errors +manually.

+ +

NOTE: Invalid unicode characters will result in an Err with type +ClapErrorType::InvalidUnicode

+ +

Examples

+
+let arg_vec = vec!["my_prog", "some", "args", "to", "parse"];
+
+let mut app = App::new("myprog");
+    // Args and options go here...
+let matches = app.get_matches_from_safe_borrow(arg_vec)
+    .unwrap_or_else( |e| { panic!("An error occurs: {}", e) });
+

fn get_matches_from_safe_borrow_lossy<I, T>(&mut self, itr: I) -> ClapResult<ArgMatches<'ar, 'ar>> where I: IntoIterator<Item=T>, T: AsRef<OsStr>

+

Starts the parsing process without consuming the App struct self. This is normally not +the desired functionality, instead prefer App::get_matches_from_safe which does +consume self. Invalid unicode characters are replaced with U+FFFD REPLACEMENT CHARACTER

+ +

NOTE: The first argument will be parsed as the binary name.

+ +

NOTE: This method should only be used when absolutely necessary, such as needing to +parse arguments from something other than std::env::args(). If you are unsure, use +App::get_matches_safe()

+ +

NOTE: This method should only be used when is absolutely necessary to handle errors +manually.

+ +

NOTE: Invalid unicode characters will result in an Err with type +ClapErrorType::InvalidUnicode

+ +

Examples

+
+let arg_vec = vec!["my_prog", "some", "args", "to", "parse"];
+
+let mut app = App::new("myprog");
+    // Args and options go here...
+let matches = app.get_matches_from_safe_borrow(arg_vec)
+    .unwrap_or_else( |e| { panic!("An error occurs: {}", e) });
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/struct.Arg.html b/doc/clap/struct.Arg.html new file mode 100644 index 00000000..a979fe6f --- /dev/null +++ b/doc/clap/struct.Arg.html @@ -0,0 +1,565 @@ + + + + + + + + + + clap::Arg - Rust + + + + + + + + + + + + + + + + +
+

Struct clap::Arg + + [] + + [src]

+
pub struct Arg<'n, 'l, 'h, 'g, 'p, 'r> {
+    pub name: &'n str,
+    pub short: Option<char>,
+    pub long: Option<&'l str>,
+    pub help: Option<&'h str>,
+    pub required: bool,
+    pub takes_value: bool,
+    pub index: Option<u8>,
+    pub multiple: bool,
+    pub blacklist: Option<Vec<&'r str>>,
+    pub possible_vals: Option<Vec<&'p str>>,
+    pub requires: Option<Vec<&'r str>>,
+    pub group: Option<&'g str>,
+    pub val_names: Option<BTreeSet<&'n str>>,
+    pub num_vals: Option<u8>,
+    pub max_vals: Option<u8>,
+    pub min_vals: Option<u8>,
+    pub empty_vals: bool,
+    pub global: bool,
+    pub validator: Option<Rc<Fn(String) -> Result<(), String>>>,
+    pub overrides: Option<Vec<&'r str>>,
+    pub hidden: bool,
+}

The abstract representation of a command line argument used by the consumer of the library. +Used to set all the options and relationships that define a valid argument for the program.

+ +

This struct is used by the library consumer and describes the command line arguments for +their program. Then evaluates the settings the consumer provided and determines the concret +argument type to use when parsing.

+ +

There are two methods for constructing Args, using the builder pattern and setting options +manually, or using a usage string which is far less verbose. You can also use a combination +of the two methods to achieve the best of both worlds.

+ +

**NOTE*: Fields of this struct are not meant to be used directly unless absolutely +required. 99.9% of the tasks can be performed without accessing these fields directly.

+ +

Examples

+
+// Using the traditional builder pattern and setting each option manually
+Arg::with_name("config")
+      .short("c")
+      .long("config")
+      .takes_value(true)
+      .help("Provides a config file to myprog")
+// Using a usage string (setting a similar argument to the one above)
+Arg::from_usage("-i --input=[input] 'Provides an input file to the program'")
+

Fields

+ + + + + + + + + + + + + + + + + + + + + +
name

The unique name of the argument

+
short

The short version (i.e. single character) of the argument, no preceding - +NOTE: short is mutually exclusive with index

+
long

The long version of the flag (i.e. word) without the preceding -- +NOTE: long is mutually exclusive with index

+
help

The string of text that will displayed to the user when the application's +help text is displayed

+
required

If this is a required by default when using the command line program, +e.g. a configuration file that's required for the program to function +NOTE: required by default means it is required until mutually +exclusive arguments are evaluated.

+
takes_value

Determines if this argument is an option (as opposed to flag or positional) and +is mutually exclusive with index and multiple

+
index

The index of the argument. index is mutually exclusive with takes_value +and multiple

+
multiple

Determines if multiple instances of the same flag are allowed. multiple +is mutually exclusive with index. +e.g. -v -v -v or -vvv or --option foo --option bar

+
blacklist

A list of names for other arguments that may not be used with this flag

+
possible_vals

A list of possible values for an option or positional argument

+
requires

A list of names of other arguments that are required to be used when +this flag is used

+
group

A name of the group the argument belongs to

+
val_names

A set of names (ordered) for the values to be displayed with the help message

+
num_vals

The exact number of values to satisfy this argument

+
max_vals

The maximum number of values possible for this argument

+
min_vals

The minimum number of values possible to satisfy this argument

+
empty_vals

Specifies whether or not this argument accepts explicit empty values such as --option ""

+
global

Specifies whether or not this argument is global and should be propagated through all +child subcommands

+
validator

A function used to check the validity of an argument value. Failing this validation results +in failed argument parsing.

+
overrides

A list of names for other arguments that mutually override this flag

+
hidden

Specifies whether the argument should show up in the help message

+

Methods

impl<'n, 'l, 'h, 'g, 'p, 'r> Arg<'n, 'l, 'h, 'g, 'p, 'r>

fn with_name(n: &'n str) -> Self

+

Creates a new instance of Arg using a unique string name. +The name will be used by the library consumer to get information about +whether or not the argument was used at runtime.

+ +

NOTE: in the case of arguments that take values (i.e. takes_value(true)) +and positional arguments (i.e. those without a - or --) the name will also +be displayed when the user prints the usage/help information of the program.

+ +

Examples

+
+Arg::with_name("config")
+

fn from_usage(u: &'n str) -> Arg<'n, 'n, 'n, 'g, 'p, 'r>

+

Creates a new instance of Arg from a usage string. Allows creation of basic settings +for Arg (i.e. everything except relational rules). The syntax is flexible, but there are +some rules to follow.

+ +

NOTE: only properties which you wish to set must be present

+ +
    +
  1. Name (arguments with a long or that take a value can omit this if desired), +use [] for non-required arguments, or <> for required arguments.
  2. +
  3. Short preceded by a -
  4. +
  5. Long preceded by a -- (this may be used as the name, if the name is omitted. If the +name is not omitted, the name takes precedence over the long)
  6. +
  7. Value (this can be used as the name if the name is not manually specified. If the name +is manually specified, it takes precedence. If this value is used as the name, it uses +the same [] and <> requirement specification rules. If it is not used as the name, +it still needs to be surrounded by either [] or <> but there is no requirement +effect, as the requirement rule is determined by the real name. This value may follow +the short or long, it doesn't matter. If it follows the long, it may follow either +a = or there is no difference, just personal preference. If this follows a short +it can only be after a ) i.e. -c [name], --config [name], --config=[name], etc.
  8. +
  9. Multiple specifier ... (the ... may follow the name, short, long, or value +without a space) i.e. <name>... -c, --config <name>..., [name] -c..., etc.
  10. +
  11. The help info surrounded by 's (single quotes)
  12. +
  13. The index of a positional argument will be the next available index (you don't need to +specify one) i.e. all arguments without a short or long will be treated as +positional
  14. +
  15. If the value names are all the same, and their multiple ones (i.e -o <val> <val>) +they are counted and used as the number of values. If they are different, they are used +as the value names (i.e. --opt <file> <mode>). In this case, if no name was specified +prior to the value names, the long is used as the name by which to access the argument.
  16. +
+ +

Examples

+
+                 .args(vec![
+
+// A option argument with a long, named "conf" (note: because the name was specified
+// the portion after the long can be called anything, only the first name will be displayed
+// to the user. Also, requirement is set with the *name*, so the portion after the long
+// could be either <> or [] and it wouldn't matter, so long as it's one of them. Had the
+// name been omitted, the name would have been derived from the portion after the long and
+// those rules would have mattered)
+Arg::from_usage("[conf] --config=[c] 'a required file for the configuration'"),
+
+// A flag with a short, a long, named "debug", and accepts multiple values
+Arg::from_usage("-d --debug... 'turns on debugging information"),
+
+// A required positional argument named "input"
+Arg::from_usage("<input> 'the input file to use'")
+])
+

fn short(self, s: &str) -> Self

+

Sets the short version of the argument without the preceding -.

+ +

By default clap automatically assigns V and h to display version and help information +respectively. You may use V or h for your own purposes, in which case clap simply +will not assign those to the displaying of version or help.

+ +

NOTE: Any leading - characters will be stripped, and only the first +non - character will be used as the short version

+ +

Examples

+
+.short("c")
+

fn long(self, l: &'l str) -> Self

+

Sets the long version of the argument without the preceding --.

+ +

By default clap automatically assigns version and help to display version and help +information respectively. You may use version or help for your own purposes, in which +case clap simply will not assign those to the displaying of version or help automatically, +and you will have to do so manually.

+ +

NOTE: Any leading - characters will be stripped

+ +

Examples

+
+.long("config")
+

fn help(self, h: &'h str) -> Self

+

Sets the help text of the argument that will be displayed to the user +when they print the usage/help information.

+ +

Examples

+
+.help("The config file used by the myprog")
+

fn required(self, r: bool) -> Self

+

Sets whether or not the argument is required by default. Required by +default means it is required, when no other mutually exclusive rules have +been evaluated. Mutually exclusive rules take precedence over being required +by default.

+ +

NOTE: Flags (i.e. not positional, or arguments that take values) +cannot be required by default. +when they print the usage/help information.

+ +

Example

+
+.required(true)
+

fn conflicts_with(self, name: &'r str) -> Self

+

Sets a mutually exclusive argument by name. I.e. when using this argument, +the following argument can't be present.

+ +

NOTE: Mutually exclusive rules take precedence over being required +by default. Mutually exclusive rules only need to be set for one of the two +arguments, they do not need to be set for each.

+ +

Examples

+
+.conflicts_with("debug")
+

fn conflicts_with_all<T, I>(self, names: I) -> Self where T: AsRef<str> + 'r, I: IntoIterator<Item=&'r T>

+

Sets mutually exclusive arguments by names. I.e. when using this argument, +the following argument can't be present.

+ +

NOTE: Mutually exclusive rules take precedence over being required +by default. Mutually exclusive rules only need to be set for one of the two +arguments, they do not need to be set for each.

+ +

Examples

+
+let config_conflicts = ["debug", "input"];
+.conflicts_with_all(&config_conflicts)
+

fn mutually_overrides_with(self, name: &'r str) -> Self

+

Sets a mutually overridable argument by name. I.e. this argument and +the following argument will override each other in POSIX style

+ +

Examples

+
+.mutually_overrides_with("debug")
+

fn mutually_overrides_with_all<T, I>(self, names: I) -> Self where T: AsRef<str> + 'r, I: IntoIterator<Item=&'r T>

+

Sets a mutually overridable arguments by name. I.e. this argument and +the following argument will override each other in POSIX style

+ +

Examples

+
+let config_overrides = ["debug", "input"];
+.mutually_overrides_with_all(&config_overrides)
+

fn requires(self, name: &'r str) -> Self

+

Sets an argument by name that is required when this one is present I.e. when +using this argument, the following argument must be present.

+ +

NOTE: Mutually exclusive and override rules take precedence over being required

+ +

Examples

+
+.requires("debug")
+

fn requires_all<T, I>(self, names: I) -> Self where T: AsRef<str> + 'r, I: IntoIterator<Item=&'r T>

+

Sets arguments by names that are required when this one is present I.e. when +using this argument, the following arguments must be present.

+ +

NOTE: Mutually exclusive and override rules take precedence over being required +by default.

+ +

Examples

+
+let config_reqs = ["debug", "input"];
+.requires_all(&config_reqs)
+

fn takes_value(self, tv: bool) -> Self

+

Specifies that the argument takes an additional value at run time.

+ +

NOTE: When setting this to true the name of the argument +will be used when printing the help/usage information to the user.

+ +

Examples

+
+.takes_value(true)
+

fn index(self, idx: u8) -> Self

+

Specifies the index of a positional argument starting at 1.

+ +

NOTE: When setting this, any short or long values you set +are ignored as positional arguments cannot have a short or long. +Also, the name will be used when printing the help/usage information +to the user.

+ +

Examples

+
+.index(1)
+

fn multiple(self, multi: bool) -> Self

+

Specifies that the flag or option may appear more than once. For flags, this results +in the number of occurrences of the flag being recorded. For example -ddd would count as +three occurrences. The form -d -d -d would also be recognized as three occurrences. For +options, more than one value may be provided. The forms --optional foo --optional bar, +--optional foo bar and -ofoo -obar are all recognized, assuming the relevant short +and long option names have been set.

+ +

NOTE: When setting this, index is ignored as it only makes sense for positional +arguments.

+ +

Examples

+
+.multiple(true)
+

fn global(self, g: bool) -> Self

+

Specifies that an argument can be matched to all child subcommands.

+ +

NOTE: Global arguments only propagate down, not up (to parent commands)

+ +

NOTE: Global arguments cannot be required.

+ +

NOTE: Global arguments, when matched, only exist in the command's matches that they +were matched to. For example, if you defined a --flag global argument in the top most +parent command, but the user supplied the arguments top cmd1 cmd2 --flag only cmd2's +ArgMatches would return true if tested for .is_present("flag").

+ +

Examples

+
+.global(true)
+

fn empty_values(self, ev: bool) -> Self

+

Allows an argument to accept explicit empty values. An empty value must be specified at the +command line with an explicit "", or ''

+ +

NOTE: Defaults to true (Explicit empty values are allowed)

+ +

Examples

+
+.empty_values(true)
+

fn hidden(self, h: bool) -> Self

+

Hides an argument from help message output.

+ +

NOTE: This does not hide the argument from usage strings on error

+ +

Examples

+
+.hidden(true)
+

fn possible_values<T, I>(self, names: I) -> Self where T: AsRef<str> + 'p, I: IntoIterator<Item=&'p T>

+

Specifies a list of possible values for this argument. At runtime, clap verifies that only +one of the specified values was used, or fails with a usage string.

+ +

NOTE: This setting only applies to options and positional arguments

+ +

Examples

+
+let mode_vals = ["fast", "slow"];
+.possible_values(&mode_vals)
+

fn possible_value(self, name: &'p str) -> Self

+

Specifies a possible value for this argument. At runtime, clap verifies that only +one of the specified values was used, or fails with a usage string.

+ +

NOTE: This setting only applies to options and positional arguments

+ +

Examples

+
+.possible_value("fast")
+.possible_value("slow")
+

fn group(self, name: &'g str) -> Self

+

Specifies the name of the group the argument belongs to.

+ +

Examples

+
+.group("mode")
+

fn number_of_values(self, qty: u8) -> Self

+

Specifies how many values are required to satisfy this argument. For example, if you had a +-f <file> argument where you wanted exactly 3 'files' you would set +.number_of_values(3), and this argument wouldn't be satisfied unless the user provided +3 and only 3 values.

+ +

NOTE: Does not require .multiple(true) to be set. Setting .multiple(true) would +allow -f <file> <file> <file> -f <file> <file> <file> where as not setting +.multiple(true) would only allow one occurrence of this argument.

+ +

Examples

+
+.number_of_values(3)
+

fn validator<F>(self, f: F) -> Self where F: Fn(String) -> Result<(), String> + 'static

+

Allows one to perform a validation on the argument value. You provide a closure which +accepts a String value, a Result where the Err(String) is a message displayed to the +user.

+ +

NOTE: The error message does not need to contain the error: portion, only the +message.

+ +

NOTE: There is a small performance hit for using validators, as they are implemented +with Rc pointers. And the value to be checked will be allocated an extra time in order to +to be passed to the closure.

+ +

Examples

+
+.validator(|val| {
+    if val.contains("@") {
+        Ok(())
+    } else {
+        Err(String::from("the value must contain at least one '@' character"))
+    }
+})
+

fn max_values(self, qty: u8) -> Self

+

Specifies the maximum number of values are for this argument. For example, if you had a +-f <file> argument where you wanted up to 3 'files' you would set +.max_values(3), and this argument would be satisfied if the user provided, 1, 2, or 3 +values.

+ +

NOTE: qty must be > 1

+ +

NOTE: This implicitly sets .multiple(true)

+ +

Examples

+
+.max_values(3)
+

fn min_values(self, qty: u8) -> Self

+

Specifies the minimum number of values are for this argument. For example, if you had a +-f <file> argument where you wanted at least 2 'files' you would set +.min_values(2), and this argument would be satisfied if the user provided, 2 or more +values.

+ +

NOTE: This implicitly sets .multiple(true)

+ +

NOTE: qty must be > 0

+ +

NOTE: qty must be > 0. If you wish to have an argument with 0 or more values prefer +two separate arguments (a flag, and an option with multiple values).

+ +

Examples

+
+.min_values(2)
+

fn value_names<T, I>(self, names: I) -> Self where T: AsRef<str> + 'n, I: IntoIterator<Item=&'n T>

+

Specifies names for values of option arguments. These names are cosmetic only, used for +help and usage strings only. The names are not used to access arguments. The values of +the arguments are accessed in numeric order (i.e. if you specify two names one and two +one will be the first matched value, two will be the second).

+ +

NOTE: This implicitly sets .number_of_values() so there is no need to set that, but +be aware that the number of "names" you set for the values, will be the exact number of +values required to satisfy this argument

+ +

NOTE: Does not require .multiple(true) to be set. Setting .multiple(true) would +allow -f <file> <file> <file> -f <file> <file> <file> where as not setting +.multiple(true) would only allow one occurrence of this argument.

+ +

Examples

+
+let val_names = ["one", "two"];
+// ...
+.value_names(&val_names)
+

fn value_name(self, name: &'n str) -> Self

+

Specifies the name for value of option or positional arguments. This name is cosmetic only, +used for help and usage strings. The name is not used to access arguments.

+ +

Examples

+
+Arg::with_name("debug")
+    .index(1)
+    .value_name("file")
+

Trait Implementations

impl<'n, 'l, 'h, 'g, 'p, 'r, 'z> From<&'z Arg<'n, 'l, 'h, 'g, 'p, 'r>> for Arg<'n, 'l, 'h, 'g, 'p, 'r>

fn from(a: &'z Arg<'n, 'l, 'h, 'g, 'p, 'r>) -> Self

+

Derived Implementations

impl<'n, 'l, 'h, 'g, 'p, 'r> Default for Arg<'n, 'l, 'h, 'g, 'p, 'r>

fn default() -> Arg<'n, 'l, 'h, 'g, 'p, 'r>

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/struct.ArgGroup.html b/doc/clap/struct.ArgGroup.html new file mode 100644 index 00000000..44d01e88 --- /dev/null +++ b/doc/clap/struct.ArgGroup.html @@ -0,0 +1,215 @@ + + + + + + + + + + clap::ArgGroup - Rust + + + + + + + + + + + + + + + + +
+

Struct clap::ArgGroup + + [] + + [src]

+
pub struct ArgGroup<'n, 'ar> {
+    // some fields omitted
+}

ArgGroups are a family of related arguments and way for you to say, "Any of these arguments". +By placing arguments in a logical group, you can make easier requirement and exclusion rules +instead of having to list each individually, or when you want a rule to apply "any but not all" +arguments.

+ +

For instance, you can make an entire ArgGroup required, this means that one (and only one) +argument. from that group must be present. Using more than one argument from an ArgGroup causes +a failure (graceful exit).

+ +

You can also do things such as name an ArgGroup as a confliction or requirement, meaning any +of the arguments that belong to that group will cause a failure if present, or must present +respectively.

+ +

Perhaps the most common use of ArgGroups is to require one and only one argument to be +present out of a given set. Imagine that you had multiple arguments, and you want one of them +to be required, but making all of them required isn't feasible because perhaps they conflict +with each other. For example, lets say that you were building an application where one could +set a given version number by supplying a string with an option argument, i.e. +--set-ver v1.2.3, you also wanted to support automatically using a previous version number +and simply incrementing one of the three numbers. So you create three flags --major, +--minor, and --patch. All of these arguments shouldn't be used at one time but you want to +specify that at least one of them is used. For this, you can create a group.

+ +

Examples

+
+let _ = App::new("app")
+.args_from_usage("--set-ver [ver] 'set the version manually'
+                  --major         'auto increase major'
+                  --minor         'auto increase minor'
+                  --patch         'auto increase patch")
+.arg_group(ArgGroup::with_name("vers")
+                    .add_all(&["ver", "major", "minor","patch"])
+                    .required(true))
+

Methods

impl<'n, 'ar> ArgGroup<'n, 'ar>

fn with_name(n: &'n str) -> Self

+

Creates a new instance of ArgGroup using a unique string name. +The name will only be used by the library consumer and not displayed to the use.

+ +

Examples

+
+ArgGroup::with_name("config")
+

fn add(self, n: &'ar str) -> Self

+

Adds an argument to this group by name

+ +

Examples

+
+.add("config")
+

fn add_all(self, ns: &[&'ar str]) -> Self

+

Adds multiple arguments to this group by name

+ +

Examples

+
+.add_all(&["config", "input", "output"])
+

fn required(self, r: bool) -> Self

+

Sets the requirement of this group. A required group will be displayed in the usage string +of the application in the format [arg|arg2|arg3]. A required ArgGroup simply states +that one, and only one argument from this group must be present at runtime (unless +conflicting with another argument).

+ +

Examples

+
+.required(true)
+

fn requires(self, n: &'ar str) -> Self

+

Sets the requirement rules of this group. This is not to be confused with a required group. +Requirement rules function just like argument requirement rules, you can name other +arguments or groups that must be present when one of the arguments from this group is used.

+ +

NOTE: The name provided may be an argument, or group name

+ +

Examples

+
+.requires("config")
+

fn requires_all(self, ns: &[&'ar str]) -> Self

+

Sets the requirement rules of this group. This is not to be confused with a required group. +Requirement rules function just like argument requirement rules, you can name other +arguments or groups that must be present when one of the arguments from this group is used.

+ +

NOTE: The names provided may be an argument, or group name

+ +

Examples

+
+.requires_all(&["config", "input"])
+

fn conflicts_with(self, n: &'ar str) -> Self

+

Sets the exclusion rules of this group. Exclusion rules function just like argument +exclusion rules, you can name other arguments or groups that must not be present when one +of the arguments from this group are used.

+ +

NOTE: The name provided may be an argument, or group name

+ +

Examples

+
+.conflicts_with("config")
+

fn conflicts_with_all(self, ns: &[&'ar str]) -> Self

+

Sets the exclusion rules of this group. Exclusion rules function just like argument +exclusion rules, you can name other arguments or groups that must not be present when one +of the arguments from this group are used.

+ +

NOTE: The names provided may be an argument, or group name

+ +

Examples

+
+.conflicts_with_all(&["config", "input"])
+

Trait Implementations

impl<'n, 'ar> Debug for ArgGroup<'n, 'ar>

fn fmt(&self, f: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/struct.ArgMatches.html b/doc/clap/struct.ArgMatches.html new file mode 100644 index 00000000..957498c4 --- /dev/null +++ b/doc/clap/struct.ArgMatches.html @@ -0,0 +1,240 @@ + + + + + + + + + + clap::ArgMatches - Rust + + + + + + + + + + + + + + + + +
+

Struct clap::ArgMatches + + [] + + [src]

+
pub struct ArgMatches<'n, 'a> {
+    // some fields omitted
+}

Used to get information about the arguments that where supplied to the program at runtime by +the user. To get a new instance of this struct you use .get_matches() of the App struct.

+ +

Examples

+
+let matches = App::new("MyApp")
+// adding of arguments and configuration goes here...
+                    .get_matches();
+// if you had an argument named "output" that takes a value
+if let Some(o) = matches.value_of("output") {
+    println!("Value for output: {}", o);
+}
+
+// If you have a required argument you can call .unwrap() because the program will exit long
+// before this point if the user didn't specify it at runtime.
+println!("Config file: {}", matches.value_of("config").unwrap());
+
+// You can check the presence of an argument
+if matches.is_present("debug") {
+    // Another way to check if an argument was present, or if it occurred multiple times is to
+    // use occurrences_of() which returns 0 if an argument isn't found at runtime, or the
+    // number of times that it occurred, if it was. To allow an argument to appear more than
+    // once, you must use the .multiple(true) method, otherwise it will only return 1 or 0.
+    if matches.occurrences_of("debug") > 2 {
+        println!("Debug mode is REALLY on");
+    } else {
+        println!("Debug mode kind of on");
+    }
+}
+
+// You can get the sub-matches of a particular subcommand (in this case "test")
+// If "test" had it's own "-l" flag you could check for it's presence accordingly
+if let Some(ref matches) = matches.subcommand_matches("test") {
+    if matches.is_present("list") {
+        println!("Printing testing lists...");
+    } else {
+        println!("Not printing testing lists...");
+    }
+}
+

Methods

impl<'n, 'a> ArgMatches<'n, 'a>

fn value_of(&self, name: &str) -> Option<&str>

+

Gets the value of a specific option or positional argument (i.e. an argument that takes +an additional value at runtime). If the option wasn't present at runtime +it returns None.

+ +

NOTE: If getting a value for an option or positional argument that allows multiples, +prefer values_of() as value_of() will only return the first value.

+ +

Examples

+
+if let Some(o) = matches.value_of("output") {
+       println!("Value for output: {}", o);
+}
+

fn values_of(&'a self, name: &str) -> Option<Vec<&'a str>>

+

Gets the values of a specific option or positional argument in a vector (i.e. an argument +that takes multiple values at runtime). If the option wasn't present at runtime it +returns None

+ +

Examples

+
+// If the program had option "-c" that took a value and was run
+// via "myapp -o some -o other -o file"
+// values_of() would return a [&str; 3] ("some", "other", "file")
+if let Some(os) = matches.values_of("output") {
+       for o in os {
+           println!("A value for output: {}", o);
+       }
+}
+

fn is_present(&self, name: &str) -> bool

+

Returns if an argument was present at runtime.

+ +

Examples

+
+if matches.is_present("output") {
+       println!("The output argument was used!");
+}
+

fn occurrences_of(&self, name: &str) -> u8

+

Returns the number of occurrences of an option, flag, or positional argument at runtime. +If an argument isn't present it will return 0. Can be used on arguments which don't +allow multiple occurrences, but will obviously only return 0 or 1.

+ +

Examples

+
+if matches.occurrences_of("debug") > 1 {
+    println!("Debug mode is REALLY on");
+} else {
+    println!("Debug mode kind of on");
+}
+

fn subcommand_matches<'na>(&self, name: &'na str) -> Option<&ArgMatches>

+

Returns the ArgMatches for a particular subcommand or None if the subcommand wasn't +present at runtime.

+ +

Examples

+
+if let Some(matches) = app_matches.subcommand_matches("test") {
+    // Use matches as normal
+}
+

fn subcommand_name(&self) -> Option<&str>

+

Returns the name of the subcommand used of the parent App, or None if one wasn't found

+ +

NOTE: Only a single subcommand may be present per App at runtime, does NOT check for +the name of sub-subcommand's names

+ +

Examples

+
+match app_matches.subcommand_name() {
+    Some("test")   => {}, // test was used
+    Some("config") => {}, // config was used
+    _              => {}, // Either no subcommand or one not tested for...
+}
+

fn subcommand(&self) -> (&str, Option<&ArgMatches>)

+

Returns the name and ArgMatches of the subcommand used at runtime or ("", None) if one +wasn't found.

+ +

Examples

+
+match app_matches.subcommand() {
+    ("test", Some(matches))   => {}, // test was used
+    ("config", Some(matches)) => {}, // config was used
+    _                         => {}, // Either no subcommand or one not tested for...
+}
+

fn usage(&self) -> &str

+

Returns a string slice of the usage statement for the App (or SubCommand)

+ +

Examples

+
+println!("{}",app_matches.usage());
+

Trait Implementations

Derived Implementations

impl<'n, 'a> Debug for ArgMatches<'n, 'a>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/struct.ClapError.html b/doc/clap/struct.ClapError.html new file mode 100644 index 00000000..16abb862 --- /dev/null +++ b/doc/clap/struct.ClapError.html @@ -0,0 +1,130 @@ + + + + + + + + + + clap::ClapError - Rust + + + + + + + + + + + + + + + + +
+

Struct clap::ClapError + + [] + + [src]

+
pub struct ClapError {
+    pub error: String,
+    pub error_type: ClapErrorType,
+}

Command line argument parser error

+

Fields

+ + +
error

Formated error message

+
error_type

The type of error

+

Methods

impl ClapError

fn use_stderr(&self) -> bool

+

Should the message be written to stdout or not

+

fn exit(&self) -> !

+

Prints the error to stderr and exits with a status of 1

+

Trait Implementations

impl Error for ClapError

fn description(&self) -> &str

+

fn cause(&self) -> Option<&Error>

+

impl Display for ClapError

fn fmt(&self, f: &mut Formatter) -> Result

+

impl From<Error> for ClapError

fn from(e: Error) -> Self

+

impl From<Error> for ClapError

fn from(e: Error) -> Self

+

Derived Implementations

impl Debug for ClapError

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/struct.SubCommand.html b/doc/clap/struct.SubCommand.html new file mode 100644 index 00000000..6b42f717 --- /dev/null +++ b/doc/clap/struct.SubCommand.html @@ -0,0 +1,134 @@ + + + + + + + + + + clap::SubCommand - Rust + + + + + + + + + + + + + + + + +
+

Struct clap::SubCommand + + [] + + [src]

+
pub struct SubCommand<'n, 'a> {
+    // some fields omitted
+}

The abstract representation of a command line subcommand used by the consumer of the library.

+ +

This struct is used by the library consumer and describes all the valid options of the +subcommand for their program. SubCommands are treated like "sub apps" and contain all the same +possibilities (such as their own arguments and subcommands).

+ +

Examples

+
+SubCommand::with_name("config")
+               .about("Used for configuration")
+               .arg(Arg::with_name("config_file")
+                          .help("The configuration file to use")
+                          .index(1))
+

Methods

impl<'n, 'a> SubCommand<'n, 'a>

fn with_name<'au, 'v, 'ab, 'u, 'h, 'ar>(name: &'ar str) -> App<'au, 'v, 'ab, 'u, 'h, 'ar>

+

Creates a new instance of a subcommand requiring a name. Will be displayed +to the user when they print version or help and usage information.

+ +

Examples

+
+SubCommand::with_name("config")
+

Trait Implementations

Derived Implementations

impl<'n, 'a> Debug for SubCommand<'n, 'a>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/clap/suggestions/index.html b/doc/clap/suggestions/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/suggestions/sidebar-items.js b/doc/clap/suggestions/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/clap/suggestions/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/clap/usageparser/index.html b/doc/clap/usageparser/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/clap/usageparser/sidebar-items.js b/doc/clap/usageparser/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/clap/usageparser/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/crc/crc32/constant.CASTAGNOLI.html b/doc/crc/crc32/constant.CASTAGNOLI.html new file mode 100644 index 00000000..8e9d72af --- /dev/null +++ b/doc/crc/crc32/constant.CASTAGNOLI.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc32::CASTAGNOLI - Rust + + + + + + + + + + + + + + + + +
+

crc::crc32::CASTAGNOLI + + [] + + [src]

+
pub const CASTAGNOLI: u32 = 0x82f63b78
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc32/constant.IEEE.html b/doc/crc/crc32/constant.IEEE.html new file mode 100644 index 00000000..e39444eb --- /dev/null +++ b/doc/crc/crc32/constant.IEEE.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc32::IEEE - Rust + + + + + + + + + + + + + + + + +
+

crc::crc32::IEEE + + [] + + [src]

+
pub const IEEE: u32 = 0xedb88320
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc32/constant.KOOPMAN.html b/doc/crc/crc32/constant.KOOPMAN.html new file mode 100644 index 00000000..a2358931 --- /dev/null +++ b/doc/crc/crc32/constant.KOOPMAN.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc32::KOOPMAN - Rust + + + + + + + + + + + + + + + + +
+

crc::crc32::KOOPMAN + + [] + + [src]

+
pub const KOOPMAN: u32 = 0xeb31d82e
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc32/fn.checksum_castagnoli.html b/doc/crc/crc32/fn.checksum_castagnoli.html new file mode 100644 index 00000000..b603a2b4 --- /dev/null +++ b/doc/crc/crc32/fn.checksum_castagnoli.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc32::checksum_castagnoli - Rust + + + + + + + + + + + + + + + + +
+

Function crc::crc32::checksum_castagnoli + + [] + + [src]

+
pub fn checksum_castagnoli(bytes: &[u8]) -> u32
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc32/fn.checksum_ieee.html b/doc/crc/crc32/fn.checksum_ieee.html new file mode 100644 index 00000000..987f616c --- /dev/null +++ b/doc/crc/crc32/fn.checksum_ieee.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc32::checksum_ieee - Rust + + + + + + + + + + + + + + + + +
+

Function crc::crc32::checksum_ieee + + [] + + [src]

+
pub fn checksum_ieee(bytes: &[u8]) -> u32
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc32/fn.checksum_koopman.html b/doc/crc/crc32/fn.checksum_koopman.html new file mode 100644 index 00000000..2fc83f5f --- /dev/null +++ b/doc/crc/crc32/fn.checksum_koopman.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc32::checksum_koopman - Rust + + + + + + + + + + + + + + + + +
+

Function crc::crc32::checksum_koopman + + [] + + [src]

+
pub fn checksum_koopman(bytes: &[u8]) -> u32
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc32/fn.make_table.html b/doc/crc/crc32/fn.make_table.html new file mode 100644 index 00000000..b6eb9b38 --- /dev/null +++ b/doc/crc/crc32/fn.make_table.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc32::make_table - Rust + + + + + + + + + + + + + + + + +
+

Function crc::crc32::make_table + + [] + + [src]

+
pub fn make_table(poly: u32) -> [u32; 256]
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc32/fn.update.html b/doc/crc/crc32/fn.update.html new file mode 100644 index 00000000..35856349 --- /dev/null +++ b/doc/crc/crc32/fn.update.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc32::update - Rust + + + + + + + + + + + + + + + + +
+

Function crc::crc32::update + + [] + + [src]

+
pub fn update(value: u32, table: &[u32; 256], bytes: &[u8]) -> u32
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc32/index.html b/doc/crc/crc32/index.html new file mode 100644 index 00000000..9dd4438e --- /dev/null +++ b/doc/crc/crc32/index.html @@ -0,0 +1,219 @@ + + + + + + + + + + crc::crc32 - Rust + + + + + + + + + + + + + + + + +
+

Module crc::crc32 + + [] + + [src]

+

Structs

+ + + + + + + + + + + + + + + + + + + + +
CASTAGNOLI_TABLE + +
Digest + +
IEEE_TABLE + +
KOOPMAN_TABLE + +

Constants

+ + + + + + + + + + + + + + + +
CASTAGNOLI + +
IEEE + +
KOOPMAN + +

Traits

+ + + + + +
Hasher32 + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + +
checksum_castagnoli + +
checksum_ieee + +
checksum_koopman + +
make_table + +
update + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc32/sidebar-items.js b/doc/crc/crc32/sidebar-items.js new file mode 100644 index 00000000..1db6213d --- /dev/null +++ b/doc/crc/crc32/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["CASTAGNOLI",""],["IEEE",""],["KOOPMAN",""]],"fn":[["checksum_castagnoli",""],["checksum_ieee",""],["checksum_koopman",""],["make_table",""],["update",""]],"struct":[["CASTAGNOLI_TABLE",""],["Digest",""],["IEEE_TABLE",""],["KOOPMAN_TABLE",""]],"trait":[["Hasher32",""]]}); \ No newline at end of file diff --git a/doc/crc/crc32/struct.CASTAGNOLI_TABLE.html b/doc/crc/crc32/struct.CASTAGNOLI_TABLE.html new file mode 100644 index 00000000..b308530b --- /dev/null +++ b/doc/crc/crc32/struct.CASTAGNOLI_TABLE.html @@ -0,0 +1,115 @@ + + + + + + + + + + crc::crc32::CASTAGNOLI_TABLE - Rust + + + + + + + + + + + + + + + + +
+

Struct crc::crc32::CASTAGNOLI_TABLE + + [] + +

+
pub struct CASTAGNOLI_TABLE {
+    // some fields omitted
+}

Trait Implementations

impl Deref for CASTAGNOLI_TABLE

type Target = [u32; 256]

+

fn deref<'a>(&'a self) -> &'a [u32; 256]

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc32/struct.Digest.html b/doc/crc/crc32/struct.Digest.html new file mode 100644 index 00000000..9460d6c5 --- /dev/null +++ b/doc/crc/crc32/struct.Digest.html @@ -0,0 +1,118 @@ + + + + + + + + + + crc::crc32::Digest - Rust + + + + + + + + + + + + + + + + +
+

Struct crc::crc32::Digest + + [] + + [src]

+
pub struct Digest {
+    // some fields omitted
+}

Methods

impl Digest

fn new(poly: u32) -> Digest

+

fn new_with_initial(poly: u32, initial: u32) -> Digest

+

Trait Implementations

impl Hasher32 for Digest

fn reset(&mut self)

+

fn write(&mut self, bytes: &[u8])

+

fn sum32(&self) -> u32

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc32/struct.IEEE_TABLE.html b/doc/crc/crc32/struct.IEEE_TABLE.html new file mode 100644 index 00000000..249451fb --- /dev/null +++ b/doc/crc/crc32/struct.IEEE_TABLE.html @@ -0,0 +1,115 @@ + + + + + + + + + + crc::crc32::IEEE_TABLE - Rust + + + + + + + + + + + + + + + + +
+

Struct crc::crc32::IEEE_TABLE + + [] + +

+
pub struct IEEE_TABLE {
+    // some fields omitted
+}

Trait Implementations

impl Deref for IEEE_TABLE

type Target = [u32; 256]

+

fn deref<'a>(&'a self) -> &'a [u32; 256]

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc32/struct.KOOPMAN_TABLE.html b/doc/crc/crc32/struct.KOOPMAN_TABLE.html new file mode 100644 index 00000000..b29178a1 --- /dev/null +++ b/doc/crc/crc32/struct.KOOPMAN_TABLE.html @@ -0,0 +1,115 @@ + + + + + + + + + + crc::crc32::KOOPMAN_TABLE - Rust + + + + + + + + + + + + + + + + +
+

Struct crc::crc32::KOOPMAN_TABLE + + [] + +

+
pub struct KOOPMAN_TABLE {
+    // some fields omitted
+}

Trait Implementations

impl Deref for KOOPMAN_TABLE

type Target = [u32; 256]

+

fn deref<'a>(&'a self) -> &'a [u32; 256]

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc32/trait.Hasher32.html b/doc/crc/crc32/trait.Hasher32.html new file mode 100644 index 00000000..6ec2f27e --- /dev/null +++ b/doc/crc/crc32/trait.Hasher32.html @@ -0,0 +1,124 @@ + + + + + + + + + + crc::crc32::Hasher32 - Rust + + + + + + + + + + + + + + + + +
+

Trait crc::crc32::Hasher32 + + [] + + [src]

+
pub trait Hasher32 {
+    fn reset(&mut self);
+    fn write(&mut self, bytes: &[u8]);
+    fn sum32(&self) -> u32;
+}
+

Required Methods

+
+

fn reset(&mut self)

fn write(&mut self, bytes: &[u8])

fn sum32(&self) -> u32

+

Implementors

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc64/constant.ECMA.html b/doc/crc/crc64/constant.ECMA.html new file mode 100644 index 00000000..22c3f365 --- /dev/null +++ b/doc/crc/crc64/constant.ECMA.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc64::ECMA - Rust + + + + + + + + + + + + + + + + +
+

crc::crc64::ECMA + + [] + + [src]

+
pub const ECMA: u64 = 0xc96c5795d7870f42
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc64/constant.ISO.html b/doc/crc/crc64/constant.ISO.html new file mode 100644 index 00000000..6d93a6c9 --- /dev/null +++ b/doc/crc/crc64/constant.ISO.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc64::ISO - Rust + + + + + + + + + + + + + + + + +
+

crc::crc64::ISO + + [] + + [src]

+
pub const ISO: u64 = 0xd800000000000000
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc64/fn.checksum_ecma.html b/doc/crc/crc64/fn.checksum_ecma.html new file mode 100644 index 00000000..00a1d361 --- /dev/null +++ b/doc/crc/crc64/fn.checksum_ecma.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc64::checksum_ecma - Rust + + + + + + + + + + + + + + + + +
+

Function crc::crc64::checksum_ecma + + [] + + [src]

+
pub fn checksum_ecma(bytes: &[u8]) -> u64
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc64/fn.checksum_iso.html b/doc/crc/crc64/fn.checksum_iso.html new file mode 100644 index 00000000..23599799 --- /dev/null +++ b/doc/crc/crc64/fn.checksum_iso.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc64::checksum_iso - Rust + + + + + + + + + + + + + + + + +
+

Function crc::crc64::checksum_iso + + [] + + [src]

+
pub fn checksum_iso(bytes: &[u8]) -> u64
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc64/fn.make_table.html b/doc/crc/crc64/fn.make_table.html new file mode 100644 index 00000000..a8aa92ac --- /dev/null +++ b/doc/crc/crc64/fn.make_table.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc64::make_table - Rust + + + + + + + + + + + + + + + + +
+

Function crc::crc64::make_table + + [] + + [src]

+
pub fn make_table(poly: u64) -> [u64; 256]
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc64/fn.update.html b/doc/crc/crc64/fn.update.html new file mode 100644 index 00000000..39500b39 --- /dev/null +++ b/doc/crc/crc64/fn.update.html @@ -0,0 +1,111 @@ + + + + + + + + + + crc::crc64::update - Rust + + + + + + + + + + + + + + + + +
+

Function crc::crc64::update + + [] + + [src]

+
pub fn update(value: u64, table: &[u64; 256], bytes: &[u8]) -> u64
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc64/index.html b/doc/crc/crc64/index.html new file mode 100644 index 00000000..bd9d1dfa --- /dev/null +++ b/doc/crc/crc64/index.html @@ -0,0 +1,195 @@ + + + + + + + + + + crc::crc64 - Rust + + + + + + + + + + + + + + + + +
+

Module crc::crc64 + + [] + + [src]

+

Structs

+ + + + + + + + + + + + + + + +
Digest + +
ECMA_TABLE + +
ISO_TABLE + +

Constants

+ + + + + + + + + + +
ECMA + +
ISO + +

Traits

+ + + + + +
Hasher64 + +

Functions

+ + + + + + + + + + + + + + + + + + + + +
checksum_ecma + +
checksum_iso + +
make_table + +
update + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc64/sidebar-items.js b/doc/crc/crc64/sidebar-items.js new file mode 100644 index 00000000..b7dbcecc --- /dev/null +++ b/doc/crc/crc64/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["ECMA",""],["ISO",""]],"fn":[["checksum_ecma",""],["checksum_iso",""],["make_table",""],["update",""]],"struct":[["Digest",""],["ECMA_TABLE",""],["ISO_TABLE",""]],"trait":[["Hasher64",""]]}); \ No newline at end of file diff --git a/doc/crc/crc64/struct.Digest.html b/doc/crc/crc64/struct.Digest.html new file mode 100644 index 00000000..484cd363 --- /dev/null +++ b/doc/crc/crc64/struct.Digest.html @@ -0,0 +1,118 @@ + + + + + + + + + + crc::crc64::Digest - Rust + + + + + + + + + + + + + + + + +
+

Struct crc::crc64::Digest + + [] + + [src]

+
pub struct Digest {
+    // some fields omitted
+}

Methods

impl Digest

fn new(poly: u64) -> Digest

+

fn new_with_initial(poly: u64, initial: u64) -> Digest

+

Trait Implementations

impl Hasher64 for Digest

fn reset(&mut self)

+

fn write(&mut self, bytes: &[u8])

+

fn sum64(&self) -> u64

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc64/struct.ECMA_TABLE.html b/doc/crc/crc64/struct.ECMA_TABLE.html new file mode 100644 index 00000000..676e943f --- /dev/null +++ b/doc/crc/crc64/struct.ECMA_TABLE.html @@ -0,0 +1,115 @@ + + + + + + + + + + crc::crc64::ECMA_TABLE - Rust + + + + + + + + + + + + + + + + +
+

Struct crc::crc64::ECMA_TABLE + + [] + +

+
pub struct ECMA_TABLE {
+    // some fields omitted
+}

Trait Implementations

impl Deref for ECMA_TABLE

type Target = [u64; 256]

+

fn deref<'a>(&'a self) -> &'a [u64; 256]

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc64/struct.ISO_TABLE.html b/doc/crc/crc64/struct.ISO_TABLE.html new file mode 100644 index 00000000..b5769f4b --- /dev/null +++ b/doc/crc/crc64/struct.ISO_TABLE.html @@ -0,0 +1,115 @@ + + + + + + + + + + crc::crc64::ISO_TABLE - Rust + + + + + + + + + + + + + + + + +
+

Struct crc::crc64::ISO_TABLE + + [] + +

+
pub struct ISO_TABLE {
+    // some fields omitted
+}

Trait Implementations

impl Deref for ISO_TABLE

type Target = [u64; 256]

+

fn deref<'a>(&'a self) -> &'a [u64; 256]

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/crc64/trait.Hasher64.html b/doc/crc/crc64/trait.Hasher64.html new file mode 100644 index 00000000..cbce3b60 --- /dev/null +++ b/doc/crc/crc64/trait.Hasher64.html @@ -0,0 +1,124 @@ + + + + + + + + + + crc::crc64::Hasher64 - Rust + + + + + + + + + + + + + + + + +
+

Trait crc::crc64::Hasher64 + + [] + + [src]

+
pub trait Hasher64 {
+    fn reset(&mut self);
+    fn write(&mut self, bytes: &[u8]);
+    fn sum64(&self) -> u64;
+}
+

Required Methods

+
+

fn reset(&mut self)

fn write(&mut self, bytes: &[u8])

fn sum64(&self) -> u64

+

Implementors

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/index.html b/doc/crc/index.html new file mode 100644 index 00000000..7c573029 --- /dev/null +++ b/doc/crc/index.html @@ -0,0 +1,171 @@ + + + + + + + + + + crc - Rust + + + + + + + + + + + + + + + + +
+

Crate crc + + [] + + [src]

+
+

crc

+

Rust implementation of CRC(32, 64)

+ +

Usage

+

Compute CRC32

+
+use crc::{crc32, Hasher32};
+
+// CRC-32-IEEE being the most commonly used one
+assert_eq!(crc32::checksum_ieee(b"123456789"), 0xcbf43926);
+assert_eq!(crc32::checksum_castagnoli(b"123456789"), 0xe3069283);
+assert_eq!(crc32::checksum_koopman(b"123456789"), 0x2d3dd0ae);
+
+// use provided or custom polynomial
+let mut digest = crc32::Digest::new(crc32::IEEE);
+digest.write(b"123456789");
+assert_eq!(digest.sum32(), 0xcbf43926);
+
+// with initial
+let mut digest = crc32::Digest::new_with_initial(crc32::IEEE, 0u32);
+digest.write(b"123456789");
+assert_eq!(digest.sum32(), 0xcbf43926);
+ +

Compute CRC64

+
+use crc::{crc64, Hasher64};
+
+assert_eq!(crc64::checksum_ecma(b"123456789"), 0x995dc9bbdf1939fa);
+assert_eq!(crc64::checksum_iso(b"123456789"), 0xb90956c775a41001);
+
+// use provided or custom polynomial
+let mut digest = crc64::Digest::new(crc64::ECMA);
+digest.write(b"123456789");
+assert_eq!(digest.sum64(), 0x995dc9bbdf1939fa);
+
+// with initial
+let mut digest = crc64::Digest::new_with_initial(crc64::ECMA, 0u64);
+digest.write(b"123456789");
+assert_eq!(digest.sum64(), 0x995dc9bbdf1939fa);
+

Reexports

+
pub use self::crc32::Hasher32;
pub use self::crc64::Hasher64;

Modules

+ + + + + + + + + + +
crc32 + +
crc64 + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crc/sidebar-items.js b/doc/crc/sidebar-items.js new file mode 100644 index 00000000..a20c760c --- /dev/null +++ b/doc/crc/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["crc32",""],["crc64",""]]}); \ No newline at end of file diff --git a/doc/crossbeam/fn.scope.html b/doc/crossbeam/fn.scope.html new file mode 100644 index 00000000..8030f3bd --- /dev/null +++ b/doc/crossbeam/fn.scope.html @@ -0,0 +1,124 @@ + + + + + + + + + + crossbeam::scope - Rust + + + + + + + + + + + + + + + + +
+

Function crossbeam::scope + + [] + + [src]

+
pub fn scope<'a, F, R>(f: F) -> R where F: FnOnce(&Scope<'a>) -> R

Create a new scope, for deferred destructors.

+ +

Scopes, in particular, support scoped thread spawning.

+ +

Examples

+

Creating and using a scope:

+ +
+crossbeam::scope(|scope| {
+    scope.defer(|| println!("Exiting scope"));
+    scope.spawn(|| println!("Running child thread in scope"))
+});
+// Prints messages in the reverse order written
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/fn.spawn_unsafe.html b/doc/crossbeam/fn.spawn_unsafe.html new file mode 100644 index 00000000..e3498b30 --- /dev/null +++ b/doc/crossbeam/fn.spawn_unsafe.html @@ -0,0 +1,112 @@ + + + + + + + + + + crossbeam::spawn_unsafe - Rust + + + + + + + + + + + + + + + + +
+

Function crossbeam::spawn_unsafe + + [] + + [src]

+
pub unsafe fn spawn_unsafe<'a, F>(f: F) -> JoinHandle<()> where F: FnOnce() + 'a

Like std::thread::spawn, but without the closure bounds.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/index.html b/doc/crossbeam/index.html new file mode 100644 index 00000000..bc697f2f --- /dev/null +++ b/doc/crossbeam/index.html @@ -0,0 +1,184 @@ + + + + + + + + + + crossbeam - Rust + + + + + + + + + + + + + + + + +
+

Crate crossbeam + + [] + + [src]

+

Support for concurrent and parallel programming.

+ +

This crate is an early work in progress. The focus for the moment is +concurrency:

+ +
    +
  • Non-blocking data structures. These data structures allow for high +performance, highly-concurrent access, much superior to wrapping with a +Mutex. Ultimately the goal is to include stacks, queues, deques, bags, +sets and maps. These live in the sync module.

  • +
  • Memory management. Because non-blocking data structures avoid global +synchronization, it is not easy to tell when internal data can be safely +freed. The mem module provides generic, easy to use, and high-performance +APIs for managing memory in these cases. These live in the mem module.

  • +
  • Synchronization. The standard library provides a few synchronization +primitives (locks, semaphores, barriers, etc) but this crate seeks to expand +that set to include more advanced/niche primitives, as well as userspace +alternatives. These live in the sync module.

  • +
  • Scoped thread API. Finally, the crate provides a "scoped" thread API, +making it possible to spawn threads that share stack data with their +parents. This functionality is exported at the top-level.

  • +
+

Modules

+ + + + + + + + + + +
mem +

Memory management for concurrent data structures

+
sync +

Synchronization primitives.

+

Structs

+ + + + + + + + + + +
Scope + +
ScopedJoinHandle +

A handle to a scoped thread

+

Functions

+ + + + + + + + + + +
scope +

Create a new scope, for deferred destructors.

+
spawn_unsafe +

Like std::thread::spawn, but without the closure bounds.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/mem/cache_padded/index.html b/doc/crossbeam/mem/cache_padded/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/crossbeam/mem/cache_padded/sidebar-items.js b/doc/crossbeam/mem/cache_padded/sidebar-items.js new file mode 100644 index 00000000..25d09ad3 --- /dev/null +++ b/doc/crossbeam/mem/cache_padded/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["CachePadded","Pad `T` to the length of a cacheline."]],"trait":[["ZerosValid","Types for which mem::zeroed() is safe."]]}); \ No newline at end of file diff --git a/doc/crossbeam/mem/cache_padded/struct.CachePadded.html b/doc/crossbeam/mem/cache_padded/struct.CachePadded.html new file mode 100644 index 00000000..86b1ab1d --- /dev/null +++ b/doc/crossbeam/mem/cache_padded/struct.CachePadded.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../crossbeam/mem/struct.CachePadded.html...

+ + + \ No newline at end of file diff --git a/doc/crossbeam/mem/cache_padded/trait.ZerosValid.html b/doc/crossbeam/mem/cache_padded/trait.ZerosValid.html new file mode 100644 index 00000000..db14e0ae --- /dev/null +++ b/doc/crossbeam/mem/cache_padded/trait.ZerosValid.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../crossbeam/mem/trait.ZerosValid.html...

+ + + \ No newline at end of file diff --git a/doc/crossbeam/mem/epoch/fn.pin.html b/doc/crossbeam/mem/epoch/fn.pin.html new file mode 100644 index 00000000..aff14433 --- /dev/null +++ b/doc/crossbeam/mem/epoch/fn.pin.html @@ -0,0 +1,119 @@ + + + + + + + + + + crossbeam::mem::epoch::pin - Rust + + + + + + + + + + + + + + + + +
+

Function crossbeam::mem::epoch::pin + + [] + + [src]

+
pub fn pin() -> Guard

Pin the current epoch.

+ +

Threads generally pin before interacting with a lock-free data +structure. Pinning requires a full memory barrier, so is somewhat +expensive. It is rentrant -- you can safely acquire nested guards, and only +the first guard requires a barrier. Thus, in cases where you expect to +perform several lock-free operations in quick succession, you may consider +pinning around the entire set of operations.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/mem/epoch/garbage/index.html b/doc/crossbeam/mem/epoch/garbage/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/crossbeam/mem/epoch/garbage/sidebar-items.js b/doc/crossbeam/mem/epoch/garbage/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/crossbeam/mem/epoch/garbage/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/crossbeam/mem/epoch/global/imp/index.html b/doc/crossbeam/mem/epoch/global/imp/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/crossbeam/mem/epoch/global/imp/sidebar-items.js b/doc/crossbeam/mem/epoch/global/imp/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/crossbeam/mem/epoch/global/imp/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/crossbeam/mem/epoch/global/index.html b/doc/crossbeam/mem/epoch/global/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/crossbeam/mem/epoch/global/sidebar-items.js b/doc/crossbeam/mem/epoch/global/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/crossbeam/mem/epoch/global/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/crossbeam/mem/epoch/index.html b/doc/crossbeam/mem/epoch/index.html new file mode 100644 index 00000000..f37c379c --- /dev/null +++ b/doc/crossbeam/mem/epoch/index.html @@ -0,0 +1,278 @@ + + + + + + + + + + crossbeam::mem::epoch - Rust + + + + + + + + + + + + + + + + +
+

Module crossbeam::mem::epoch + + [] + + [src]

+

Epoch-based memory management

+ +

This module provides fast, easy to use memory management for lock free data +structures. It's inspired by Keir Fraser's epoch-based +reclamation.

+ +

The basic problem this is solving is the fact that when one thread has +removed a node from a data structure, other threads may still have pointers +to that node (in the form of snapshots that will be validated through things +like compare-and-swap), so the memory cannot be immediately freed. Put differently:

+ +
    +
  1. There are two sources of reachability at play -- the data structure, and +the snapshots in threads accessing it. Before we delete a node, we need to know +that it cannot be reached in either of these ways.

  2. +
  3. Once a node has been unliked from the data structure, no new snapshots +reaching it will be created.

  4. +
+ +

Using the epoch scheme is fairly straightforward, and does not require +understanding any of the implementation details:

+ +
    +
  • When operating on a shared data structure, a thread must "pin the current +epoch", which is done by calling pin(). This function returns a Guard +which unpins the epoch when destroyed.

  • +
  • When the thread subsequently reads from a lock-free data structure, the +pointers it extracts act like references with lifetime tied to the +Guard. This allows threads to safely read from snapshotted data, being +guaranteed that the data will remain allocated until they exit the epoch.

  • +
+ +

To put the Guard to use, Crossbeam provides a set of three pointer types meant to work together:

+ +
    +
  • Owned<T>, akin to Box<T>, which points to uniquely-owned data that has +not yet been published in a concurrent data structure.

  • +
  • Shared<'a, T>, akin to &'a T, which points to shared data that may or may +not be reachable from a data structure, but it guaranteed not to be freed +during lifetime 'a.

  • +
  • Atomic<T>, akin to std::sync::atomic::AtomicPtr, which provides atomic +updates to a pointer using the Owned and Shared types, and connects them +to a Guard.

  • +
+ +

Each of these types provides further documentation on usage.

+ +

Example

+
+use std::sync::atomic::Ordering::{Acquire, Release, Relaxed};
+use std::ptr;
+
+use crossbeam::mem::epoch::{self, Atomic, Owned};
+
+struct TreiberStack<T> {
+    head: Atomic<Node<T>>,
+}
+
+struct Node<T> {
+    data: T,
+    next: Atomic<Node<T>>,
+}
+
+impl<T> TreiberStack<T> {
+    fn new() -> TreiberStack<T> {
+        TreiberStack {
+            head: Atomic::null()
+        }
+    }
+
+    fn push(&self, t: T) {
+        // allocate the node via Owned
+        let mut n = Owned::new(Node {
+            data: t,
+            next: Atomic::null(),
+        });
+
+        // become active
+        let guard = epoch::pin();
+
+        loop {
+            // snapshot current head
+            let head = self.head.load(Relaxed, &guard);
+
+            // update `next` pointer with snapshot
+            n.next.store_shared(head, Relaxed);
+
+            // if snapshot is still good, link in the new node
+            match self.head.cas_and_ref(head, n, Release, &guard) {
+                Ok(_) => return,
+                Err(owned) => n = owned,
+            }
+        }
+    }
+
+    fn pop(&self) -> Option<T> {
+        // become active
+        let guard = epoch::pin();
+
+        loop {
+            // take a snapshot
+            match self.head.load(Acquire, &guard) {
+                // the stack is non-empty
+                Some(head) => {
+                    // read through the snapshot, *safely*!
+                    let next = head.next.load(Relaxed, &guard);
+
+                    // if snapshot is still good, update from `head` to `next`
+                    if self.head.cas_shared(Some(head), next, Release) {
+                        unsafe {
+                            // mark the node as unlinked
+                            guard.unlinked(head);
+
+                            // extract out the data from the now-unlinked node
+                            return Some(ptr::read(&(*head).data))
+                        }
+                    }
+                }
+
+                // we observed the stack empty
+                None => return None
+            }
+        }
+    }
+}
+

Structs

+ + + + + + + + + + + + + + + + + + + + +
Atomic +

Like std::sync::atomic::AtomicPtr.

+
Guard +

An RAII-style guard for pinning the current epoch.

+
Owned +

Like Box<T>: an owned, heap-allocated data value of type T.

+
Shared +

Like &'a T: a shared reference valid for lifetime 'a.

+

Functions

+ + + + + +
pin +

Pin the current epoch.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/mem/epoch/local/index.html b/doc/crossbeam/mem/epoch/local/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/crossbeam/mem/epoch/local/sidebar-items.js b/doc/crossbeam/mem/epoch/local/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/crossbeam/mem/epoch/local/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/crossbeam/mem/epoch/participant/index.html b/doc/crossbeam/mem/epoch/participant/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/crossbeam/mem/epoch/participant/sidebar-items.js b/doc/crossbeam/mem/epoch/participant/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/crossbeam/mem/epoch/participant/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/crossbeam/mem/epoch/participants/index.html b/doc/crossbeam/mem/epoch/participants/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/crossbeam/mem/epoch/participants/sidebar-items.js b/doc/crossbeam/mem/epoch/participants/sidebar-items.js new file mode 100644 index 00000000..48333d31 --- /dev/null +++ b/doc/crossbeam/mem/epoch/participants/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/doc/crossbeam/mem/epoch/sidebar-items.js b/doc/crossbeam/mem/epoch/sidebar-items.js new file mode 100644 index 00000000..be7217ee --- /dev/null +++ b/doc/crossbeam/mem/epoch/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["pin","Pin the current epoch."]],"struct":[["Atomic","Like `std::sync::atomic::AtomicPtr`."],["Guard","An RAII-style guard for pinning the current epoch."],["Owned","Like `Box`: an owned, heap-allocated data value of type `T`."],["Shared","Like `&'a T`: a shared reference valid for lifetime `'a`."]]}); \ No newline at end of file diff --git a/doc/crossbeam/mem/epoch/struct.Atomic.html b/doc/crossbeam/mem/epoch/struct.Atomic.html new file mode 100644 index 00000000..7e0be579 --- /dev/null +++ b/doc/crossbeam/mem/epoch/struct.Atomic.html @@ -0,0 +1,179 @@ + + + + + + + + + + crossbeam::mem::epoch::Atomic - Rust + + + + + + + + + + + + + + + + +
+

Struct crossbeam::mem::epoch::Atomic + + [] + + [src]

+
pub struct Atomic<T> {
+    // some fields omitted
+}

Like std::sync::atomic::AtomicPtr.

+ +

Provides atomic access to a (nullable) pointer of type T, interfacing with +the Owned and Shared types.

+

Methods

impl<T> Atomic<T>

fn null() -> Atomic<T>

+

fn new(data: T) -> Atomic<T>

+

Create a new atomic pointer

+

fn load<'a>(&self, ord: Ordering, _: &'a Guard) -> Option<Shared<'a, T>>

+

Do an atomic load with the given memory ordering.

+ +

In order to perform the load, we must pass in a borrow of a +Guard. This is a way of guaranteeing that the thread has pinned the +epoch for the entire lifetime 'a. In return, you get an optional +Shared pointer back (None if the Atomic is currently null), with +lifetime tied to the guard.

+ +

Panics

+

Panics if ord is Release or AcqRel.

+

fn store(&self, val: Option<Owned<T>>, ord: Ordering)

+

Do an atomic store with the given memory ordering.

+ +

Transfers ownership of the given Owned pointer, if any. Since no +lifetime information is acquired, no Guard value is needed.

+ +

Panics

+

Panics if ord is Acquire or AcqRel.

+

fn store_and_ref<'a>(&self, val: Owned<T>, ord: Ordering, _: &'a Guard) -> Shared<'a, T>

+

Do an atomic store with the given memory ordering, immediately yielding +a shared reference to the pointer that was stored.

+ +

Transfers ownership of the given Owned pointer, yielding a Shared +reference to it. Since the reference is valid only for the curent epoch, +it's lifetime is tied to a Guard value.

+ +

Panics

+

Panics if ord is Acquire or AcqRel.

+

fn store_shared(&self, val: Option<Shared<T>>, ord: Ordering)

+

Do an atomic store of a Shared pointer with the given memory ordering.

+ +

This operation does not require a guard, because it does not yield any +new information about the lifetime of a pointer.

+ +

Panics

+

Panics if ord is Acquire or AcqRel.

+

fn cas(&self, old: Option<Shared<T>>, new: Option<Owned<T>>, ord: Ordering) -> Result<(), Option<Owned<T>>>

+

Do a compare-and-set from a Shared to an Owned pointer with the +given memory ordering.

+ +

As with store, this operation does not require a guard; it produces no new +lifetime information. The Result indicates whether the CAS succeeded; if +not, ownership of the new pointer is returned to the caller.

+

fn cas_and_ref<'a>(&self, old: Option<Shared<T>>, new: Owned<T>, ord: Ordering, _: &'a Guard) -> Result<Shared<'a, T>, Owned<T>>

+

Do a compare-and-set from a Shared to an Owned pointer with the +given memory ordering, immediatley acquiring a new Shared reference to +the previously-owned pointer if successful.

+ +

This operation is analogous to store_and_ref.

+

fn cas_shared(&self, old: Option<Shared<T>>, new: Option<Shared<T>>, ord: Ordering) -> bool

+

Do a compare-and-set from a Shared to another Shared pointer with +the given memory ordering.

+ +

The boolean return value is true when the CAS is successful.

+

fn swap<'a>(&self, new: Option<Owned<T>>, ord: Ordering, _: &'a Guard) -> Option<Shared<'a, T>>

+

Do an atomic swap with an Owned pointer with the given memory ordering.

+

fn swap_shared<'a>(&self, new: Option<Shared<T>>, ord: Ordering, _: &'a Guard) -> Option<Shared<'a, T>>

+

Do an atomic swap with a Shared pointer with the given memory ordering.

+

Trait Implementations

impl<T: Sync> Send for Atomic<T>

impl<T: Sync> Sync for Atomic<T>

+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/mem/epoch/struct.Guard.html b/doc/crossbeam/mem/epoch/struct.Guard.html new file mode 100644 index 00000000..172c2681 --- /dev/null +++ b/doc/crossbeam/mem/epoch/struct.Guard.html @@ -0,0 +1,124 @@ + + + + + + + + + + crossbeam::mem::epoch::Guard - Rust + + + + + + + + + + + + + + + + +
+

Struct crossbeam::mem::epoch::Guard + + [] + + [src]

+
#[must_use]
+pub struct Guard {
+    // some fields omitted
+}

An RAII-style guard for pinning the current epoch.

+ +

A guard must be acquired before most operations on an Atomic pointer. On +destruction, it unpins the epoch.

+

Methods

impl Guard

unsafe fn unlinked<T>(&self, val: Shared<T>)

+

Assert that the value is no longer reachable from a lock-free data +structure and should be collected when sufficient epochs have passed.

+

fn migrate_garbage(&self)

+

Move the thread-local garbage into the global set of garbage.

+

Trait Implementations

impl Drop for Guard

fn drop(&mut self)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/mem/epoch/struct.Owned.html b/doc/crossbeam/mem/epoch/struct.Owned.html new file mode 100644 index 00000000..99a109f6 --- /dev/null +++ b/doc/crossbeam/mem/epoch/struct.Owned.html @@ -0,0 +1,121 @@ + + + + + + + + + + crossbeam::mem::epoch::Owned - Rust + + + + + + + + + + + + + + + + +
+

Struct crossbeam::mem::epoch::Owned + + [] + + [src]

+
pub struct Owned<T> {
+    // some fields omitted
+}

Like Box<T>: an owned, heap-allocated data value of type T.

+

Methods

impl<T> Owned<T>

fn new(t: T) -> Owned<T>

+

Move t to a new heap allocation.

+

fn into_inner(self) -> T

+

Move data out of the owned box, deallocating the box.

+

Trait Implementations

impl<T> Deref for Owned<T>

type Target = T

+

fn deref(&self) -> &T

+

impl<T> DerefMut for Owned<T>

fn deref_mut(&mut self) -> &mut T

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/mem/epoch/struct.Shared.html b/doc/crossbeam/mem/epoch/struct.Shared.html new file mode 100644 index 00000000..919455a9 --- /dev/null +++ b/doc/crossbeam/mem/epoch/struct.Shared.html @@ -0,0 +1,121 @@ + + + + + + + + + + crossbeam::mem::epoch::Shared - Rust + + + + + + + + + + + + + + + + +
+

Struct crossbeam::mem::epoch::Shared + + [] + + [src]

+
pub struct Shared<'a, T: 'a> {
+    // some fields omitted
+}

Like &'a T: a shared reference valid for lifetime 'a.

+

Methods

impl<'a, T> Shared<'a, T>

fn as_raw(&self) -> *mut T

+

Trait Implementations

impl<'a, T> Copy for Shared<'a, T>

impl<'a, T> Clone for Shared<'a, T>

fn clone(&self) -> Shared<'a, T>

+

1.0.0fn clone_from(&mut self, source: &Self)

+

impl<'a, T> Deref for Shared<'a, T>

type Target = &'a T

+

fn deref(&self) -> &&'a T

+

Derived Implementations

impl<'a, T: Eq + 'a> Eq for Shared<'a, T>

impl<'a, T: PartialEq + 'a> PartialEq for Shared<'a, T>

fn eq(&self, __arg_0: &Shared<'a, T>) -> bool

+

fn ne(&self, __arg_0: &Shared<'a, T>) -> bool

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/mem/index.html b/doc/crossbeam/mem/index.html new file mode 100644 index 00000000..2db1eb8a --- /dev/null +++ b/doc/crossbeam/mem/index.html @@ -0,0 +1,142 @@ + + + + + + + + + + crossbeam::mem - Rust + + + + + + + + + + + + + + + + +
+

Module crossbeam::mem + + [] + + [src]

+

Memory management for concurrent data structures

+ +

At the moment, the only memory management scheme is epoch-based reclamation, +found in the epoch submodule.

+

Modules

+ + + + + +
epoch +

Epoch-based memory management

+

Structs

+ + + + + +
CachePadded +

Pad T to the length of a cacheline.

+

Traits

+ + + + + +
ZerosValid +

Types for which mem::zeroed() is safe.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/mem/sidebar-items.js b/doc/crossbeam/mem/sidebar-items.js new file mode 100644 index 00000000..5af3d456 --- /dev/null +++ b/doc/crossbeam/mem/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["epoch","Epoch-based memory management"]],"struct":[["CachePadded","Pad `T` to the length of a cacheline."]],"trait":[["ZerosValid","Types for which mem::zeroed() is safe."]]}); \ No newline at end of file diff --git a/doc/crossbeam/mem/struct.CachePadded.html b/doc/crossbeam/mem/struct.CachePadded.html new file mode 100644 index 00000000..2381b1bf --- /dev/null +++ b/doc/crossbeam/mem/struct.CachePadded.html @@ -0,0 +1,135 @@ + + + + + + + + + + crossbeam::mem::CachePadded - Rust + + + + + + + + + + + + + + + + +
+

Struct crossbeam::mem::CachePadded + + [] + + [src]

+
pub struct CachePadded<T> {
+    // some fields omitted
+}

Pad T to the length of a cacheline.

+ +

Sometimes concurrent programming requires a piece of data to be padded out +to the size of a cacheline to avoid "false sharing": cachelines being +invalidated due to unrelated concurrent activity. Use the CachePadded type +when you want to avoid cache locality.

+ +

At the moment, cache lines are assumed to be 32 * sizeof(usize) on all +architectures.

+ +

Warning: the wrapped data is never dropped; move out using ptr::read +if you need to run dtors.

+

Methods

impl<T: ZerosValid> CachePadded<T>

fn zeroed() -> CachePadded<T>

+

A const fn equivalent to mem::zeroed().

+

impl<T> CachePadded<T>

fn new(t: T) -> CachePadded<T>

+

Wrap t with cacheline padding.

+ +

Warning: the wrapped data is never dropped; move out using +ptr:read if you need to run dtors.

+

Trait Implementations

impl<T: Send> Send for CachePadded<T>

impl<T: Sync> Sync for CachePadded<T>

impl<T> Deref for CachePadded<T>

type Target = T

+

fn deref(&self) -> &T

+

impl<T> DerefMut for CachePadded<T>

fn deref_mut(&mut self) -> &mut T

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/mem/trait.ZerosValid.html b/doc/crossbeam/mem/trait.ZerosValid.html new file mode 100644 index 00000000..d1e20926 --- /dev/null +++ b/doc/crossbeam/mem/trait.ZerosValid.html @@ -0,0 +1,132 @@ + + + + + + + + + + crossbeam::mem::ZerosValid - Rust + + + + + + + + + + + + + + + + +
+

Trait crossbeam::mem::ZerosValid + + [] + + [src]

+
pub unsafe trait ZerosValid { }

Types for which mem::zeroed() is safe.

+ +

If a type T: ZerosValid, then a sequence of zeros the size of T must be +a valid member of the type T.

+
+

Implementors

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/scoped/fn.scope.html b/doc/crossbeam/scoped/fn.scope.html new file mode 100644 index 00000000..7a01c598 --- /dev/null +++ b/doc/crossbeam/scoped/fn.scope.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../crossbeam/fn.scope.html...

+ + + \ No newline at end of file diff --git a/doc/crossbeam/scoped/index.html b/doc/crossbeam/scoped/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/crossbeam/scoped/sidebar-items.js b/doc/crossbeam/scoped/sidebar-items.js new file mode 100644 index 00000000..0ff528c1 --- /dev/null +++ b/doc/crossbeam/scoped/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["scope","Create a new `scope`, for deferred destructors."]],"struct":[["Scope",""],["ScopedJoinHandle","A handle to a scoped thread"]]}); \ No newline at end of file diff --git a/doc/crossbeam/scoped/struct.Scope.html b/doc/crossbeam/scoped/struct.Scope.html new file mode 100644 index 00000000..0b7f08a9 --- /dev/null +++ b/doc/crossbeam/scoped/struct.Scope.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../crossbeam/struct.Scope.html...

+ + + \ No newline at end of file diff --git a/doc/crossbeam/scoped/struct.ScopedJoinHandle.html b/doc/crossbeam/scoped/struct.ScopedJoinHandle.html new file mode 100644 index 00000000..91020d4d --- /dev/null +++ b/doc/crossbeam/scoped/struct.ScopedJoinHandle.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../crossbeam/struct.ScopedJoinHandle.html...

+ + + \ No newline at end of file diff --git a/doc/crossbeam/sidebar-items.js b/doc/crossbeam/sidebar-items.js new file mode 100644 index 00000000..d4163a36 --- /dev/null +++ b/doc/crossbeam/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["scope","Create a new `scope`, for deferred destructors."],["spawn_unsafe","Like `std::thread::spawn`, but without the closure bounds."]],"mod":[["mem","Memory management for concurrent data structures"],["sync","Synchronization primitives."]],"struct":[["Scope",""],["ScopedJoinHandle","A handle to a scoped thread"]]}); \ No newline at end of file diff --git a/doc/crossbeam/struct.Scope.html b/doc/crossbeam/struct.Scope.html new file mode 100644 index 00000000..0ac56da4 --- /dev/null +++ b/doc/crossbeam/struct.Scope.html @@ -0,0 +1,227 @@ + + + + + + + + + + crossbeam::Scope - Rust + + + + + + + + + + + + + + + + +
+

Struct crossbeam::Scope + + [] + + [src]

+
pub struct Scope<'a> {
+    // some fields omitted
+}

Methods

impl<'a> Scope<'a>

fn defer<F>(&self, f: F) where F: FnOnce() + 'a

+

Schedule code to be executed when exiting the scope.

+ +

This is akin to having a destructor on the stack, except that it is +guaranteed to be run.

+

fn spawn<F, T>(&self, f: F) -> ScopedJoinHandle<T> where F: FnOnce() -> T + Send + 'a, T: Send + 'a

+

Create a scoped thread.

+ +

spawn is similar to the spawn function in Rust's standard library. The +difference is that this thread is scoped, meaning that it's guaranteed to terminate +before the current stack frame goes away, allowing you to reference the parent stack frame +directly. This is ensured by having the parent thread join on the child thread before the +scope exits.

+ +

Examples

+

A basic scoped thread:

+ +
+crossbeam::scope(|scope| {
+    scope.spawn(|| {
+        println!("Hello from a scoped thread!");
+    });
+});
+ +

When writing concurrent Rust programs, you'll sometimes see a pattern like this, using +std::thread::spawn:

+ +
+let array = [1, 2, 3];
+let mut guards = vec![];
+
+for i in &array {
+    let guard = std::thread::spawn(move || {
+        println!("element: {}", i);
+    });
+
+    guards.push(guard);
+}
+
+for guard in guards {
+    guard.join().unwrap();
+}
+ +

The basic pattern is:

+ +
    +
  1. Iterate over some collection.
  2. +
  3. Spin up a thread to operate on each part of the collection.
  4. +
  5. Join all the threads.
  6. +
+ +

However, this code actually gives an error:

+ +
error: `array` does not live long enough
+for i in &array {
+          ^~~~~
+in expansion of for loop expansion
+note: expansion site
+note: reference must be valid for the static lifetime...
+note: ...but borrowed value is only valid for the block suffix following statement 0 at ...
+    let array = [1, 2, 3];
+    let mut guards = vec![];
+
+    for i in &array {
+        let guard = std::thread::spawn(move || {
+            println!("element: {}", i);
+...
+error: aborting due to previous error
+
+ +

Because std::thread::spawn doesn't know about this scope, it requires a +'static lifetime. One way of giving it a proper lifetime is to use an Arc:

+ +
+use std::sync::Arc;
+
+let array = Arc::new([1, 2, 3]);
+let mut guards = vec![];
+
+for i in (0..array.len()) {
+    let a = array.clone();
+
+    let guard = std::thread::spawn(move || {
+        println!("element: {}", a[i]);
+    });
+
+    guards.push(guard);
+}
+
+for guard in guards {
+    guard.join().unwrap();
+}
+ +

But this introduces unnecessary allocation, as Arc<T> puts its data on the heap, and we +also end up dealing with reference counts. We know that we're joining the threads before +our function returns, so just taking a reference should be safe. Rust can't know that, +though.

+ +

Enter scoped threads. Here's our original example, using spawn from crossbeam rather +than from std::thread:

+ +
+let array = [1, 2, 3];
+
+crossbeam::scope(|scope| {
+    for i in &array {
+        scope.spawn(move || {
+            println!("element: {}", i);
+        });
+    }
+});
+ +

Much more straightforward.

+

Trait Implementations

impl<'a> Drop for Scope<'a>

fn drop(&mut self)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/struct.ScopedJoinHandle.html b/doc/crossbeam/struct.ScopedJoinHandle.html new file mode 100644 index 00000000..8edb80ac --- /dev/null +++ b/doc/crossbeam/struct.ScopedJoinHandle.html @@ -0,0 +1,118 @@ + + + + + + + + + + crossbeam::ScopedJoinHandle - Rust + + + + + + + + + + + + + + + + +
+

Struct crossbeam::ScopedJoinHandle + + [] + + [src]

+
pub struct ScopedJoinHandle<T> {
+    // some fields omitted
+}

A handle to a scoped thread

+

Methods

impl<T> ScopedJoinHandle<T>

fn join(self) -> T

+

Join the scoped thread, returning the result it produced.

+

fn thread(&self) -> &Thread

+

Get the underlying thread handle.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/sync/atomic_option/index.html b/doc/crossbeam/sync/atomic_option/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/crossbeam/sync/atomic_option/sidebar-items.js b/doc/crossbeam/sync/atomic_option/sidebar-items.js new file mode 100644 index 00000000..620e3755 --- /dev/null +++ b/doc/crossbeam/sync/atomic_option/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["AtomicOption",""]]}); \ No newline at end of file diff --git a/doc/crossbeam/sync/atomic_option/struct.AtomicOption.html b/doc/crossbeam/sync/atomic_option/struct.AtomicOption.html new file mode 100644 index 00000000..4fa12723 --- /dev/null +++ b/doc/crossbeam/sync/atomic_option/struct.AtomicOption.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../crossbeam/sync/struct.AtomicOption.html...

+ + + \ No newline at end of file diff --git a/doc/crossbeam/sync/chase_lev/enum.Steal.html b/doc/crossbeam/sync/chase_lev/enum.Steal.html new file mode 100644 index 00000000..2e4f1834 --- /dev/null +++ b/doc/crossbeam/sync/chase_lev/enum.Steal.html @@ -0,0 +1,124 @@ + + + + + + + + + + crossbeam::sync::chase_lev::Steal - Rust + + + + + + + + + + + + + + + + +
+

Enum crossbeam::sync::chase_lev::Steal + + [] + + [src]

+
pub enum Steal<T> {
+    Empty,
+    Abort,
+    Data(T),
+}

When stealing some data, this is an enumeration of the possible outcomes.

+

Variants

+
Empty

The deque was empty at the time of stealing

+
Abort

The stealer lost the race for stealing data, and a retry may return more +data.

+
Data

The stealer has successfully stolen some data.

+

Trait Implementations

Derived Implementations

impl<T: Debug> Debug for Steal<T>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

+

impl<T: Eq> Eq for Steal<T>

impl<T: PartialEq> PartialEq for Steal<T>

fn eq(&self, __arg_0: &Steal<T>) -> bool

+

fn ne(&self, __arg_0: &Steal<T>) -> bool

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/sync/chase_lev/fn.deque.html b/doc/crossbeam/sync/chase_lev/fn.deque.html new file mode 100644 index 00000000..b87ce091 --- /dev/null +++ b/doc/crossbeam/sync/chase_lev/fn.deque.html @@ -0,0 +1,112 @@ + + + + + + + + + + crossbeam::sync::chase_lev::deque - Rust + + + + + + + + + + + + + + + + +
+

Function crossbeam::sync::chase_lev::deque + + [] + + [src]

+
pub fn deque<T>() -> (Worker<T>, Stealer<T>)

Creates a new empty deque

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/sync/chase_lev/index.html b/doc/crossbeam/sync/chase_lev/index.html new file mode 100644 index 00000000..fffb3200 --- /dev/null +++ b/doc/crossbeam/sync/chase_lev/index.html @@ -0,0 +1,172 @@ + + + + + + + + + + crossbeam::sync::chase_lev - Rust + + + + + + + + + + + + + + + + +
+

Module crossbeam::sync::chase_lev + + [] + + [src]

+

A lock-free concurrent work-stealing deque

+ +

This module contains an implementation of the Chase-Lev work stealing deque +described in "Dynamic Circular Work-Stealing Deque". The implementation is +heavily based on the pseudocode found in the paper.

+ +

Example

+
+use crossbeam::sync::chase_lev;
+let (mut worker, stealer) = chase_lev::deque();
+
+// Only the worker may push/try_pop
+worker.push(1);
+worker.try_pop();
+
+// Stealers take data from the other end of the deque
+worker.push(1);
+stealer.steal();
+
+// Stealers can be cloned to have many stealers stealing in parallel
+worker.push(1);
+let stealer2 = stealer.clone();
+stealer2.steal();
+

Structs

+ + + + + + + + + + +
Stealer +

The stealing half of the work-stealing deque. Stealers have access to the +opposite end of the deque from the worker, and they only have access to the +steal method.

+
Worker +

Worker half of the work-stealing deque. This worker has exclusive access to +one side of the deque, and uses push and try_pop method to manipulate it.

+

Enums

+ + + + + +
Steal +

When stealing some data, this is an enumeration of the possible outcomes.

+

Functions

+ + + + + +
deque +

Creates a new empty deque

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/sync/chase_lev/sidebar-items.js b/doc/crossbeam/sync/chase_lev/sidebar-items.js new file mode 100644 index 00000000..ed6dd85c --- /dev/null +++ b/doc/crossbeam/sync/chase_lev/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["Steal","When stealing some data, this is an enumeration of the possible outcomes."]],"fn":[["deque","Creates a new empty deque"]],"struct":[["Stealer","The stealing half of the work-stealing deque. Stealers have access to the opposite end of the deque from the worker, and they only have access to the `steal` method."],["Worker","Worker half of the work-stealing deque. This worker has exclusive access to one side of the deque, and uses `push` and `try_pop` method to manipulate it."]]}); \ No newline at end of file diff --git a/doc/crossbeam/sync/chase_lev/struct.Stealer.html b/doc/crossbeam/sync/chase_lev/struct.Stealer.html new file mode 100644 index 00000000..ecce8edf --- /dev/null +++ b/doc/crossbeam/sync/chase_lev/struct.Stealer.html @@ -0,0 +1,122 @@ + + + + + + + + + + crossbeam::sync::chase_lev::Stealer - Rust + + + + + + + + + + + + + + + + +
+

Struct crossbeam::sync::chase_lev::Stealer + + [] + + [src]

+
pub struct Stealer<T> {
+    // some fields omitted
+}

The stealing half of the work-stealing deque. Stealers have access to the +opposite end of the deque from the worker, and they only have access to the +steal method.

+ +

Stealers can be cloned to have more than one handle active at a time.

+

Methods

impl<T> Stealer<T>

fn steal(&self) -> Steal<T>

+

Steals work off the end of the queue (opposite of the worker's end)

+

Trait Implementations

impl<T> Clone for Stealer<T>

fn clone(&self) -> Stealer<T>

+

1.0.0fn clone_from(&mut self, source: &Self)

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/sync/chase_lev/struct.Worker.html b/doc/crossbeam/sync/chase_lev/struct.Worker.html new file mode 100644 index 00000000..10cd4eee --- /dev/null +++ b/doc/crossbeam/sync/chase_lev/struct.Worker.html @@ -0,0 +1,123 @@ + + + + + + + + + + crossbeam::sync::chase_lev::Worker - Rust + + + + + + + + + + + + + + + + +
+

Struct crossbeam::sync::chase_lev::Worker + + [] + + [src]

+
pub struct Worker<T> {
+    // some fields omitted
+}

Worker half of the work-stealing deque. This worker has exclusive access to +one side of the deque, and uses push and try_pop method to manipulate it.

+ +

There may only be one worker per deque, and operations on the worker +require mutable access to the worker itself.

+

Methods

impl<T> Worker<T>

fn push(&mut self, t: T)

+

Pushes data onto the front of this work queue.

+

fn try_pop(&mut self) -> Option<T>

+

Pops data off the front of the work queue, returning None on an empty +queue.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/sync/index.html b/doc/crossbeam/sync/index.html new file mode 100644 index 00000000..1c58faf0 --- /dev/null +++ b/doc/crossbeam/sync/index.html @@ -0,0 +1,155 @@ + + + + + + + + + + crossbeam::sync - Rust + + + + + + + + + + + + + + + + +
+

Module crossbeam::sync + + [] + + [src]

+

Synchronization primitives.

+

Modules

+ + + + + +
chase_lev +

A lock-free concurrent work-stealing deque

+

Structs

+ + + + + + + + + + + + + + + + + + + + +
AtomicOption + +
MsQueue +

A Michael-Scott lock-free queue, with support for blocking pops.

+
SegQueue +

A Michael-Scott queue that allocates "segments" (arrays of nodes) +for efficiency.

+
TreiberStack +

Treiber's lock-free stack.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/sync/ms_queue/index.html b/doc/crossbeam/sync/ms_queue/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/crossbeam/sync/ms_queue/sidebar-items.js b/doc/crossbeam/sync/ms_queue/sidebar-items.js new file mode 100644 index 00000000..01cffea0 --- /dev/null +++ b/doc/crossbeam/sync/ms_queue/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["MsQueue","A Michael-Scott lock-free queue, with support for blocking `pop`s."]]}); \ No newline at end of file diff --git a/doc/crossbeam/sync/ms_queue/struct.MsQueue.html b/doc/crossbeam/sync/ms_queue/struct.MsQueue.html new file mode 100644 index 00000000..52405d28 --- /dev/null +++ b/doc/crossbeam/sync/ms_queue/struct.MsQueue.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../crossbeam/sync/struct.MsQueue.html...

+ + + \ No newline at end of file diff --git a/doc/crossbeam/sync/seg_queue/index.html b/doc/crossbeam/sync/seg_queue/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/crossbeam/sync/seg_queue/sidebar-items.js b/doc/crossbeam/sync/seg_queue/sidebar-items.js new file mode 100644 index 00000000..bcacb2b8 --- /dev/null +++ b/doc/crossbeam/sync/seg_queue/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["SegQueue","A Michael-Scott queue that allocates \"segments\" (arrays of nodes) for efficiency."]]}); \ No newline at end of file diff --git a/doc/crossbeam/sync/seg_queue/struct.SegQueue.html b/doc/crossbeam/sync/seg_queue/struct.SegQueue.html new file mode 100644 index 00000000..5553e063 --- /dev/null +++ b/doc/crossbeam/sync/seg_queue/struct.SegQueue.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../crossbeam/sync/struct.SegQueue.html...

+ + + \ No newline at end of file diff --git a/doc/crossbeam/sync/sidebar-items.js b/doc/crossbeam/sync/sidebar-items.js new file mode 100644 index 00000000..fd10a3a3 --- /dev/null +++ b/doc/crossbeam/sync/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["chase_lev","A lock-free concurrent work-stealing deque"]],"struct":[["AtomicOption",""],["MsQueue","A Michael-Scott lock-free queue, with support for blocking `pop`s."],["SegQueue","A Michael-Scott queue that allocates \"segments\" (arrays of nodes) for efficiency."],["TreiberStack","Treiber's lock-free stack."]]}); \ No newline at end of file diff --git a/doc/crossbeam/sync/struct.AtomicOption.html b/doc/crossbeam/sync/struct.AtomicOption.html new file mode 100644 index 00000000..14d17db5 --- /dev/null +++ b/doc/crossbeam/sync/struct.AtomicOption.html @@ -0,0 +1,117 @@ + + + + + + + + + + crossbeam::sync::AtomicOption - Rust + + + + + + + + + + + + + + + + +
+

Struct crossbeam::sync::AtomicOption + + [] + + [src]

+
pub struct AtomicOption<T> {
+    // some fields omitted
+}

Methods

impl<T> AtomicOption<T>

fn new() -> AtomicOption<T>

+

fn swap_box(&self, t: Box<T>, order: Ordering) -> Option<Box<T>>

+

fn swap(&self, t: T, order: Ordering) -> Option<T>

+

fn take(&self, order: Ordering) -> Option<T>

+

Trait Implementations

impl<T: Send> Send for AtomicOption<T>

impl<T: Send> Sync for AtomicOption<T>

+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/sync/struct.MsQueue.html b/doc/crossbeam/sync/struct.MsQueue.html new file mode 100644 index 00000000..bf6364c4 --- /dev/null +++ b/doc/crossbeam/sync/struct.MsQueue.html @@ -0,0 +1,130 @@ + + + + + + + + + + crossbeam::sync::MsQueue - Rust + + + + + + + + + + + + + + + + +
+

Struct crossbeam::sync::MsQueue + + [] + + [src]

+
pub struct MsQueue<T> {
+    // some fields omitted
+}

A Michael-Scott lock-free queue, with support for blocking pops.

+ +

Usable with any number of producers and consumers.

+

Methods

impl<T> MsQueue<T>

fn new() -> MsQueue<T>

+

Create a new, empty queue.

+

fn push(&self, t: T)

+

Add t to the back of the queue, possibly waking up threads +blocked on pop.

+

fn is_empty(&self) -> bool

+

Check if this queue is empty.

+

fn try_pop(&self) -> Option<T>

+

Attempt to dequeue from the front.

+ +

Returns None if the queue is observed to be empty.

+

fn pop(&self) -> T

+

Dequeue an element from the front of the queue, blocking if the queue is +empty.

+

Trait Implementations

impl<T: Send> Sync for MsQueue<T>

impl<T: Send> Send for MsQueue<T>

+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/sync/struct.SegQueue.html b/doc/crossbeam/sync/struct.SegQueue.html new file mode 100644 index 00000000..18de84ec --- /dev/null +++ b/doc/crossbeam/sync/struct.SegQueue.html @@ -0,0 +1,125 @@ + + + + + + + + + + crossbeam::sync::SegQueue - Rust + + + + + + + + + + + + + + + + +
+

Struct crossbeam::sync::SegQueue + + [] + + [src]

+
pub struct SegQueue<T> {
+    // some fields omitted
+}

A Michael-Scott queue that allocates "segments" (arrays of nodes) +for efficiency.

+ +

Usable with any number of producers and consumers.

+

Methods

impl<T> SegQueue<T>

fn new() -> SegQueue<T>

+

Create a new, empty queue.

+

fn push(&self, t: T)

+

Add t to the back of the queue.

+

fn try_pop(&self) -> Option<T>

+

Attempt to dequeue from the front.

+ +

Returns None if the queue is observed to be empty.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/sync/struct.TreiberStack.html b/doc/crossbeam/sync/struct.TreiberStack.html new file mode 100644 index 00000000..ee96b21f --- /dev/null +++ b/doc/crossbeam/sync/struct.TreiberStack.html @@ -0,0 +1,126 @@ + + + + + + + + + + crossbeam::sync::TreiberStack - Rust + + + + + + + + + + + + + + + + +
+

Struct crossbeam::sync::TreiberStack + + [] + + [src]

+
pub struct TreiberStack<T> {
+    // some fields omitted
+}

Treiber's lock-free stack.

+ +

Usable with any number of producers and consumers.

+

Methods

impl<T> TreiberStack<T>

fn new() -> TreiberStack<T>

+

Create a new, empty stack.

+

fn push(&self, t: T)

+

Push t on top of the stack.

+

fn pop(&self) -> Option<T>

+

Attempt to pop the top element of the stack.

+ +

Returns None if the stack is observed to be empty.

+

fn is_empty(&self) -> bool

+

Check if this queue is empty.

+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/crossbeam/sync/treiber_stack/index.html b/doc/crossbeam/sync/treiber_stack/index.html new file mode 100644 index 00000000..e69de29b diff --git a/doc/crossbeam/sync/treiber_stack/sidebar-items.js b/doc/crossbeam/sync/treiber_stack/sidebar-items.js new file mode 100644 index 00000000..24a16d01 --- /dev/null +++ b/doc/crossbeam/sync/treiber_stack/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["TreiberStack","Treiber's lock-free stack."]]}); \ No newline at end of file diff --git a/doc/crossbeam/sync/treiber_stack/struct.TreiberStack.html b/doc/crossbeam/sync/treiber_stack/struct.TreiberStack.html new file mode 100644 index 00000000..2373c4a3 --- /dev/null +++ b/doc/crossbeam/sync/treiber_stack/struct.TreiberStack.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../crossbeam/sync/struct.TreiberStack.html...

+ + + \ No newline at end of file diff --git a/doc/implementors/aho_corasick/trait.Automaton.js b/doc/implementors/aho_corasick/trait.Automaton.js new file mode 100644 index 00000000..343d2169 --- /dev/null +++ b/doc/implementors/aho_corasick/trait.Automaton.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['aho_corasick'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/aho_corasick/trait.Transitions.js b/doc/implementors/aho_corasick/trait.Transitions.js new file mode 100644 index 00000000..343d2169 --- /dev/null +++ b/doc/implementors/aho_corasick/trait.Transitions.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['aho_corasick'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/alloc/boxed/trait.FnBox.js b/doc/implementors/alloc/boxed/trait.FnBox.js new file mode 100644 index 00000000..eadb6556 --- /dev/null +++ b/doc/implementors/alloc/boxed/trait.FnBox.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['regex_syntax'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/bit_vec/trait.BitBlock.js b/doc/implementors/bit_vec/trait.BitBlock.js new file mode 100644 index 00000000..4c678990 --- /dev/null +++ b/doc/implementors/bit_vec/trait.BitBlock.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['bit_vec'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/byteorder/trait.ByteOrder.js b/doc/implementors/byteorder/trait.ByteOrder.js new file mode 100644 index 00000000..24602e10 --- /dev/null +++ b/doc/implementors/byteorder/trait.ByteOrder.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['byteorder'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/collections/borrow/trait.IntoCow.js b/doc/implementors/collections/borrow/trait.IntoCow.js new file mode 100644 index 00000000..eadb6556 --- /dev/null +++ b/doc/implementors/collections/borrow/trait.IntoCow.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['regex_syntax'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/collections/borrow/trait.ToOwned.js b/doc/implementors/collections/borrow/trait.ToOwned.js new file mode 100644 index 00000000..eadb6556 --- /dev/null +++ b/doc/implementors/collections/borrow/trait.ToOwned.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['regex_syntax'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/collections/range/trait.RangeArgument.js b/doc/implementors/collections/range/trait.RangeArgument.js new file mode 100644 index 00000000..eadb6556 --- /dev/null +++ b/doc/implementors/collections/range/trait.RangeArgument.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['regex_syntax'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/collections/slice/trait.SliceConcatExt.js b/doc/implementors/collections/slice/trait.SliceConcatExt.js new file mode 100644 index 00000000..eadb6556 --- /dev/null +++ b/doc/implementors/collections/slice/trait.SliceConcatExt.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['regex_syntax'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/collections/string/trait.ToString.js b/doc/implementors/collections/string/trait.ToString.js new file mode 100644 index 00000000..eadb6556 --- /dev/null +++ b/doc/implementors/collections/string/trait.ToString.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['regex_syntax'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/any/trait.Any.js b/doc/implementors/core/any/trait.Any.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/any/trait.Any.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/array/trait.FixedSizeArray.js b/doc/implementors/core/array/trait.FixedSizeArray.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/array/trait.FixedSizeArray.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/borrow/trait.Borrow.js b/doc/implementors/core/borrow/trait.Borrow.js new file mode 100644 index 00000000..2843e366 --- /dev/null +++ b/doc/implementors/core/borrow/trait.Borrow.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<'a, B> Borrow<B> for Cow<'a, B> where B: ToOwned + ?Sized, B::Owned: 'a","impl<T> Borrow<[T]> for Vec<T>","impl Borrow<str> for String","impl<T> Borrow<T> for Box<T> where T: ?Sized",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/borrow/trait.BorrowMut.js b/doc/implementors/core/borrow/trait.BorrowMut.js new file mode 100644 index 00000000..3f315aae --- /dev/null +++ b/doc/implementors/core/borrow/trait.BorrowMut.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<T> BorrowMut<[T]> for Vec<T>","impl<T> BorrowMut<T> for Box<T> where T: ?Sized",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/clone/trait.Clone.js b/doc/implementors/core/clone/trait.Clone.js new file mode 100644 index 00000000..4e0be4c0 --- /dev/null +++ b/doc/implementors/core/clone/trait.Clone.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['crossbeam'] = ["impl<'a, T> Clone for Shared<'a, T>","impl<T> Clone for Stealer<T>",];implementors['ansi_term'] = ["impl<'a> Clone for ANSIString<'a>","impl Clone for Colour","impl Clone for Style",];implementors['utf8_ranges'] = ["impl Clone for Utf8Sequence","impl Clone for Utf8Range",];implementors['libc'] = ["impl Clone for pthread_attr_t","impl Clone for glob_t","impl Clone for sockaddr_storage","impl Clone for addrinfo","impl Clone for mach_timebase_info","impl Clone for stat","impl Clone for dirent","impl Clone for pthread_mutex_t","impl Clone for pthread_mutexattr_t","impl Clone for pthread_cond_t","impl Clone for pthread_rwlock_t","impl Clone for siginfo_t","impl Clone for sigaction","impl Clone for stack_t","impl Clone for fstore_t","impl Clone for radvisory","impl Clone for statvfs","impl Clone for Dl_info","impl Clone for sockaddr_in","impl Clone for statfs","impl Clone for kevent","impl Clone for kevent64_s","impl Clone for dqblk","impl Clone for termios","impl Clone for flock","impl Clone for sf_hdtr","impl Clone for sockaddr","impl Clone for sockaddr_in6","impl Clone for sockaddr_un","impl Clone for passwd","impl Clone for ifaddrs","impl Clone for fd_set","impl Clone for tm","impl Clone for utsname","impl Clone for msghdr","impl Clone for fsid_t","impl Clone for utimbuf","impl Clone for timeval","impl Clone for timespec","impl Clone for rlimit","impl Clone for rusage","impl Clone for in_addr","impl Clone for in6_addr","impl Clone for ip_mreq","impl Clone for ipv6_mreq","impl Clone for hostent","impl Clone for iovec","impl Clone for pollfd",];implementors['vec_map'] = ["impl<V: Clone> Clone for VecMap<V>","impl<'a, V> Clone for Iter<'a, V>","impl<'a, V> Clone for Keys<'a, V>","impl<'a, V> Clone for Values<'a, V>",];implementors['regex_syntax'] = ["impl Clone for Expr","impl Clone for Repeater","impl Clone for CharClass","impl Clone for ClassRange","impl Clone for ExprBuilder","impl<T> Clone for BinaryHeap<T> where T: Clone","impl<'a, T> Clone for Iter<'a, T>","impl<'a, K, V, Type> Clone for NodeRef<Immut<'a>, K, V, Type> where K: 'a, V: 'a","impl<Node, Type> Clone for Handle<Node, Type> where Node: Copy","impl<K, V> Clone for BTreeMap<K, V> where V: Clone, K: Clone","impl<'a, K, V> Clone for Iter<'a, K, V>","impl<'a, K, V> Clone for Keys<'a, K, V>","impl<'a, K, V> Clone for Values<'a, K, V>","impl<'a, K, V> Clone for Range<'a, K, V>","impl<T> Clone for BTreeSet<T> where T: Clone","impl<'a, T> Clone for Iter<'a, T>","impl<'a, T> Clone for Range<'a, T>","impl<'a, T> Clone for Difference<'a, T>","impl<'a, T> Clone for SymmetricDifference<'a, T>","impl<'a, T> Clone for Intersection<'a, T>","impl<'a, T> Clone for Union<'a, T>","impl<'a, B> Clone for Cow<'a, B> where B: ToOwned + ?Sized","impl<E> Clone for EnumSet<E>","impl<E> Clone for Iter<E>","impl<'a, T> Clone for Iter<'a, T>","impl<T> Clone for IntoIter<T> where T: Clone","impl<T> Clone for Rawlink<T>","impl<A> Clone for LinkedList<A> where A: Clone","impl<'a> Clone for EncodeUtf16<'a>","impl Clone for String","impl Clone for ParseError","impl<T> Clone for Vec<T> where T: Clone","impl<T> Clone for IntoIter<T> where T: Clone","impl<T> Clone for VecDeque<T> where T: Clone","impl<'a, T> Clone for Iter<'a, T>","impl<T> Clone for IntoIter<T> where T: Clone","impl<T> Clone for Bound<T> where T: Clone","impl Clone for ExchangeHeapSingleton","impl<T> Clone for Box<T> where T: Clone","impl Clone for Box<str>","impl<T> Clone for Box<[T]> where T: Clone","impl Clone for Error","impl Clone for ErrorKind",];implementors['aho_corasick'] = ["impl Clone for Match","impl<P: Clone> Clone for FullAcAutomaton<P>","impl<P: Clone, T: Clone> Clone for AcAutomaton<P, T>","impl Clone for Dense","impl Clone for Sparse",];implementors['bit_vec'] = ["impl<B: BitBlock> Clone for BitVec<B>","impl<'a, B: Clone + 'a> Clone for Iter<'a, B>","impl<'a, B: Clone + 'a> Clone for Blocks<'a, B>",];implementors['regex'] = ["impl Clone for Char","impl Clone for Exec","impl Clone for InputAt","impl<'t> Clone for CharInput<'t>","impl Clone for Literals","impl Clone for Program","impl Clone for Inst","impl Clone for EmptyLook","impl Clone for InstRanges","impl Clone for Regex","impl Clone for RegexSet","impl Clone for SetMatches","impl<'a> Clone for SetMatchesIter<'a>",];implementors['clap'] = ["impl Clone for AppSettings","impl Clone for ClapErrorType",];implementors['oxipng'] = ["impl Clone for ColorType","impl Clone for BitDepth","impl Clone for Headers","impl<'a> Clone for ScanLines<'a>","impl Clone for ScanLine","impl Clone for PngData","impl Clone for IhdrData","impl Clone for Options",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/cmp/trait.Eq.js b/doc/implementors/core/cmp/trait.Eq.js new file mode 100644 index 00000000..d3dd3ea6 --- /dev/null +++ b/doc/implementors/core/cmp/trait.Eq.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['crossbeam'] = ["impl<'a, T: Eq + 'a> Eq for Shared<'a, T>","impl<T: Eq> Eq for Steal<T>",];implementors['utf8_ranges'] = ["impl Eq for Utf8Sequence","impl Eq for Utf8Range",];implementors['libc'] = [];implementors['regex_syntax'] = ["impl Eq for Expr","impl Eq for Repeater","impl Eq for CharClass","impl Eq for ClassRange","impl<K, V> Eq for BTreeMap<K, V> where K: Eq, V: Eq","impl<T> Eq for BTreeSet<T> where T: Eq","impl<'a, B> Eq for Cow<'a, B> where B: Eq + ToOwned + ?Sized","impl<E> Eq for EnumSet<E> where E: Eq","impl<A> Eq for LinkedList<A> where A: Eq","impl Eq for String","impl Eq for ParseError","impl<T> Eq for Vec<T> where T: Eq","impl<A> Eq for VecDeque<A> where A: Eq","impl<T> Eq for Bound<T> where T: Eq","impl<T> Eq for Box<T> where T: Eq + ?Sized",];implementors['aho_corasick'] = ["impl Eq for Match",];implementors['bit_vec'] = ["impl<B: BitBlock> Eq for BitVec<B>",];implementors['regex'] = ["impl Eq for Char","impl Eq for EmptyLook","impl Eq for Regex",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/cmp/trait.Ord.js b/doc/implementors/core/cmp/trait.Ord.js new file mode 100644 index 00000000..74f70a52 --- /dev/null +++ b/doc/implementors/core/cmp/trait.Ord.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl Ord for ClassRange","impl<K, V> Ord for BTreeMap<K, V> where K: Ord, V: Ord","impl<T> Ord for BTreeSet<T> where T: Ord","impl<'a, B> Ord for Cow<'a, B> where B: Ord + ToOwned + ?Sized","impl<E> Ord for EnumSet<E> where E: Ord","impl<A> Ord for LinkedList<A> where A: Ord","impl Ord for String","impl<T> Ord for Vec<T> where T: Ord","impl<A> Ord for VecDeque<A> where A: Ord","impl<T> Ord for Box<T> where T: Ord + ?Sized",];implementors['bit_vec'] = ["impl<B: BitBlock> Ord for BitVec<B>",];implementors['regex'] = ["impl Ord for Char",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/cmp/trait.PartialEq.js b/doc/implementors/core/cmp/trait.PartialEq.js new file mode 100644 index 00000000..a8102920 --- /dev/null +++ b/doc/implementors/core/cmp/trait.PartialEq.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['crossbeam'] = ["impl<'a, T: PartialEq + 'a> PartialEq for Shared<'a, T>","impl<T: PartialEq> PartialEq for Steal<T>",];implementors['strsim'] = ["impl PartialEq for StrSimError",];implementors['ansi_term'] = ["impl<'a> PartialEq for ANSIString<'a>","impl PartialEq for Colour","impl PartialEq for Style",];implementors['utf8_ranges'] = ["impl PartialEq for Utf8Sequence","impl PartialEq for Utf8Range",];implementors['libc'] = [];implementors['regex_syntax'] = ["impl PartialEq for Expr","impl PartialEq for Repeater","impl PartialEq for CharClass","impl PartialEq for ClassRange","impl<BorrowType, K, V, NodeType, HandleType> PartialEq<Handle<NodeRef<BorrowType, K, V, NodeType>, HandleType>> for Handle<NodeRef<BorrowType, K, V, NodeType>, HandleType>","impl<K, V> PartialEq<BTreeMap<K, V>> for BTreeMap<K, V> where V: PartialEq<V>, K: PartialEq<K>","impl<T> PartialEq<BTreeSet<T>> for BTreeSet<T> where T: PartialEq<T>","impl<'a, 'b, B, C> PartialEq<Cow<'b, C>> for Cow<'a, B> where B: PartialEq<C> + ToOwned + ?Sized, C: ToOwned + ?Sized","impl<E> PartialEq<EnumSet<E>> for EnumSet<E> where E: PartialEq<E>","impl<A> PartialEq<LinkedList<A>> for LinkedList<A> where A: PartialEq<A>","impl PartialEq<String> for String","impl<'a, 'b> PartialEq<str> for String","impl<'a, 'b> PartialEq<String> for str","impl<'a, 'b> PartialEq<&'a str> for String","impl<'a, 'b> PartialEq<String> for &'a str","impl<'a, 'b> PartialEq<str> for Cow<'a, str>","impl<'a, 'b> PartialEq<Cow<'a, str>> for str","impl<'a, 'b> PartialEq<&'b str> for Cow<'a, str>","impl<'a, 'b> PartialEq<Cow<'a, str>> for &'b str","impl<'a, 'b> PartialEq<String> for Cow<'a, str>","impl<'a, 'b> PartialEq<Cow<'a, str>> for String","impl PartialEq<ParseError> for ParseError","impl<'a, 'b, A, B> PartialEq<Vec<B>> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b mut [B]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B]> for Cow<'a, [A]> where A: Clone + PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b mut [B]> for Cow<'a, [A]> where A: Clone + PartialEq<B>","impl<'a, 'b, A, B> PartialEq<Vec<B>> for Cow<'a, [A]> where A: Clone + PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 0]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 0]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 1]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 1]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 2]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 2]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 3]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 3]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 4]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 4]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 5]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 5]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 6]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 6]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 7]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 7]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 8]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 8]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 9]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 9]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 10]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 10]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 11]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 11]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 12]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 12]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 13]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 13]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 14]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 14]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 15]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 15]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 16]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 16]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 17]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 17]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 18]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 18]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 19]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 19]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 20]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 20]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 21]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 21]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 22]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 22]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 23]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 23]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 24]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 24]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 25]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 25]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 26]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 26]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 27]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 27]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 28]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 28]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 29]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 29]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 30]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 30]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 31]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 31]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<[B; 32]> for Vec<A> where A: PartialEq<B>","impl<'a, 'b, A, B> PartialEq<&'b [B; 32]> for Vec<A> where A: PartialEq<B>","impl<A> PartialEq<VecDeque<A>> for VecDeque<A> where A: PartialEq<A>","impl<T> PartialEq<Bound<T>> for Bound<T> where T: PartialEq<T>","impl<T> PartialEq<Box<T>> for Box<T> where T: PartialEq<T> + ?Sized","impl PartialEq<char> for ClassRange","impl PartialEq<ClassRange> for char","impl PartialEq for Error","impl PartialEq for ErrorKind",];implementors['aho_corasick'] = ["impl PartialEq for Match",];implementors['bit_vec'] = ["impl<B: BitBlock> PartialEq for BitVec<B>",];implementors['regex'] = ["impl PartialEq for Char","impl PartialEq<char> for Char","impl PartialEq<Char> for char","impl PartialEq for EmptyLook","impl PartialEq for Regex",];implementors['clap'] = ["impl PartialEq for AppSettings","impl PartialEq for ClapErrorType",];implementors['oxipng'] = ["impl PartialEq for ColorType","impl PartialEq for BitDepth","impl PartialEq for Headers",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/cmp/trait.PartialOrd.js b/doc/implementors/core/cmp/trait.PartialOrd.js new file mode 100644 index 00000000..512af176 --- /dev/null +++ b/doc/implementors/core/cmp/trait.PartialOrd.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl PartialOrd for ClassRange","impl<K, V> PartialOrd<BTreeMap<K, V>> for BTreeMap<K, V> where V: PartialOrd<V>, K: PartialOrd<K>","impl<T> PartialOrd<BTreeSet<T>> for BTreeSet<T> where T: PartialOrd<T>","impl<'a, B> PartialOrd<Cow<'a, B>> for Cow<'a, B> where B: PartialOrd<B> + ToOwned + ?Sized","impl<E> PartialOrd<EnumSet<E>> for EnumSet<E> where E: PartialOrd<E>","impl<A> PartialOrd<LinkedList<A>> for LinkedList<A> where A: PartialOrd<A>","impl PartialOrd<String> for String","impl<T> PartialOrd<Vec<T>> for Vec<T> where T: PartialOrd<T>","impl<A> PartialOrd<VecDeque<A>> for VecDeque<A> where A: PartialOrd<A>","impl<T> PartialOrd<Box<T>> for Box<T> where T: PartialOrd<T> + ?Sized","impl PartialOrd<char> for ClassRange","impl PartialOrd<ClassRange> for char",];implementors['bit_vec'] = ["impl<B: BitBlock> PartialOrd for BitVec<B>",];implementors['regex'] = ["impl PartialOrd for Char","impl PartialOrd<char> for Char","impl PartialOrd<Char> for char",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/convert/trait.AsMut.js b/doc/implementors/core/convert/trait.AsMut.js new file mode 100644 index 00000000..cf78dc82 --- /dev/null +++ b/doc/implementors/core/convert/trait.AsMut.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<T> AsMut<Vec<T>> for Vec<T>","impl<T> AsMut<[T]> for Vec<T>","impl<T> AsMut<T> for Box<T> where T: ?Sized",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/convert/trait.AsRef.js b/doc/implementors/core/convert/trait.AsRef.js new file mode 100644 index 00000000..c03b7f3a --- /dev/null +++ b/doc/implementors/core/convert/trait.AsRef.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<'a, T> AsRef<T> for Cow<'a, T> where T: ToOwned + ?Sized","impl AsRef<str> for String","impl AsRef<[u8]> for String","impl<T> AsRef<Vec<T>> for Vec<T>","impl<T> AsRef<[T]> for Vec<T>","impl<T> AsRef<T> for Box<T> where T: ?Sized",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/convert/trait.From.js b/doc/implementors/core/convert/trait.From.js new file mode 100644 index 00000000..e6ac88d3 --- /dev/null +++ b/doc/implementors/core/convert/trait.From.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['byteorder'] = ["impl From<Error> for Error","impl From<Error> for Error",];implementors['ansi_term'] = ["impl<'a, S> From<S> for ANSIString<'a> where S: Into<Cow<'a, str>>",];implementors['libc'] = [];implementors['regex_syntax'] = ["impl<T> From<Vec<T>> for BinaryHeap<T> where T: Ord","impl<T> From<BinaryHeap<T>> for Vec<T>","impl<'a, T> From<&'a mut Option<Box<Node<T>>>> for Rawlink<Node<T>>","impl<'a> From<&'a str> for String","impl<'a> From<&'a str> for Cow<'a, str>","impl<'a> From<String> for Cow<'a, str>","impl<'a, T> From<&'a [T]> for Vec<T> where T: Clone","impl<'a> From<&'a str> for Vec<u8>","impl<'a, T> From<&'a [T]> for Cow<'a, [T]> where T: Clone","impl<'a, T> From<Vec<T>> for Cow<'a, [T]> where T: Clone","impl<T> From<T> for Box<T>",];implementors['regex'] = ["impl From<char> for Char","impl From<Option<char>> for Char","impl From<Error> for Error",];implementors['clap'] = ["impl<'n, 'l, 'h, 'g, 'p, 'r, 'z> From<&'z Arg<'n, 'l, 'h, 'g, 'p, 'r>> for Arg<'n, 'l, 'h, 'g, 'p, 'r>","impl From<Error> for ClapError","impl From<Error> for ClapError",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/convert/trait.Into.js b/doc/implementors/core/convert/trait.Into.js new file mode 100644 index 00000000..42faa7bb --- /dev/null +++ b/doc/implementors/core/convert/trait.Into.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl Into<Vec<u8>> for String",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/default/trait.Default.js b/doc/implementors/core/default/trait.Default.js new file mode 100644 index 00000000..3fdbdcb9 --- /dev/null +++ b/doc/implementors/core/default/trait.Default.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['ansi_term'] = ["impl Default for Style",];implementors['libc'] = [];implementors['vec_map'] = ["impl<V> Default for VecMap<V>",];implementors['regex_syntax'] = ["impl<T> Default for BinaryHeap<T> where T: Ord","impl<K, V> Default for BTreeMap<K, V> where K: Ord","impl<T> Default for BTreeSet<T> where T: Ord","impl<T> Default for LinkedList<T>","impl Default for String","impl<T> Default for Vec<T>","impl<T> Default for VecDeque<T>","impl<T> Default for Box<T> where T: Default","impl<T> Default for Box<[T]>",];implementors['bit_vec'] = ["impl<B: BitBlock> Default for BitVec<B>",];implementors['clap'] = ["impl<'n, 'l, 'h, 'g, 'p, 'r> Default for Arg<'n, 'l, 'h, 'g, 'p, 'r>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/fmt/trait.Binary.js b/doc/implementors/core/fmt/trait.Binary.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/fmt/trait.Binary.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/fmt/trait.Debug.js b/doc/implementors/core/fmt/trait.Debug.js new file mode 100644 index 00000000..0c76e9c8 --- /dev/null +++ b/doc/implementors/core/fmt/trait.Debug.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['crossbeam'] = ["impl<T: Debug> Debug for Steal<T>",];implementors['strsim'] = ["impl Debug for StrSimError",];implementors['byteorder'] = ["impl Debug for Error",];implementors['ansi_term'] = ["impl<'a> Debug for ANSIString<'a>","impl Debug for Colour","impl Debug for Style",];implementors['utf8_ranges'] = ["impl Debug for Utf8Sequence","impl Debug for Utf8Range",];implementors['libc'] = [];implementors['vec_map'] = ["impl<V: Debug> Debug for VecMap<V>",];implementors['regex_syntax'] = ["impl Debug for Expr","impl Debug for Repeater","impl Debug for CharClass","impl Debug for ClassRange","impl Debug for ExprBuilder","impl<T> Debug for BinaryHeap<T> where T: Ord + Debug","impl<K, V> Debug for BTreeMap<K, V> where K: Debug, V: Debug","impl<T> Debug for BTreeSet<T> where T: Debug","impl<'a, B> Debug for Cow<'a, B> where B: Debug + ToOwned + ?Sized, B::Owned: Debug","impl<E> Debug for EnumSet<E> where E: CLike + Debug","impl<A> Debug for LinkedList<A> where A: Debug","impl Debug for FromUtf8Error","impl Debug for FromUtf16Error","impl Debug for String","impl Debug for ParseError","impl<T> Debug for Vec<T> where T: Debug","impl<T> Debug for VecDeque<T> where T: Debug","impl<T> Debug for Bound<T> where T: Debug","impl<T> Debug for Box<T> where T: Debug + ?Sized","impl Debug for Error","impl Debug for ErrorKind",];implementors['aho_corasick'] = ["impl Debug for Match","impl<'a, 's, P: Debug, A: Debug + 'a + Automaton<P> + ?Sized> Debug for Matches<'a, 's, P, A>","impl<'a, R: Debug, P: Debug, A: Debug + 'a + Automaton<P> + ?Sized> Debug for StreamMatches<'a, R, P, A>","impl<'a, 's, P: Debug, A: Debug + 'a + Automaton<P> + ?Sized> Debug for MatchesOverlapping<'a, 's, P, A>","impl<'a, R: Debug, P: Debug, A: Debug + 'a + Automaton<P> + ?Sized> Debug for StreamMatchesOverlapping<'a, R, P, A>","impl<P: AsRef<[u8]> + Debug> Debug for FullAcAutomaton<P>","impl Debug for Dense","impl Debug for Sparse","impl<P: AsRef<[u8]> + Debug, T: Transitions> Debug for AcAutomaton<P, T>",];implementors['bit_vec'] = ["impl<B: BitBlock> Debug for BitVec<B>",];implementors['regex'] = ["impl Debug for Char","impl Debug for Exec","impl Debug for InputAt","impl<'t> Debug for CharInput<'t>","impl Debug for Literals","impl Debug for Program","impl Debug for Inst","impl Debug for EmptyLook","impl Debug for InstRanges","impl Debug for Error","impl Debug for Regex","impl Debug for RegexSet","impl Debug for SetMatches",];implementors['clap'] = ["impl Debug for AppSettings","impl<'n, 'a> Debug for ArgMatches<'n, 'a>","impl<'n, 'a> Debug for SubCommand<'n, 'a>","impl<'n, 'ar> Debug for ArgGroup<'n, 'ar>","impl<T: Debug> Debug for Format<T>","impl Debug for ClapErrorType","impl Debug for ClapError",];implementors['oxipng'] = ["impl Debug for ColorType","impl Debug for BitDepth","impl Debug for Headers","impl<'a> Debug for ScanLines<'a>","impl Debug for ScanLine","impl Debug for PngData","impl Debug for IhdrData","impl Debug for Options",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/fmt/trait.Display.js b/doc/implementors/core/fmt/trait.Display.js new file mode 100644 index 00000000..2507d799 --- /dev/null +++ b/doc/implementors/core/fmt/trait.Display.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['byteorder'] = ["impl Display for Error",];implementors['ansi_term'] = ["impl<'a> Display for ANSIString<'a>","impl<'a> Display for ANSIStrings<'a>",];implementors['libc'] = [];implementors['regex_syntax'] = ["impl<'a, B> Display for Cow<'a, B> where B: Display + ToOwned + ?Sized, B::Owned: Display","impl Display for FromUtf8Error","impl Display for FromUtf16Error","impl Display for String","impl Display for ParseError","impl<T> Display for Box<T> where T: Display + ?Sized","impl Display for Expr","impl Display for Repeater","impl Display for CharClass","impl Display for ClassRange","impl Display for Error","impl Display for ErrorKind",];implementors['regex'] = ["impl Display for Error","impl Display for Regex",];implementors['clap'] = ["impl<T: AsRef<str>> Display for Format<T>","impl Display for ClapError",];implementors['oxipng'] = ["impl Display for ColorType","impl Display for BitDepth",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/fmt/trait.LowerExp.js b/doc/implementors/core/fmt/trait.LowerExp.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/fmt/trait.LowerExp.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/fmt/trait.LowerHex.js b/doc/implementors/core/fmt/trait.LowerHex.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/fmt/trait.LowerHex.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/fmt/trait.Octal.js b/doc/implementors/core/fmt/trait.Octal.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/fmt/trait.Octal.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/fmt/trait.Pointer.js b/doc/implementors/core/fmt/trait.Pointer.js new file mode 100644 index 00000000..37dc19e2 --- /dev/null +++ b/doc/implementors/core/fmt/trait.Pointer.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<T> Pointer for Box<T> where T: ?Sized",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/fmt/trait.UpperExp.js b/doc/implementors/core/fmt/trait.UpperExp.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/fmt/trait.UpperExp.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/fmt/trait.UpperHex.js b/doc/implementors/core/fmt/trait.UpperHex.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/fmt/trait.UpperHex.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/fmt/trait.Write.js b/doc/implementors/core/fmt/trait.Write.js new file mode 100644 index 00000000..db580950 --- /dev/null +++ b/doc/implementors/core/fmt/trait.Write.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl Write for String",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/hash/trait.BuildHasher.js b/doc/implementors/core/hash/trait.BuildHasher.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/hash/trait.BuildHasher.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/hash/trait.Hash.js b/doc/implementors/core/hash/trait.Hash.js new file mode 100644 index 00000000..ed985940 --- /dev/null +++ b/doc/implementors/core/hash/trait.Hash.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['vec_map'] = ["impl<V: Hash> Hash for VecMap<V>",];implementors['regex_syntax'] = ["impl<K, V> Hash for BTreeMap<K, V> where K: Hash, V: Hash","impl<T> Hash for BTreeSet<T> where T: Hash","impl<'a, B> Hash for Cow<'a, B> where B: Hash + ToOwned + ?Sized","impl<E> Hash for EnumSet<E> where E: Hash","impl<A> Hash for LinkedList<A> where A: Hash","impl Hash for String","impl<T> Hash for Vec<T> where T: Hash","impl<A> Hash for VecDeque<A> where A: Hash","impl<T> Hash for Bound<T> where T: Hash","impl<T> Hash for Box<T> where T: Hash + ?Sized",];implementors['aho_corasick'] = ["impl Hash for Match",];implementors['bit_vec'] = ["impl<B: BitBlock> Hash for BitVec<B>",];implementors['regex'] = ["impl Hash for Char",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/hash/trait.Hasher.js b/doc/implementors/core/hash/trait.Hasher.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/hash/trait.Hasher.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/iter/trait.DoubleEndedIterator.js b/doc/implementors/core/iter/trait.DoubleEndedIterator.js new file mode 100644 index 00000000..51fd8c53 --- /dev/null +++ b/doc/implementors/core/iter/trait.DoubleEndedIterator.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['vec_map'] = ["impl<'a, V> DoubleEndedIterator for Iter<'a, V>","impl<'a, V> DoubleEndedIterator for IterMut<'a, V>","impl<'a, V> DoubleEndedIterator for Keys<'a, V>","impl<'a, V> DoubleEndedIterator for Values<'a, V>","impl<V> DoubleEndedIterator for IntoIter<V>",];implementors['regex_syntax'] = ["impl<'a, T> DoubleEndedIterator for Iter<'a, T>","impl<T> DoubleEndedIterator for IntoIter<T>","impl<'a, T> DoubleEndedIterator for Drain<'a, T> where T: 'a","impl<'a, K, V> DoubleEndedIterator for Iter<'a, K, V> where K: 'a, V: 'a","impl<'a, K, V> DoubleEndedIterator for IterMut<'a, K, V> where V: 'a, K: 'a","impl<K, V> DoubleEndedIterator for IntoIter<K, V>","impl<'a, K, V> DoubleEndedIterator for Keys<'a, K, V>","impl<'a, K, V> DoubleEndedIterator for Values<'a, K, V>","impl<'a, K, V> DoubleEndedIterator for Range<'a, K, V>","impl<'a, K, V> DoubleEndedIterator for RangeMut<'a, K, V>","impl<'a, T> DoubleEndedIterator for Iter<'a, T>","impl<T> DoubleEndedIterator for IntoIter<T>","impl<'a, T> DoubleEndedIterator for Range<'a, T>","impl<'a, A> DoubleEndedIterator for Iter<'a, A>","impl<'a, A> DoubleEndedIterator for IterMut<'a, A>","impl<A> DoubleEndedIterator for IntoIter<A>","impl<'a> DoubleEndedIterator for Drain<'a>","impl<T> DoubleEndedIterator for IntoIter<T>","impl<'a, T> DoubleEndedIterator for Drain<'a, T>","impl<'a, T> DoubleEndedIterator for Iter<'a, T>","impl<'a, T> DoubleEndedIterator for IterMut<'a, T>","impl<T> DoubleEndedIterator for IntoIter<T>","impl<'a, T> DoubleEndedIterator for Drain<'a, T> where T: 'a","impl<I> DoubleEndedIterator for Box<I> where I: DoubleEndedIterator + ?Sized",];implementors['bit_vec'] = ["impl<'a, B: BitBlock> DoubleEndedIterator for Iter<'a, B>","impl<B: BitBlock> DoubleEndedIterator for IntoIter<B>","impl<'a, B: BitBlock> DoubleEndedIterator for Blocks<'a, B>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/iter/trait.ExactSizeIterator.js b/doc/implementors/core/iter/trait.ExactSizeIterator.js new file mode 100644 index 00000000..a40fca14 --- /dev/null +++ b/doc/implementors/core/iter/trait.ExactSizeIterator.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<'a, T> ExactSizeIterator for Iter<'a, T>","impl<T> ExactSizeIterator for IntoIter<T>","impl<'a, T> ExactSizeIterator for Drain<'a, T> where T: 'a","impl<'a, K, V> ExactSizeIterator for Iter<'a, K, V> where K: 'a, V: 'a","impl<'a, K, V> ExactSizeIterator for IterMut<'a, K, V> where V: 'a, K: 'a","impl<K, V> ExactSizeIterator for IntoIter<K, V>","impl<'a, K, V> ExactSizeIterator for Keys<'a, K, V>","impl<'a, K, V> ExactSizeIterator for Values<'a, K, V>","impl<'a, T> ExactSizeIterator for Iter<'a, T>","impl<T> ExactSizeIterator for IntoIter<T>","impl<'a, A> ExactSizeIterator for Iter<'a, A>","impl<'a, A> ExactSizeIterator for IterMut<'a, A>","impl<A> ExactSizeIterator for IntoIter<A>","impl<T> ExactSizeIterator for IntoIter<T>","impl<'a, T> ExactSizeIterator for Drain<'a, T>","impl<'a, T> ExactSizeIterator for Iter<'a, T>","impl<'a, T> ExactSizeIterator for IterMut<'a, T>","impl<T> ExactSizeIterator for IntoIter<T>","impl<'a, T> ExactSizeIterator for Drain<'a, T> where T: 'a","impl<I> ExactSizeIterator for Box<I> where I: ExactSizeIterator + ?Sized",];implementors['bit_vec'] = ["impl<'a, B: BitBlock> ExactSizeIterator for Iter<'a, B>","impl<B: BitBlock> ExactSizeIterator for IntoIter<B>","impl<'a, B: BitBlock> ExactSizeIterator for Blocks<'a, B>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/iter/trait.Extend.js b/doc/implementors/core/iter/trait.Extend.js new file mode 100644 index 00000000..5c6e55c7 --- /dev/null +++ b/doc/implementors/core/iter/trait.Extend.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['vec_map'] = ["impl<V> Extend<(usize, V)> for VecMap<V>","impl<'a, V: Copy> Extend<(usize, &'a V)> for VecMap<V>",];implementors['regex_syntax'] = ["impl<T> Extend<T> for BinaryHeap<T> where T: Ord","impl<'a, T> Extend<&'a T> for BinaryHeap<T> where T: Copy + 'a + Ord","impl<K, V> Extend<(K, V)> for BTreeMap<K, V> where K: Ord","impl<'a, K, V> Extend<(&'a K, &'a V)> for BTreeMap<K, V> where V: Copy, K: Copy + Ord","impl<T> Extend<T> for BTreeSet<T> where T: Ord","impl<'a, T> Extend<&'a T> for BTreeSet<T> where T: Copy + 'a + Ord","impl<E> Extend<E> for EnumSet<E> where E: CLike","impl<'a, E> Extend<&'a E> for EnumSet<E> where E: Copy + 'a + CLike","impl<A> Extend<A> for LinkedList<A>","impl<'a, T> Extend<&'a T> for LinkedList<T> where T: Copy + 'a","impl Extend<char> for String","impl<'a> Extend<&'a char> for String","impl<'a> Extend<&'a str> for String","impl Extend<String> for String","impl<T> Extend<T> for Vec<T>","impl<'a, T> Extend<&'a T> for Vec<T> where T: Copy + 'a","impl<A> Extend<A> for VecDeque<A>","impl<'a, T> Extend<&'a T> for VecDeque<T> where T: Copy + 'a",];implementors['bit_vec'] = ["impl<B: BitBlock> Extend<bool> for BitVec<B>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/iter/trait.FromIterator.js b/doc/implementors/core/iter/trait.FromIterator.js new file mode 100644 index 00000000..d14bce01 --- /dev/null +++ b/doc/implementors/core/iter/trait.FromIterator.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['vec_map'] = ["impl<V> FromIterator<(usize, V)> for VecMap<V>",];implementors['regex_syntax'] = ["impl<T> FromIterator<T> for BinaryHeap<T> where T: Ord","impl<K, V> FromIterator<(K, V)> for BTreeMap<K, V> where K: Ord","impl<T> FromIterator<T> for BTreeSet<T> where T: Ord","impl<E> FromIterator<E> for EnumSet<E> where E: CLike","impl<A> FromIterator<A> for LinkedList<A>","impl FromIterator<char> for String","impl<'a> FromIterator<&'a str> for String","impl FromIterator<String> for String","impl<T> FromIterator<T> for Vec<T>","impl<'a, T> FromIterator<T> for Cow<'a, [T]> where T: Clone","impl<A> FromIterator<A> for VecDeque<A>",];implementors['aho_corasick'] = ["impl<S: AsRef<[u8]>> FromIterator<S> for AcAutomaton<S>",];implementors['bit_vec'] = ["impl<B: BitBlock> FromIterator<bool> for BitVec<B>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/iter/trait.IntoIterator.js b/doc/implementors/core/iter/trait.IntoIterator.js new file mode 100644 index 00000000..b0213713 --- /dev/null +++ b/doc/implementors/core/iter/trait.IntoIterator.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['utf8_ranges'] = ["impl<'a> IntoIterator for &'a Utf8Sequence",];implementors['libc'] = [];implementors['vec_map'] = ["impl<T> IntoIterator for VecMap<T>","impl<'a, T> IntoIterator for &'a VecMap<T>","impl<'a, T> IntoIterator for &'a mut VecMap<T>",];implementors['regex_syntax'] = ["impl<T> IntoIterator for BinaryHeap<T> where T: Ord","impl<'a, T> IntoIterator for &'a BinaryHeap<T> where T: Ord","impl<'a, K, V> IntoIterator for &'a BTreeMap<K, V> where K: 'a, V: 'a","impl<'a, K, V> IntoIterator for &'a mut BTreeMap<K, V> where V: 'a, K: 'a","impl<K, V> IntoIterator for BTreeMap<K, V>","impl<T> IntoIterator for BTreeSet<T>","impl<'a, T> IntoIterator for &'a BTreeSet<T>","impl<'a, E> IntoIterator for &'a EnumSet<E> where E: CLike","impl<T> IntoIterator for LinkedList<T>","impl<'a, T> IntoIterator for &'a LinkedList<T>","impl<'a, T> IntoIterator for &'a mut LinkedList<T>","impl<T> IntoIterator for Vec<T>","impl<'a, T> IntoIterator for &'a Vec<T>","impl<'a, T> IntoIterator for &'a mut Vec<T>","impl<T> IntoIterator for VecDeque<T>","impl<'a, T> IntoIterator for &'a VecDeque<T>","impl<'a, T> IntoIterator for &'a mut VecDeque<T>","impl IntoIterator for CharClass","impl<'a> IntoIterator for &'a CharClass",];implementors['bit_vec'] = ["impl<'a, B: BitBlock> IntoIterator for &'a BitVec<B>","impl<B: BitBlock> IntoIterator for BitVec<B>",];implementors['regex'] = ["impl<'a> IntoIterator for &'a Program","impl IntoIterator for SetMatches","impl<'a> IntoIterator for &'a SetMatches","impl<'a> IntoIterator for &'a SparseSet",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/iter/trait.Iterator.js b/doc/implementors/core/iter/trait.Iterator.js new file mode 100644 index 00000000..d23c69a3 --- /dev/null +++ b/doc/implementors/core/iter/trait.Iterator.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['utf8_ranges'] = ["impl Iterator for Utf8Sequences",];implementors['libc'] = [];implementors['vec_map'] = ["impl<'a, V> Iterator for Iter<'a, V>","impl<'a, V> Iterator for IterMut<'a, V>","impl<'a, V> Iterator for Keys<'a, V>","impl<'a, V> Iterator for Values<'a, V>","impl<V> Iterator for IntoIter<V>",];implementors['regex_syntax'] = ["impl<'a, T> Iterator for Iter<'a, T>","impl<T> Iterator for IntoIter<T>","impl<'a, T> Iterator for Drain<'a, T> where T: 'a","impl<'a, K, V> Iterator for Iter<'a, K, V> where K: 'a, V: 'a","impl<'a, K, V> Iterator for IterMut<'a, K, V> where V: 'a, K: 'a","impl<K, V> Iterator for IntoIter<K, V>","impl<'a, K, V> Iterator for Keys<'a, K, V>","impl<'a, K, V> Iterator for Values<'a, K, V>","impl<'a, K, V> Iterator for Range<'a, K, V>","impl<'a, K, V> Iterator for RangeMut<'a, K, V>","impl<'a, T> Iterator for Iter<'a, T>","impl<T> Iterator for IntoIter<T>","impl<'a, T> Iterator for Range<'a, T>","impl<'a, T> Iterator for Difference<'a, T> where T: Ord","impl<'a, T> Iterator for SymmetricDifference<'a, T> where T: Ord","impl<'a, T> Iterator for Intersection<'a, T> where T: Ord","impl<'a, T> Iterator for Union<'a, T> where T: Ord","impl<E> Iterator for Iter<E> where E: CLike","impl<'a, A> Iterator for Iter<'a, A>","impl<'a, A> Iterator for IterMut<'a, A>","impl<A> Iterator for IntoIter<A>","impl<'a> Iterator for EncodeUtf16<'a>","impl<'a> Iterator for Drain<'a>","impl<T> Iterator for IntoIter<T>","impl<'a, T> Iterator for Drain<'a, T>","impl<'a, T> Iterator for Iter<'a, T>","impl<'a, T> Iterator for IterMut<'a, T>","impl<T> Iterator for IntoIter<T>","impl<'a, T> Iterator for Drain<'a, T> where T: 'a","impl<I> Iterator for Box<I> where I: Iterator + ?Sized",];implementors['aho_corasick'] = ["impl<'a, 's, P, A: Automaton<P> + ?Sized> Iterator for Matches<'a, 's, P, A>","impl<'a, R: Read, P, A: Automaton<P>> Iterator for StreamMatches<'a, R, P, A>","impl<'a, 's, P, A: Automaton<P> + ?Sized> Iterator for MatchesOverlapping<'a, 's, P, A>","impl<'a, R: Read, P, A: Automaton<P> + ?Sized> Iterator for StreamMatchesOverlapping<'a, R, P, A>",];implementors['bit_vec'] = ["impl<'a, B: BitBlock> Iterator for Iter<'a, B>","impl<B: BitBlock> Iterator for IntoIter<B>","impl<'a, B: BitBlock> Iterator for Blocks<'a, B>",];implementors['regex'] = ["impl<'r> Iterator for CaptureNames<'r>","impl<'r, 't> Iterator for RegexSplits<'r, 't>","impl<'r, 't> Iterator for RegexSplitsN<'r, 't>","impl<'c> Iterator for SubCaptures<'c>","impl<'c> Iterator for SubCapturesPos<'c>","impl<'c> Iterator for SubCapturesNamed<'c>","impl<'r, 't> Iterator for FindCaptures<'r, 't>","impl<'r, 't> Iterator for FindMatches<'r, 't>","impl Iterator for SetMatchesIntoIter","impl<'a> Iterator for SetMatchesIter<'a>",];implementors['oxipng'] = ["impl<'a> Iterator for ScanLines<'a>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/iter/trait.Step.js b/doc/implementors/core/iter/trait.Step.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/iter/trait.Step.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/marker/trait.Copy.js b/doc/implementors/core/marker/trait.Copy.js new file mode 100644 index 00000000..03a60d8e --- /dev/null +++ b/doc/implementors/core/marker/trait.Copy.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['crossbeam'] = ["impl<'a, T> Copy for Shared<'a, T>",];implementors['ansi_term'] = ["impl Copy for Colour","impl Copy for Style",];implementors['utf8_ranges'] = ["impl Copy for Utf8Sequence","impl Copy for Utf8Range",];implementors['libc'] = ["impl Copy for pthread_attr_t","impl Copy for glob_t","impl Copy for sockaddr_storage","impl Copy for addrinfo","impl Copy for mach_timebase_info","impl Copy for stat","impl Copy for dirent","impl Copy for pthread_mutex_t","impl Copy for pthread_mutexattr_t","impl Copy for pthread_cond_t","impl Copy for pthread_rwlock_t","impl Copy for siginfo_t","impl Copy for sigaction","impl Copy for stack_t","impl Copy for fstore_t","impl Copy for radvisory","impl Copy for statvfs","impl Copy for Dl_info","impl Copy for sockaddr_in","impl Copy for statfs","impl Copy for kevent","impl Copy for kevent64_s","impl Copy for dqblk","impl Copy for termios","impl Copy for flock","impl Copy for sf_hdtr","impl Copy for sockaddr","impl Copy for sockaddr_in6","impl Copy for sockaddr_un","impl Copy for passwd","impl Copy for ifaddrs","impl Copy for fd_set","impl Copy for tm","impl Copy for utsname","impl Copy for msghdr","impl Copy for fsid_t","impl Copy for utimbuf","impl Copy for timeval","impl Copy for timespec","impl Copy for rlimit","impl Copy for rusage","impl Copy for in_addr","impl Copy for in6_addr","impl Copy for ip_mreq","impl Copy for ipv6_mreq","impl Copy for hostent","impl Copy for iovec","impl Copy for pollfd",];implementors['regex_syntax'] = ["impl Copy for Repeater","impl Copy for ClassRange","impl<'a, K, V, Type> Copy for NodeRef<Immut<'a>, K, V, Type> where V: 'a, K: 'a","impl<Node, Type> Copy for Handle<Node, Type> where Node: Copy","impl<E> Copy for EnumSet<E>","impl<T> Copy for Rawlink<T>","impl Copy for ParseError","impl<T> Copy for Bound<T> where T: Copy","impl Copy for ExchangeHeapSingleton",];implementors['aho_corasick'] = ["impl Copy for Match",];implementors['regex'] = ["impl Copy for Char","impl Copy for InputAt","impl<'t> Copy for CharInput<'t>","impl Copy for EmptyLook",];implementors['clap'] = ["impl Copy for AppSettings","impl Copy for ClapErrorType",];implementors['oxipng'] = ["impl Copy for ColorType","impl Copy for BitDepth","impl Copy for IhdrData",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/marker/trait.Send.js b/doc/implementors/core/marker/trait.Send.js new file mode 100644 index 00000000..f19ad740 --- /dev/null +++ b/doc/implementors/core/marker/trait.Send.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['crossbeam'] = ["impl<T: Sync> Send for Atomic<T>","impl<T: Send> Send for CachePadded<T>","impl<T: Send> Send for AtomicOption<T>","impl<T: Send> Send for MsQueue<T>",];implementors['libc'] = [];implementors['regex_syntax'] = ["impl<K, V> Send for Root<K, V> where V: Send, K: Send","impl<'a, K, V, Type> Send for NodeRef<Immut<'a>, K, V, Type> where V: Sync + 'a, K: Sync + 'a","impl<'a, K, V, Type> Send for NodeRef<Mut<'a>, K, V, Type> where V: Send + 'a, K: Send + 'a","impl<K, V, Type> Send for NodeRef<Owned, K, V, Type> where K: Send, V: Send","impl<T> Send for Rawlink<T> where T: Send","impl<'a> Send for Drain<'a>","impl<T> Send for IntoIter<T> where T: Send","impl<'a, T> Send for Drain<'a, T> where T: Send","impl<'a, T> Send for Drain<'a, T> where T: Send",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/marker/trait.Sync.js b/doc/implementors/core/marker/trait.Sync.js new file mode 100644 index 00000000..3f7ca40a --- /dev/null +++ b/doc/implementors/core/marker/trait.Sync.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['crossbeam'] = ["impl<T: Sync> Sync for Atomic<T>","impl<T: Sync> Sync for CachePadded<T>","impl<T: Send> Sync for AtomicOption<T>","impl<T: Send> Sync for MsQueue<T>",];implementors['libc'] = [];implementors['regex_syntax'] = ["impl<K, V> Sync for Root<K, V> where V: Sync, K: Sync","impl<BorrowType, K, V, Type> Sync for NodeRef<BorrowType, K, V, Type> where K: Sync, V: Sync","impl<T> Sync for Rawlink<T> where T: Sync","impl<'a> Sync for Drain<'a>","impl<T> Sync for IntoIter<T> where T: Sync","impl<'a, T> Sync for Drain<'a, T> where T: Sync","impl<'a, T> Sync for Drain<'a, T> where T: Sync",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/nonzero/trait.Zeroable.js b/doc/implementors/core/nonzero/trait.Zeroable.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/nonzero/trait.Zeroable.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/num/trait.One.js b/doc/implementors/core/num/trait.One.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/num/trait.One.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/num/trait.Zero.js b/doc/implementors/core/num/trait.Zero.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/num/trait.Zero.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/num/wrapping/trait.OverflowingOps.js b/doc/implementors/core/num/wrapping/trait.OverflowingOps.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/num/wrapping/trait.OverflowingOps.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Add.js b/doc/implementors/core/ops/trait.Add.js new file mode 100644 index 00000000..80ce519b --- /dev/null +++ b/doc/implementors/core/ops/trait.Add.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<'a> Add<&'a str> for String",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.AddAssign.js b/doc/implementors/core/ops/trait.AddAssign.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.AddAssign.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.BitAnd.js b/doc/implementors/core/ops/trait.BitAnd.js new file mode 100644 index 00000000..6c7b34c2 --- /dev/null +++ b/doc/implementors/core/ops/trait.BitAnd.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<'a, 'b, T> BitAnd<&'b BTreeSet<T>> for &'a BTreeSet<T> where T: Ord + Clone","impl<E> BitAnd<EnumSet<E>> for EnumSet<E> where E: CLike",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.BitAndAssign.js b/doc/implementors/core/ops/trait.BitAndAssign.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.BitAndAssign.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.BitOr.js b/doc/implementors/core/ops/trait.BitOr.js new file mode 100644 index 00000000..78915ac4 --- /dev/null +++ b/doc/implementors/core/ops/trait.BitOr.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<'a, 'b, T> BitOr<&'b BTreeSet<T>> for &'a BTreeSet<T> where T: Ord + Clone","impl<E> BitOr<EnumSet<E>> for EnumSet<E> where E: CLike",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.BitOrAssign.js b/doc/implementors/core/ops/trait.BitOrAssign.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.BitOrAssign.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.BitXor.js b/doc/implementors/core/ops/trait.BitXor.js new file mode 100644 index 00000000..883421d0 --- /dev/null +++ b/doc/implementors/core/ops/trait.BitXor.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<'a, 'b, T> BitXor<&'b BTreeSet<T>> for &'a BTreeSet<T> where T: Ord + Clone","impl<E> BitXor<EnumSet<E>> for EnumSet<E> where E: CLike",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.BitXorAssign.js b/doc/implementors/core/ops/trait.BitXorAssign.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.BitXorAssign.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.BoxPlace.js b/doc/implementors/core/ops/trait.BoxPlace.js new file mode 100644 index 00000000..5784c6e1 --- /dev/null +++ b/doc/implementors/core/ops/trait.BoxPlace.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['regex_syntax'] = ["impl<T> BoxPlace<T> for IntermediateBox<T>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Boxed.js b/doc/implementors/core/ops/trait.Boxed.js new file mode 100644 index 00000000..2e4ab32d --- /dev/null +++ b/doc/implementors/core/ops/trait.Boxed.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['regex_syntax'] = ["impl<T> Boxed for Box<T>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.CoerceUnsized.js b/doc/implementors/core/ops/trait.CoerceUnsized.js new file mode 100644 index 00000000..5eb7f37c --- /dev/null +++ b/doc/implementors/core/ops/trait.CoerceUnsized.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<T, U> CoerceUnsized<Box<U>> for Box<T> where T: Unsize<U> + ?Sized, U: ?Sized",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Deref.js b/doc/implementors/core/ops/trait.Deref.js new file mode 100644 index 00000000..7e5c13ce --- /dev/null +++ b/doc/implementors/core/ops/trait.Deref.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['crossbeam'] = ["impl<T> Deref for Owned<T>","impl<'a, T> Deref for Shared<'a, T>","impl<T> Deref for CachePadded<T>",];implementors['ansi_term'] = ["impl<'a> Deref for ANSIString<'a>",];implementors['libc'] = [];implementors['crc'] = ["impl Deref for IEEE_TABLE","impl Deref for CASTAGNOLI_TABLE","impl Deref for KOOPMAN_TABLE","impl Deref for ECMA_TABLE","impl Deref for ISO_TABLE",];implementors['regex_syntax'] = ["impl<'a, B> Deref for Cow<'a, B> where B: ToOwned + ?Sized","impl Deref for String","impl<T> Deref for Vec<T>","impl<T> Deref for Box<T> where T: ?Sized","impl Deref for CharClass",];implementors['regex'] = ["impl<'t> Deref for CharInput<'t>","impl Deref for Program",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.DerefMut.js b/doc/implementors/core/ops/trait.DerefMut.js new file mode 100644 index 00000000..74d63a55 --- /dev/null +++ b/doc/implementors/core/ops/trait.DerefMut.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['crossbeam'] = ["impl<T> DerefMut for Owned<T>","impl<T> DerefMut for CachePadded<T>",];implementors['libc'] = [];implementors['regex_syntax'] = ["impl DerefMut for String","impl<T> DerefMut for Vec<T>","impl<T> DerefMut for Box<T> where T: ?Sized",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Div.js b/doc/implementors/core/ops/trait.Div.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.Div.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.DivAssign.js b/doc/implementors/core/ops/trait.DivAssign.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.DivAssign.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Drop.js b/doc/implementors/core/ops/trait.Drop.js new file mode 100644 index 00000000..30dced36 --- /dev/null +++ b/doc/implementors/core/ops/trait.Drop.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['crossbeam'] = ["impl Drop for Guard","impl<'a> Drop for Scope<'a>",];implementors['libc'] = [];implementors['regex_syntax'] = ["impl<'a, T> Drop for Hole<'a, T>","impl<K, V> Drop for BTreeMap<K, V>","impl<K, V> Drop for IntoIter<K, V>","impl<T> Drop for LinkedList<T>","impl<'a> Drop for Drain<'a>","impl<T> Drop for Vec<T>","impl<T> Drop for IntoIter<T>","impl<'a, T> Drop for Drain<'a, T>","impl<T> Drop for VecDeque<T>","impl<'a, T> Drop for Drain<'a, T> where T: 'a","impl<T> Drop for IntermediateBox<T> where T: ?Sized",];implementors['oxipng'] = ["impl<D: Direction> Drop for Stream<D>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Fn.js b/doc/implementors/core/ops/trait.Fn.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.Fn.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.FnMut.js b/doc/implementors/core/ops/trait.FnMut.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.FnMut.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.FnOnce.js b/doc/implementors/core/ops/trait.FnOnce.js new file mode 100644 index 00000000..7ca2ce61 --- /dev/null +++ b/doc/implementors/core/ops/trait.FnOnce.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<'a, A, R> FnOnce<A> for Box<FnBox<A, Output=R> + 'a>","impl<'a, A, R> FnOnce<A> for Box<FnBox<A, Output=R> + 'a + Send>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.InPlace.js b/doc/implementors/core/ops/trait.InPlace.js new file mode 100644 index 00000000..a50b1111 --- /dev/null +++ b/doc/implementors/core/ops/trait.InPlace.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['regex_syntax'] = ["impl<'a, T> InPlace<T> for FrontPlace<'a, T>","impl<'a, T> InPlace<T> for BackPlace<'a, T>","impl<T> InPlace<T> for IntermediateBox<T>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Index.js b/doc/implementors/core/ops/trait.Index.js new file mode 100644 index 00000000..223ec251 --- /dev/null +++ b/doc/implementors/core/ops/trait.Index.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['vec_map'] = ["impl<V> Index<usize> for VecMap<V>","impl<'a, V> Index<&'a usize> for VecMap<V>",];implementors['regex_syntax'] = ["impl<'a, K, Q, V> Index<&'a Q> for BTreeMap<K, V> where Q: Ord + ?Sized, K: Ord + Borrow<Q>","impl Index<Range<usize>> for String","impl Index<RangeTo<usize>> for String","impl Index<RangeFrom<usize>> for String","impl Index<RangeFull> for String","impl Index<RangeInclusive<usize>> for String","impl Index<RangeToInclusive<usize>> for String","impl<T> Index<usize> for Vec<T>","impl<T> Index<Range<usize>> for Vec<T>","impl<T> Index<RangeTo<usize>> for Vec<T>","impl<T> Index<RangeFrom<usize>> for Vec<T>","impl<T> Index<RangeFull> for Vec<T>","impl<T> Index<RangeInclusive<usize>> for Vec<T>","impl<T> Index<RangeToInclusive<usize>> for Vec<T>","impl<A> Index<usize> for VecDeque<A>",];implementors['bit_vec'] = ["impl<B: BitBlock> Index<usize> for BitVec<B>",];implementors['regex'] = ["impl<'t> Index<usize> for Captures<'t>","impl<'t, 'i> Index<&'i str> for Captures<'t>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.IndexMut.js b/doc/implementors/core/ops/trait.IndexMut.js new file mode 100644 index 00000000..f61e4c9c --- /dev/null +++ b/doc/implementors/core/ops/trait.IndexMut.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['vec_map'] = ["impl<V> IndexMut<usize> for VecMap<V>","impl<'a, V> IndexMut<&'a usize> for VecMap<V>",];implementors['regex_syntax'] = ["impl IndexMut<Range<usize>> for String","impl IndexMut<RangeTo<usize>> for String","impl IndexMut<RangeFrom<usize>> for String","impl IndexMut<RangeFull> for String","impl IndexMut<RangeInclusive<usize>> for String","impl IndexMut<RangeToInclusive<usize>> for String","impl<T> IndexMut<usize> for Vec<T>","impl<T> IndexMut<Range<usize>> for Vec<T>","impl<T> IndexMut<RangeTo<usize>> for Vec<T>","impl<T> IndexMut<RangeFrom<usize>> for Vec<T>","impl<T> IndexMut<RangeFull> for Vec<T>","impl<T> IndexMut<RangeInclusive<usize>> for Vec<T>","impl<T> IndexMut<RangeToInclusive<usize>> for Vec<T>","impl<A> IndexMut<usize> for VecDeque<A>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Mul.js b/doc/implementors/core/ops/trait.Mul.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.Mul.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.MulAssign.js b/doc/implementors/core/ops/trait.MulAssign.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.MulAssign.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Neg.js b/doc/implementors/core/ops/trait.Neg.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.Neg.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Not.js b/doc/implementors/core/ops/trait.Not.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.Not.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Place.js b/doc/implementors/core/ops/trait.Place.js new file mode 100644 index 00000000..f7a93417 --- /dev/null +++ b/doc/implementors/core/ops/trait.Place.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['regex_syntax'] = ["impl<'a, T> Place<T> for FrontPlace<'a, T>","impl<'a, T> Place<T> for BackPlace<'a, T>","impl<T> Place<T> for IntermediateBox<T>",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Placer.js b/doc/implementors/core/ops/trait.Placer.js new file mode 100644 index 00000000..6238a1d1 --- /dev/null +++ b/doc/implementors/core/ops/trait.Placer.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['regex_syntax'] = ["impl<'a, T> Placer<T> for FrontPlace<'a, T>","impl<'a, T> Placer<T> for BackPlace<'a, T>","impl<T> Placer<T> for ExchangeHeapSingleton",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Rem.js b/doc/implementors/core/ops/trait.Rem.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.Rem.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.RemAssign.js b/doc/implementors/core/ops/trait.RemAssign.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.RemAssign.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Shl.js b/doc/implementors/core/ops/trait.Shl.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.Shl.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.ShlAssign.js b/doc/implementors/core/ops/trait.ShlAssign.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.ShlAssign.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Shr.js b/doc/implementors/core/ops/trait.Shr.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.Shr.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.ShrAssign.js b/doc/implementors/core/ops/trait.ShrAssign.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.ShrAssign.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.Sub.js b/doc/implementors/core/ops/trait.Sub.js new file mode 100644 index 00000000..468bc223 --- /dev/null +++ b/doc/implementors/core/ops/trait.Sub.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<'a, 'b, T> Sub<&'b BTreeSet<T>> for &'a BTreeSet<T> where T: Ord + Clone","impl<E> Sub<EnumSet<E>> for EnumSet<E> where E: CLike",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/ops/trait.SubAssign.js b/doc/implementors/core/ops/trait.SubAssign.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/ops/trait.SubAssign.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/raw/trait.Repr.js b/doc/implementors/core/raw/trait.Repr.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/raw/trait.Repr.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/slice/bytes/trait.MutableByteVector.js b/doc/implementors/core/slice/bytes/trait.MutableByteVector.js new file mode 100644 index 00000000..dd6a3a27 --- /dev/null +++ b/doc/implementors/core/slice/bytes/trait.MutableByteVector.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/slice/trait.SliceExt.js b/doc/implementors/core/slice/trait.SliceExt.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/slice/trait.SliceExt.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/slice/trait.SplitIter.js b/doc/implementors/core/slice/trait.SplitIter.js new file mode 100644 index 00000000..5fd020f3 --- /dev/null +++ b/doc/implementors/core/slice/trait.SplitIter.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/str/pattern/trait.DoubleEndedSearcher.js b/doc/implementors/core/str/pattern/trait.DoubleEndedSearcher.js new file mode 100644 index 00000000..dd6a3a27 --- /dev/null +++ b/doc/implementors/core/str/pattern/trait.DoubleEndedSearcher.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/str/pattern/trait.Pattern.js b/doc/implementors/core/str/pattern/trait.Pattern.js new file mode 100644 index 00000000..0ba50826 --- /dev/null +++ b/doc/implementors/core/str/pattern/trait.Pattern.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl<'a, 'b> Pattern<'a> for &'b String",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/str/pattern/trait.ReverseSearcher.js b/doc/implementors/core/str/pattern/trait.ReverseSearcher.js new file mode 100644 index 00000000..dd6a3a27 --- /dev/null +++ b/doc/implementors/core/str/pattern/trait.ReverseSearcher.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/str/pattern/trait.Searcher.js b/doc/implementors/core/str/pattern/trait.Searcher.js new file mode 100644 index 00000000..dd6a3a27 --- /dev/null +++ b/doc/implementors/core/str/pattern/trait.Searcher.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/str/pattern/trait.TwoWayStrategy.js b/doc/implementors/core/str/pattern/trait.TwoWayStrategy.js new file mode 100644 index 00000000..dd6a3a27 --- /dev/null +++ b/doc/implementors/core/str/pattern/trait.TwoWayStrategy.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/core/str/trait.FromStr.js b/doc/implementors/core/str/trait.FromStr.js new file mode 100644 index 00000000..76592ca1 --- /dev/null +++ b/doc/implementors/core/str/trait.FromStr.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['libc'] = [];implementors['regex_syntax'] = ["impl FromStr for String",];implementors['regex'] = ["impl FromStr for Regex",];implementors['clap'] = ["impl FromStr for AppSettings",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/crc/crc32/trait.Hasher32.js b/doc/implementors/crc/crc32/trait.Hasher32.js new file mode 100644 index 00000000..a7def232 --- /dev/null +++ b/doc/implementors/crc/crc32/trait.Hasher32.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['crc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/crc/crc64/trait.Hasher64.js b/doc/implementors/crc/crc64/trait.Hasher64.js new file mode 100644 index 00000000..a7def232 --- /dev/null +++ b/doc/implementors/crc/crc64/trait.Hasher64.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['crc'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/crossbeam/mem/trait.ZerosValid.js b/doc/implementors/crossbeam/mem/trait.ZerosValid.js new file mode 100644 index 00000000..255a999e --- /dev/null +++ b/doc/implementors/crossbeam/mem/trait.ZerosValid.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['crossbeam'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/regex/trait.Replacer.js b/doc/implementors/regex/trait.Replacer.js new file mode 100644 index 00000000..274f2013 --- /dev/null +++ b/doc/implementors/regex/trait.Replacer.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['regex'] = []; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/implementors/std/error/trait.Error.js b/doc/implementors/std/error/trait.Error.js new file mode 100644 index 00000000..7590bf12 --- /dev/null +++ b/doc/implementors/std/error/trait.Error.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors['byteorder'] = ["impl Error for Error",];implementors['regex_syntax'] = ["impl Error for Error",];implementors['regex'] = ["impl Error for Error",];implementors['clap'] = ["impl Error for ClapError",]; + + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } + +})() diff --git a/doc/jquery.js b/doc/jquery.js new file mode 100644 index 00000000..49990d6e --- /dev/null +++ b/doc/jquery.js @@ -0,0 +1,4 @@ +/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){ +return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*\s*$/g,ia={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(oa(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n("