├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── docs ├── .lock ├── COPYRIGHT.txt ├── FiraSans-LICENSE.txt ├── FiraSans-Medium.woff ├── FiraSans-Medium.woff2 ├── FiraSans-Regular.woff ├── FiraSans-Regular.woff2 ├── LICENSE-APACHE.txt ├── LICENSE-MIT.txt ├── NanumBarunGothic-LICENSE.txt ├── NanumBarunGothic.ttf.woff ├── NanumBarunGothic.ttf.woff2 ├── SourceCodePro-It.ttf.woff ├── SourceCodePro-It.ttf.woff2 ├── SourceCodePro-LICENSE.txt ├── SourceCodePro-Regular.ttf.woff ├── SourceCodePro-Regular.ttf.woff2 ├── SourceCodePro-Semibold.ttf.woff ├── SourceCodePro-Semibold.ttf.woff2 ├── SourceSerif4-Bold.ttf.woff ├── SourceSerif4-Bold.ttf.woff2 ├── SourceSerif4-It.ttf.woff ├── SourceSerif4-It.ttf.woff2 ├── SourceSerif4-LICENSE.md ├── SourceSerif4-Regular.ttf.woff ├── SourceSerif4-Regular.ttf.woff2 ├── ayu.css ├── brush.svg ├── clipboard.svg ├── crates.js ├── dark.css ├── down-arrow.svg ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon.svg ├── implementors │ └── core │ │ ├── clone │ │ └── trait.Clone.js │ │ ├── cmp │ │ └── trait.PartialEq.js │ │ ├── default │ │ └── trait.Default.js │ │ ├── fmt │ │ └── trait.Debug.js │ │ ├── iter │ │ └── traits │ │ │ ├── collect │ │ │ ├── trait.Extend.js │ │ │ ├── trait.FromIterator.js │ │ │ └── trait.IntoIterator.js │ │ │ ├── iterator │ │ │ └── trait.Iterator.js │ │ │ └── marker │ │ │ └── trait.FusedIterator.js │ │ ├── marker │ │ ├── trait.Freeze.js │ │ ├── trait.Send.js │ │ ├── trait.Sync.js │ │ └── trait.Unpin.js │ │ ├── ops │ │ └── drop │ │ │ └── trait.Drop.js │ │ └── panic │ │ └── unwind_safe │ │ ├── trait.RefUnwindSafe.js │ │ └── trait.UnwindSafe.js ├── light.css ├── linked │ ├── all.html │ ├── index.html │ ├── iter │ │ ├── index.html │ │ ├── sidebar-items.js │ │ ├── struct.IntoIter.html │ │ ├── struct.Iter.html │ │ └── struct.IterMut.html │ ├── sidebar-items.js │ └── struct.LinkedList.html ├── main.js ├── normalize.css ├── noscript.css ├── rust-logo.png ├── rustdoc.css ├── search-index.js ├── search.js ├── settings.css ├── settings.html ├── settings.js ├── source-files.js ├── source-script.js ├── src │ └── linked │ │ ├── iter.rs.html │ │ └── lib.rs.html ├── storage.js ├── toggle-minus.svg ├── toggle-plus.svg └── wheel.svg └── src ├── iter.rs └── lib.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "linked_list_rs" 7 | version = "0.1.0" 8 | dependencies = [ 9 | "testdrop", 10 | ] 11 | 12 | [[package]] 13 | name = "testdrop" 14 | version = "0.1.2" 15 | source = "registry+https://github.com/rust-lang/crates.io-index" 16 | checksum = "3d39ee32a48eb5325bd3927d4533ac58344af21def4a43ddfc3734c43aebbeae" 17 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "linked_list_rs" 3 | version = "0.1.0" 4 | license = "MIT" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | 10 | [dev-dependencies] 11 | testdrop = "0.1.2" 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © 2022 Conrad Ludgate and Nils :ferrisClueless: Trieb 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 4 | and associated documentation files (the “Software”), to deal in the Software without restriction, 5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 7 | subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 12 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 13 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 14 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 15 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A 🚀🔥🔥**blazingly**🔥🔥🚀 fast 🚀 linked 🚀 list 2 | 3 | To🔥be🚀blazingly🚀fast🔥this🔥crate🚀contains🔥speed🚀for🚀extra🚀perf🚀. 4 | 5 | # Benchmarks 6 | 7 | | List | Inserting 10000 elements | Walking through 200 elements 8 | |--------------------------------|--------------------------|----------------------------- 9 | | `std::collections::LinkedList` | 5h3min44s | 8s 10 | | C++ `std::list` | 6h2min4s | 7s 11 | | This list | 3ms (SIGILL) | 1ms (SIGSEGV) 12 | 13 | 14 | # Is this production ready? 15 | Yes, although production might not exist anymore after deploying it. 16 | 17 | # How fast is it really? 18 | 🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀 19 | 20 | # MSRV 21 | 22 | The current MSRV is 1.10.0 but that may be reduced in the future. Reducing the MSRV is not considered a breaking change and may happen in patch releases. 23 | -------------------------------------------------------------------------------- /docs/.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/.lock -------------------------------------------------------------------------------- /docs/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | These documentation pages include resources by third parties. This copyright 2 | file applies only to those resources. The following third party resources are 3 | included, and carry their own copyright notices and license terms: 4 | 5 | * Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2, 6 | FiraSans-Regular.woff, FiraSans-Medium.woff): 7 | 8 | Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ 9 | with Reserved Font Name Fira Sans. 10 | 11 | Copyright (c) 2014, Telefonica S.A. 12 | 13 | Licensed under the SIL Open Font License, Version 1.1. 14 | See FiraSans-LICENSE.txt. 15 | 16 | * rustdoc.css, main.js, and playpen.js: 17 | 18 | Copyright 2015 The Rust Developers. 19 | Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or 20 | the MIT license (LICENSE-MIT.txt) at your option. 21 | 22 | * normalize.css: 23 | 24 | Copyright (c) Nicolas Gallagher and Jonathan Neal. 25 | Licensed under the MIT license (see LICENSE-MIT.txt). 26 | 27 | * Source Code Pro (SourceCodePro-Regular.ttf.woff2, 28 | SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2, 29 | SourceCodePro-Regular.ttf.woff, SourceCodePro-Semibold.ttf.woff, 30 | SourceCodePro-It.ttf.woff): 31 | 32 | Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), 33 | with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark 34 | of Adobe Systems Incorporated in the United States and/or other countries. 35 | 36 | Licensed under the SIL Open Font License, Version 1.1. 37 | See SourceCodePro-LICENSE.txt. 38 | 39 | * Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, 40 | SourceSerif4-It.ttf.woff2, SourceSerif4-Regular.ttf.woff, 41 | SourceSerif4-Bold.ttf.woff, SourceSerif4-It.ttf.woff): 42 | 43 | Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 44 | 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United 45 | States and/or other countries. 46 | 47 | Licensed under the SIL Open Font License, Version 1.1. 48 | See SourceSerif4-LICENSE.md. 49 | 50 | This copyright file is intended to be distributed with rustdoc output. 51 | -------------------------------------------------------------------------------- /docs/FiraSans-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. 2 | with Reserved Font Name < Fira >, 3 | 4 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 5 | This license is copied below, and is also available with a FAQ at: 6 | http://scripts.sil.org/OFL 7 | 8 | 9 | ----------------------------------------------------------- 10 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 11 | ----------------------------------------------------------- 12 | 13 | PREAMBLE 14 | The goals of the Open Font License (OFL) are to stimulate worldwide 15 | development of collaborative font projects, to support the font creation 16 | efforts of academic and linguistic communities, and to provide a free and 17 | open framework in which fonts may be shared and improved in partnership 18 | with others. 19 | 20 | The OFL allows the licensed fonts to be used, studied, modified and 21 | redistributed freely as long as they are not sold by themselves. The 22 | fonts, including any derivative works, can be bundled, embedded, 23 | redistributed and/or sold with any software provided that any reserved 24 | names are not used by derivative works. The fonts and derivatives, 25 | however, cannot be released under any other type of license. The 26 | requirement for fonts to remain under this license does not apply 27 | to any document created using the fonts or their derivatives. 28 | 29 | DEFINITIONS 30 | "Font Software" refers to the set of files released by the Copyright 31 | Holder(s) under this license and clearly marked as such. This may 32 | include source files, build scripts and documentation. 33 | 34 | "Reserved Font Name" refers to any names specified as such after the 35 | copyright statement(s). 36 | 37 | "Original Version" refers to the collection of Font Software components as 38 | distributed by the Copyright Holder(s). 39 | 40 | "Modified Version" refers to any derivative made by adding to, deleting, 41 | or substituting -- in part or in whole -- any of the components of the 42 | Original Version, by changing formats or by porting the Font Software to a 43 | new environment. 44 | 45 | "Author" refers to any designer, engineer, programmer, technical 46 | writer or other person who contributed to the Font Software. 47 | 48 | PERMISSION & CONDITIONS 49 | Permission is hereby granted, free of charge, to any person obtaining 50 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 51 | redistribute, and sell modified and unmodified copies of the Font 52 | Software, subject to the following conditions: 53 | 54 | 1) Neither the Font Software nor any of its individual components, 55 | in Original or Modified Versions, may be sold by itself. 56 | 57 | 2) Original or Modified Versions of the Font Software may be bundled, 58 | redistributed and/or sold with any software, provided that each copy 59 | contains the above copyright notice and this license. These can be 60 | included either as stand-alone text files, human-readable headers or 61 | in the appropriate machine-readable metadata fields within text or 62 | binary files as long as those fields can be easily viewed by the user. 63 | 64 | 3) No Modified Version of the Font Software may use the Reserved Font 65 | Name(s) unless explicit written permission is granted by the corresponding 66 | Copyright Holder. This restriction only applies to the primary font name as 67 | presented to the users. 68 | 69 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 70 | Software shall not be used to promote, endorse or advertise any 71 | Modified Version, except to acknowledge the contribution(s) of the 72 | Copyright Holder(s) and the Author(s) or with their explicit written 73 | permission. 74 | 75 | 5) The Font Software, modified or unmodified, in part or in whole, 76 | must be distributed entirely under this license, and must not be 77 | distributed under any other license. The requirement for fonts to 78 | remain under this license does not apply to any document created 79 | using the Font Software. 80 | 81 | TERMINATION 82 | This license becomes null and void if any of the above conditions are 83 | not met. 84 | 85 | DISCLAIMER 86 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 87 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 88 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 89 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 90 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 91 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 92 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 93 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 94 | OTHER DEALINGS IN THE FONT SOFTWARE. 95 | -------------------------------------------------------------------------------- /docs/FiraSans-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/FiraSans-Medium.woff -------------------------------------------------------------------------------- /docs/FiraSans-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/FiraSans-Medium.woff2 -------------------------------------------------------------------------------- /docs/FiraSans-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/FiraSans-Regular.woff -------------------------------------------------------------------------------- /docs/FiraSans-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/FiraSans-Regular.woff2 -------------------------------------------------------------------------------- /docs/LICENSE-APACHE.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /docs/LICENSE-MIT.txt: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any 2 | person obtaining a copy of this software and associated 3 | documentation files (the "Software"), to deal in the 4 | Software without restriction, including without 5 | limitation the rights to use, copy, modify, merge, 6 | publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software 8 | is furnished to do so, subject to the following 9 | conditions: 10 | 11 | The above copyright notice and this permission notice 12 | shall be included in all copies or substantial portions 13 | of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 16 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 17 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 18 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 19 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 22 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /docs/NanumBarunGothic-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), 2 | 3 | with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, 4 | NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, 5 | Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, 6 | NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, 7 | Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri 8 | 9 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 10 | This license is copied below, and is also available with a FAQ at: 11 | http://scripts.sil.org/OFL 12 | 13 | 14 | ----------------------------------------------------------- 15 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 16 | ----------------------------------------------------------- 17 | 18 | PREAMBLE 19 | The goals of the Open Font License (OFL) are to stimulate worldwide 20 | development of collaborative font projects, to support the font creation 21 | efforts of academic and linguistic communities, and to provide a free and 22 | open framework in which fonts may be shared and improved in partnership 23 | with others. 24 | 25 | The OFL allows the licensed fonts to be used, studied, modified and 26 | redistributed freely as long as they are not sold by themselves. The 27 | fonts, including any derivative works, can be bundled, embedded, 28 | redistributed and/or sold with any software provided that any reserved 29 | names are not used by derivative works. The fonts and derivatives, 30 | however, cannot be released under any other type of license. The 31 | requirement for fonts to remain under this license does not apply 32 | to any document created using the fonts or their derivatives. 33 | 34 | DEFINITIONS 35 | "Font Software" refers to the set of files released by the Copyright 36 | Holder(s) under this license and clearly marked as such. This may 37 | include source files, build scripts and documentation. 38 | 39 | "Reserved Font Name" refers to any names specified as such after the 40 | copyright statement(s). 41 | 42 | "Original Version" refers to the collection of Font Software components as 43 | distributed by the Copyright Holder(s). 44 | 45 | "Modified Version" refers to any derivative made by adding to, deleting, 46 | or substituting -- in part or in whole -- any of the components of the 47 | Original Version, by changing formats or by porting the Font Software to a 48 | new environment. 49 | 50 | "Author" refers to any designer, engineer, programmer, technical 51 | writer or other person who contributed to the Font Software. 52 | 53 | PERMISSION & CONDITIONS 54 | Permission is hereby granted, free of charge, to any person obtaining 55 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 56 | redistribute, and sell modified and unmodified copies of the Font 57 | Software, subject to the following conditions: 58 | 59 | 1) Neither the Font Software nor any of its individual components, 60 | in Original or Modified Versions, may be sold by itself. 61 | 62 | 2) Original or Modified Versions of the Font Software may be bundled, 63 | redistributed and/or sold with any software, provided that each copy 64 | contains the above copyright notice and this license. These can be 65 | included either as stand-alone text files, human-readable headers or 66 | in the appropriate machine-readable metadata fields within text or 67 | binary files as long as those fields can be easily viewed by the user. 68 | 69 | 3) No Modified Version of the Font Software may use the Reserved Font 70 | Name(s) unless explicit written permission is granted by the corresponding 71 | Copyright Holder. This restriction only applies to the primary font name as 72 | presented to the users. 73 | 74 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 75 | Software shall not be used to promote, endorse or advertise any 76 | Modified Version, except to acknowledge the contribution(s) of the 77 | Copyright Holder(s) and the Author(s) or with their explicit written 78 | permission. 79 | 80 | 5) The Font Software, modified or unmodified, in part or in whole, 81 | must be distributed entirely under this license, and must not be 82 | distributed under any other license. The requirement for fonts to 83 | remain under this license does not apply to any document created 84 | using the Font Software. 85 | 86 | TERMINATION 87 | This license becomes null and void if any of the above conditions are 88 | not met. 89 | 90 | DISCLAIMER 91 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 92 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 93 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 94 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 95 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 96 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 97 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 98 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 99 | OTHER DEALINGS IN THE FONT SOFTWARE. 100 | -------------------------------------------------------------------------------- /docs/NanumBarunGothic.ttf.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/NanumBarunGothic.ttf.woff -------------------------------------------------------------------------------- /docs/NanumBarunGothic.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/NanumBarunGothic.ttf.woff2 -------------------------------------------------------------------------------- /docs/SourceCodePro-It.ttf.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/SourceCodePro-It.ttf.woff -------------------------------------------------------------------------------- /docs/SourceCodePro-It.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/SourceCodePro-It.ttf.woff2 -------------------------------------------------------------------------------- /docs/SourceCodePro-LICENSE.txt: -------------------------------------------------------------------------------- 1 | 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. 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | 5 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /docs/SourceCodePro-Regular.ttf.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/SourceCodePro-Regular.ttf.woff -------------------------------------------------------------------------------- /docs/SourceCodePro-Regular.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/SourceCodePro-Regular.ttf.woff2 -------------------------------------------------------------------------------- /docs/SourceCodePro-Semibold.ttf.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/SourceCodePro-Semibold.ttf.woff -------------------------------------------------------------------------------- /docs/SourceCodePro-Semibold.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/SourceCodePro-Semibold.ttf.woff2 -------------------------------------------------------------------------------- /docs/SourceSerif4-Bold.ttf.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/SourceSerif4-Bold.ttf.woff -------------------------------------------------------------------------------- /docs/SourceSerif4-Bold.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/SourceSerif4-Bold.ttf.woff2 -------------------------------------------------------------------------------- /docs/SourceSerif4-It.ttf.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/SourceSerif4-It.ttf.woff -------------------------------------------------------------------------------- /docs/SourceSerif4-It.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/SourceSerif4-It.ttf.woff2 -------------------------------------------------------------------------------- /docs/SourceSerif4-LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | 5 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /docs/SourceSerif4-Regular.ttf.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/SourceSerif4-Regular.ttf.woff -------------------------------------------------------------------------------- /docs/SourceSerif4-Regular.ttf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/SourceSerif4-Regular.ttf.woff2 -------------------------------------------------------------------------------- /docs/ayu.css: -------------------------------------------------------------------------------- 1 | body{background-color:#0f1419;color:#c5c5c5;}h1,h2,h3,h4{color:white;}h1.fqn{border-bottom-color:#5c6773;}h1.fqn a{color:#fff;}h2,h3,h4{border-bottom-color:#5c6773;}h4{border:none;}.in-band{background-color:#0f1419;}.invisible{background:rgba(0,0,0,0);}.docblock code{color:#ffb454;}.code-header{color:#e6e1cf;}.docblock pre>code,pre>code{color:#e6e1cf;}span code{color:#e6e1cf;}.docblock a>code{color:#39AFD7 !important;}.docblock code,.docblock-short code{background-color:#191f26;}pre,.rustdoc.source .example-wrap{color:#e6e1cf;background-color:#191f26;}.sidebar{background-color:#14191f;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);}*{scrollbar-color:#5c6773 transparent;}.sidebar{scrollbar-color:#5c6773 transparent;}::-webkit-scrollbar-track{background-color:transparent;}::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar::-webkit-scrollbar-track{background-color:transparent;}.sidebar::-webkit-scrollbar-thumb{background-color:#5c6773;}.sidebar .current{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#0f1419;}.sidebar .location{border-color:#000;background-color:#0f1419;color:#fff;}.sidebar-elems .location{color:#ff7733;}.sidebar-elems .location a{color:#fff;}.sidebar .version{border-bottom-color:#424c57;}.sidebar-title{border-top-color:#5c6773;border-bottom-color:#5c6773;}.block a:hover{background:transparent;color:#ffb44c;}.line-numbers span{color:#5c6773;}.line-numbers .line-highlighted{color:#708090;background-color:rgba(255,236,164,0.06);padding-right:4px;border-right:1px solid #ffb44c;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#5c6773;}.docblock table td,.docblock table th{border-color:#5c6773;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#c5c5c5;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#000 !important;background-color:#c6afb3;}.search-results a{color:#0096cf;}.search-results a div.desc{color:#c5c5c5;}.content .item-info::before{color:#ccc;}.content span.foreigntype,.content a.foreigntype{color:#ef57ff;}.content span.union,.content a.union{color:#98a01c;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#6380a0;}.content span.primitive,.content a.primitive{color:#32889b;}.content span.traitalias,.content a.traitalias{color:#57d399;}.content span.keyword,.content a.keyword{color:#de5249;}.content span.externcrate,.content span.mod,.content a.mod{color:#acccf9;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#99e0c9;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#cfbcf5;}.content span.fn,.content a.fn,.content span.method,.content a.method,.content span.tymethod,.content a.tymethod,.content .fnname{color:#fdd687;}.content span.attr,.content a.attr,.content span.derive,.content a.derive,.content span.macro,.content a.macro{color:#a37acc;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav:not(.sidebar){border-bottom-color:#424c57;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#c5c5c5;}body.source .example-wrap pre.rust a{background:#333;}.docblock:not(.item-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#39AFD7;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}details.rustdoc-toggle>summary::before,details.undocumented>summary::before{filter:invert(100%);}#crate-search{color:#c5c5c5;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;border-color:#424c57;}.search-input{color:#ffffff;background-color:#141920;box-shadow:0 0 0 1px #424c57,0 0 0 2px transparent;transition:box-shadow 150ms ease-in-out;}#crate-search+.search-input:focus{box-shadow:0 0 0 1px #148099,0 0 0 2px transparent;}.search-input:disabled{background-color:#3e3e3e;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable,.stab.deprecated,.stab.portability{color:#c5c5c5;background:#314559 !important;border-style:none !important;border-radius:4px;padding:3px 6px 3px 6px;}.stab.portability>code{color:#e6e1cf;background:none;}#help>div{background:#14191f;box-shadow:0px 6px 20px 0px black;border:none;border-radius:4px;}#help span.bottom,#help span.top{border-color:#5c6773;}.since{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#788797;}.line-numbers :target{background-color:transparent;}pre.rust .number,pre.rust .string{color:#b8cc52;}pre.rust .kw,pre.rust .kw-2,pre.rust .prelude-ty,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .op,pre.rust .lifetime{color:#ff7733;}pre.rust .macro,pre.rust .macro-nonterminal{color:#a37acc;}pre.rust .question-mark{color:#ff9011;}pre.rust .self{color:#36a3d9;font-style:italic;}pre.rust .attribute{color:#e6e1cf;}pre.rust .attribute .ident,pre.rust .attribute .op{color:#e6e1cf;}.example-wrap>pre.line-number{color:#5c67736e;border:none;}a.test-arrow{font-size:100%;color:#788797;border-radius:4px;background-color:rgba(57,175,215,0.09);}a.test-arrow:hover{background-color:rgba(57,175,215,0.368);color:#c5c5c5;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background:rgba(255,236,164,0.06);}:target{border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}.notable-traits-tooltiptext .notable{border-bottom-color:#5c6773;}#titles>button.selected{background-color:#141920 !important;border-bottom:1px solid #ffb44c !important;border-top:none;}#titles>button:not(.selected){background-color:transparent !important;border:none;}#titles>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#titles>button>div.count{color:#888;}.search-input:focus{}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{}.content span.struct,.content a.struct,.block a.current.struct{}#titles>button:hover,#titles>button.selected{}.content span.type,.content a.type,.block a.current.type{}.content span.union,.content a.union,.block a.current.union{}pre.rust .lifetime{}.stab.unstable{}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){}.content span.enum,.content a.enum,.block a.current.enum{}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{}.content span.keyword,.content a.keyword,.block a.current.keyword{}pre.rust .comment{}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{}pre.rust .kw{}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{}pre.rust .doccomment{}.stab.deprecated{}.content a.attr,.content a.derive,.content a.macro{}.stab.portability{}.content span.primitive,.content a.primitive,.block a.current.primitive{}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{}pre.rust .kw-2,pre.rust .prelude-ty{}.content span.trait,.content a.trait,.block a.current.trait{}.search-results a:focus span{}a.result-trait:focus{}a.result-traitalias:focus{}a.result-mod:focus,a.result-externcrate:focus{}a.result-mod:focus{}a.result-externcrate:focus{}a.result-enum:focus{}a.result-struct:focus{}a.result-union:focus{}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{}a.result-type:focus{}a.result-foreigntype:focus{}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{}a.result-constant:focus,a.result-static:focus{}a.result-primitive:focus{}a.result-keyword:focus{}@media (max-width:700px){.sidebar-menu{background-color:#14191f;border-bottom-color:#5c6773;border-right-color:#5c6773;}.sidebar-elems{background-color:#14191f;border-right-color:#5c6773;}#sidebar-filler{background-color:#14191f;border-bottom-color:#5c6773;}}kbd{color:#c5c5c5;background-color:#314559;border-color:#5c6773;border-bottom-color:#5c6773;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#theme-picker>img,#settings-menu>img{filter:invert(100);}#copy-path{color:#fff;}#copy-path>img{filter:invert(70%);}#copy-path:hover>img{filter:invert(100%);}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#e0e0e0;}#theme-choices{border-color:#5c6773;background-color:#0f1419;}#theme-choices>button:not(:first-child){border-top-color:#5c6773;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:rgba(110,110,110,0.33);}@media (max-width:700px){#theme-picker{background:#0f1419;}}#all-types{background-color:#14191f;}#all-types:hover{background-color:rgba(70,70,70,0.33);}.search-results .result-name span.alias{color:#c5c5c5;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#14191f;}#sidebar-toggle:hover{background-color:rgba(70,70,70,0.33);}#source-sidebar{background-color:#14191f;}#source-sidebar>.title{color:#fff;border-bottom-color:#5c6773;}div.files>a:hover,div.name:hover{background-color:#14191f;color:#ffb44c;}div.files>.selected{background-color:#14191f;color:#ffb44c;}.setting-line>.title{border-bottom-color:#5c6773;}input:checked+.slider{background-color:#ffb454 !important;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(15,20,25,1),rgba(15,20,25,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(15,20,25,1),rgba(15,20,25,0));}.toggle-line-inner{background:#616161;}.toggle-line:hover .toggle-line-inner{background:##898989;} -------------------------------------------------------------------------------- /docs/brush.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/clipboard.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/crates.js: -------------------------------------------------------------------------------- 1 | window.ALL_CRATES = ["linked"]; -------------------------------------------------------------------------------- /docs/dark.css: -------------------------------------------------------------------------------- 1 | body{background-color:#353535;color:#ddd;}h1,h2,h3,h4{color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3,h4{border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre,.rustdoc.source .example-wrap{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.logo-container.rust-logo>img{filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff)}*{scrollbar-color:rgb(64,65,67) #717171;}.sidebar{scrollbar-color:rgba(32,34,37,.6) transparent;}::-webkit-scrollbar-track{background-color:#717171;}::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar::-webkit-scrollbar-track{background-color:#717171;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(32,34,37,.6);}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#DDD;}.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.search-results a:hover{background-color:#777;}.search-results a:focus{color:#eee !important;background-color:#616161;}.search-results a:focus span{color:#eee !important;}a.result-trait:focus{background-color:#013191;}a.result-traitalias:focus{background-color:#013191;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-mod:focus{background-color:#803a1b;}a.result-externcrate:focus{background-color:#396bac;}a.result-enum:focus{background-color:#5b4e68;}a.result-struct:focus{background-color:#194e9f;}a.result-union:focus{background-color:#b7bd49;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#4950ed;}a.result-type:focus{background-color:#38902c;}a.result-foreigntype:focus{background-color:#b200d6;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#217d1c;}a.result-constant:focus,a.result-static:focus{background-color:#0063cc;}a.result-primitive:focus{background-color:#00708a;}a.result-keyword:focus{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}body.source .example-wrap pre.rust a{background:#333;}.docblock:not(.item-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#D2991D;}a.test-arrow{color:#dedede;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}details.rustdoc-toggle>summary::before,details.undocumented>summary::before{filter:invert(100%);}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-input:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab,.import-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;color:#2f2f2f;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;color:#2f2f2f;}.stab.portability>code{background:none;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help span.bottom,#help span.top{border-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);}.since{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background-color:#494a3d;}:target{border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}.notable-traits-tooltiptext .notable{border-bottom-color:#d2d2d2;}#titles>button:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>button:hover,#titles>button.selected{border-top-color:#0089ff;background-color:#353535;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#ffb900;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(65%);}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results .result-name span.alias{color:#fff;}.search-results .result-name span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;}.scraped-example .example-wrap .rust span.highlight{background:rgb(91,59,1);}.scraped-example .example-wrap .rust span.highlight.focus{background:rgb(124,75,15);}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(53,53,53,1),rgba(53,53,53,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(53,53,53,1),rgba(53,53,53,0));}.toggle-line-inner{background:#616161;}.toggle-line:hover .toggle-line-inner{background:##898989;} -------------------------------------------------------------------------------- /docs/down-arrow.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/favicon-16x16.png -------------------------------------------------------------------------------- /docs/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/favicon-32x32.png -------------------------------------------------------------------------------- /docs/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/implementors/core/clone/trait.Clone.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<'a, T: Clone> Clone for Iter<'a, T>","synthetic":false,"types":["linked::iter::Iter"]},{"text":"impl<T: Clone> Clone for LinkedList<T>","synthetic":false,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/cmp/trait.PartialEq.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T, U> PartialEq<LinkedList<U>> for LinkedList<T> where
    T: PartialEq<U>, 
","synthetic":false,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/default/trait.Default.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T> Default for LinkedList<T>","synthetic":false,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/fmt/trait.Debug.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T: Debug> Debug for LinkedList<T>","synthetic":false,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/iter/traits/collect/trait.Extend.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T> Extend<T> for LinkedList<T>","synthetic":false,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/iter/traits/collect/trait.FromIterator.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T> FromIterator<T> for LinkedList<T>","synthetic":false,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/iter/traits/collect/trait.IntoIterator.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T> IntoIterator for LinkedList<T>","synthetic":false,"types":["linked::LinkedList"]},{"text":"impl<'a, T> IntoIterator for &'a LinkedList<T>","synthetic":false,"types":["linked::LinkedList"]},{"text":"impl<'a, T> IntoIterator for &'a mut LinkedList<T>","synthetic":false,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/iter/traits/iterator/trait.Iterator.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T> Iterator for IntoIter<T>","synthetic":false,"types":["linked::iter::IntoIter"]},{"text":"impl<'a, T> Iterator for Iter<'a, T>","synthetic":false,"types":["linked::iter::Iter"]},{"text":"impl<'a, T> Iterator for IterMut<'a, T>","synthetic":false,"types":["linked::iter::IterMut"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/iter/traits/marker/trait.FusedIterator.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T> FusedIterator for IntoIter<T>","synthetic":false,"types":["linked::iter::IntoIter"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/marker/trait.Freeze.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T> Freeze for IntoIter<T>","synthetic":true,"types":["linked::iter::IntoIter"]},{"text":"impl<'a, T> Freeze for Iter<'a, T>","synthetic":true,"types":["linked::iter::Iter"]},{"text":"impl<'a, T> Freeze for IterMut<'a, T>","synthetic":true,"types":["linked::iter::IterMut"]},{"text":"impl<T> Freeze for LinkedList<T>","synthetic":true,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/marker/trait.Send.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T> !Send for IntoIter<T>","synthetic":true,"types":["linked::iter::IntoIter"]},{"text":"impl<'a, T> !Send for Iter<'a, T>","synthetic":true,"types":["linked::iter::Iter"]},{"text":"impl<'a, T> !Send for IterMut<'a, T>","synthetic":true,"types":["linked::iter::IterMut"]},{"text":"impl<T> !Send for LinkedList<T>","synthetic":true,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/marker/trait.Sync.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T> !Sync for IntoIter<T>","synthetic":true,"types":["linked::iter::IntoIter"]},{"text":"impl<'a, T> !Sync for Iter<'a, T>","synthetic":true,"types":["linked::iter::Iter"]},{"text":"impl<'a, T> !Sync for IterMut<'a, T>","synthetic":true,"types":["linked::iter::IterMut"]},{"text":"impl<T> !Sync for LinkedList<T>","synthetic":true,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/marker/trait.Unpin.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T> Unpin for IntoIter<T>","synthetic":true,"types":["linked::iter::IntoIter"]},{"text":"impl<'a, T> Unpin for Iter<'a, T>","synthetic":true,"types":["linked::iter::Iter"]},{"text":"impl<'a, T> Unpin for IterMut<'a, T>","synthetic":true,"types":["linked::iter::IterMut"]},{"text":"impl<T> Unpin for LinkedList<T>","synthetic":true,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/ops/drop/trait.Drop.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T> Drop for LinkedList<T>","synthetic":false,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T> RefUnwindSafe for IntoIter<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["linked::iter::IntoIter"]},{"text":"impl<'a, T> RefUnwindSafe for Iter<'a, T> where
    T: RefUnwindSafe
","synthetic":true,"types":["linked::iter::Iter"]},{"text":"impl<'a, T> RefUnwindSafe for IterMut<'a, T> where
    T: RefUnwindSafe
","synthetic":true,"types":["linked::iter::IterMut"]},{"text":"impl<T> RefUnwindSafe for LinkedList<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/implementors/core/panic/unwind_safe/trait.UnwindSafe.js: -------------------------------------------------------------------------------- 1 | (function() {var implementors = {}; 2 | implementors["linked"] = [{"text":"impl<T> UnwindSafe for IntoIter<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["linked::iter::IntoIter"]},{"text":"impl<'a, T> UnwindSafe for Iter<'a, T> where
    T: RefUnwindSafe
","synthetic":true,"types":["linked::iter::Iter"]},{"text":"impl<'a, T> !UnwindSafe for IterMut<'a, T>","synthetic":true,"types":["linked::iter::IterMut"]},{"text":"impl<T> UnwindSafe for LinkedList<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["linked::LinkedList"]}]; 3 | if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() -------------------------------------------------------------------------------- /docs/light.css: -------------------------------------------------------------------------------- 1 | body{background-color:white;color:black;}h1,h2,h3,h4{color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3,h4{border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre,.rustdoc.source .example-wrap{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.logo-container.rust-logo>img{}::-webkit-scrollbar-track{background-color:#ecebeb;}::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar::-webkit-scrollbar-track{background-color:#dcdcdc;}.sidebar::-webkit-scrollbar-thumb{background-color:rgba(36,37,39,0.6);}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5,.docblock h6{border-bottom-color:#ddd;}.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.search-results a:hover{background-color:#ddd;}.search-results a:focus{color:#000 !important;background-color:#ccc;}.search-results a:focus span{color:#000 !important;}a.result-trait:focus{background-color:#c7b6ff;}a.result-traitalias:focus{background-color:#c7b6ff;}a.result-mod:focus,a.result-externcrate:focus{background-color:#afc6e4;}a.result-enum:focus{background-color:#b4d1b9;}a.result-struct:focus{background-color:#e7b1a0;}a.result-union:focus{background-color:#b7bd49;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#c6afb3;}a.result-type:focus{background-color:#ffc891;}a.result-foreigntype:focus{background-color:#f5c4ff;}a.result-attr:focus,a.result-derive:focus,a.result-macro:focus{background-color:#8ce488;}a.result-constant:focus,a.result-static:focus{background-color:#c3e0ff;}a.result-primitive:focus{background-color:#9aecff;}a.result-keyword:focus{background-color:#f99650;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}body.source .example-wrap pre.rust a{background:#eee;}.docblock:not(.item-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.item-info a,#help a{color:#3873AD;}a.test-arrow{color:#f5f5f5;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-input:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab,.import-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.deprecated{background:#ffc4c4;border-color:#db7b7b;}.stab.portability{background:#F3DFFF;border-color:#b07bdb;}.stab.portability>code{background:none;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}#help span.bottom,#help span.top{border-color:#bfbfbf;}.since{color:grey;}.result-name .primitive>i,.result-name .keyword>i{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target,:target>*{background:#FDFFD3;}:target{border-right:3px solid #ffb44c;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.5);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.5);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#eee;border-color:#999;}.notable-traits-tooltiptext .notable{border-bottom-color:#DDDDDD;}#titles>button:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>button:hover,#titles>button.selected{background-color:#ffffff;border-top-color:#0089ff;}#titles>button>div.count{color:#888;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu,#help-button{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus,#help-button:hover,#help-button:focus{border-color:#717171;}#copy-path{color:#999;}#copy-path>img{filter:invert(50%);}#copy-path:hover>img{filter:invert(35%);}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} -------------------------------------------------------------------------------- /docs/linked/all.html: -------------------------------------------------------------------------------- 1 | List of all items in this crate

List of all items[] 2 | 3 |

Structs

4 | 5 | -------------------------------------------------------------------------------- /docs/linked/index.html: -------------------------------------------------------------------------------- 1 | linked - Rust

Crate linked[][src]

Expand description

A fairly straight forward but flexible implementation of a Linked List. 2 | No reason to use this over the standard libraries implementation though.

3 |

Modules

4 |

A set of iterator types for a LinkedList

5 |

Structs

6 |

LinkedList is an implementation of a singly-linked-list.

7 |
8 | 9 | -------------------------------------------------------------------------------- /docs/linked/iter/index.html: -------------------------------------------------------------------------------- 1 | linked::iter - Rust

Module linked::iter[][src]

Expand description

A set of iterator types for a LinkedList

2 |

Structs

3 |

Owned iterator of a LinkedList

4 |

Borrowed iterator of a LinkedList

5 |

Mutable iterator of a LinkedList

6 |
7 | 8 | -------------------------------------------------------------------------------- /docs/linked/iter/sidebar-items.js: -------------------------------------------------------------------------------- 1 | initSidebarItems({"struct":[["IntoIter","Owned iterator of a [`LinkedList`]"],["Iter","Borrowed iterator of a [`LinkedList`]"],["IterMut","Mutable iterator of a [`LinkedList`]"]]}); -------------------------------------------------------------------------------- /docs/linked/sidebar-items.js: -------------------------------------------------------------------------------- 1 | initSidebarItems({"mod":[["iter","A set of iterator types for a [`LinkedList`]"]],"struct":[["LinkedList","`LinkedList` is an implementation of a singly-linked-list."]]}); -------------------------------------------------------------------------------- /docs/main.js: -------------------------------------------------------------------------------- 1 | if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}(function(){var rustdocVars=document.getElementById("rustdoc-vars");if(rustdocVars){window.rootPath=rustdocVars.attributes["data-root-path"].value;window.currentCrate=rustdocVars.attributes["data-current-crate"].value;window.searchJS=rustdocVars.attributes["data-search-js"].value;window.searchIndexJS=rustdocVars.attributes["data-search-index-js"].value}var sidebarVars=document.getElementById("sidebar-vars");if(sidebarVars){window.sidebarCurrent={name:sidebarVars.attributes["data-name"].value,ty:sidebarVars.attributes["data-ty"].value,relpath:sidebarVars.attributes["data-relpath"].value,}}}());function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}var THEME_PICKER_ELEMENT_ID="theme-picker";var THEMES_ELEMENT_ID="theme-choices";function getThemesElement(){return document.getElementById(THEMES_ELEMENT_ID)}function getThemePickerElement(){return document.getElementById(THEME_PICKER_ELEMENT_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function showThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){var themePicker=getThemePickerElement();var themeChoices=getThemesElement();themeChoices.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}(function(){var themeChoices=getThemesElement();var themePicker=getThemePickerElement();var availableThemes=["ayu","dark","light"];function switchThemeButtonState(){if(themeChoices.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}}function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!==THEME_PICKER_ELEMENT_ID&&(!active.parentNode||active.parentNode.id!==THEMES_ELEMENT_ID)&&(!related||(related.id!==THEME_PICKER_ELEMENT_ID&&(!related.parentNode||related.parentNode.id!==THEMES_ELEMENT_ID)))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;availableThemes.forEach(function(item){var but=document.createElement("button");but.textContent=item;but.onclick=function(){switchTheme(window.currentTheme,window.mainTheme,item,true);useSystemTheme(false)};but.onblur=handleThemeButtonsBlur;themeChoices.appendChild(but)})}());(function(){"use strict";window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:function(){return document.getElementById("search")},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:function(){if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},focus:function(){searchState.input.focus()},defocus:function(){searchState.input.blur()},showResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(main,"hidden");removeClass(search,"hidden");searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:function(search){if(search===null||typeof search==='undefined'){search=searchState.outputElement()}addClass(search,"hidden");removeClass(main,"hidden");document.title=searchState.titleBeforeSearch;if(searchState.browserSupportsHistoryApi()){history.replaceState("",window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:function(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},putBackSearch:function(search_input){var search=searchState.outputElement();if(search_input.value!==""&&hasClass(search,"hidden")){searchState.showResults(search);if(searchState.browserSupportsHistoryApi()){var extra="?search="+encodeURIComponent(search_input.value);history.replaceState(search_input.value,"",getNakedUrl()+extra+window.location.hash)}document.title=searchState.title}},browserSupportsHistoryApi:function(){return window.history&&typeof window.history.pushState==="function"},setup:function(){var search_input=searchState.input;if(!searchState.input){return}function loadScript(url){var script=document.createElement('script');script.src=url;document.head.append(script)}var searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(window.searchJS);loadScript(window.searchIndexJS)}}search_input.addEventListener("focus",function(){searchState.putBackSearch(this);search_input.origPlaceholder=searchState.input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});search_input.addEventListener("blur",function(){search_input.placeholder=searchState.input.origPlaceholder});search_input.removeAttribute('disabled');searchState.addCrateDropdown(window.ALL_CRATES);var params=searchState.getQueryStringParams();if(params.search!==undefined){var search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search);loadSearch()}},addCrateDropdown:function(crates){var elem=document.getElementById("crate-search");if(!elem){return}var savedCrate=getSettingValue("saved-filter-crate");for(var i=0,len=crates.length;i0){return tmp}}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop=""}var toggleAllDocsId="toggle-all-docs";var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var elem;var search=searchState.outputElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){searchState.hideResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(searchState.browserSupportsHistoryApi()){history.replaceState(hash,"",getNakedUrl()+window.location.search+"#"+hash)}elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}expandSection(savedHash.slice(1))}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function getHelpElement(build){if(build){buildHelperPopup()}return document.getElementById("help")}function displayHelp(display,ev,help){if(display){help=help?help:getHelpElement(true);if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else{help=help?help:getHelpElement(false);if(help&&!hasClass(help,"hidden")){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}}function handleEscape(ev){var help=getHelpElement(false);var search=searchState.outputElement();if(help&&!hasClass(help,"hidden")){displayHelp(false,ev,help)}else if(search&&!hasClass(search,"hidden")){searchState.clearInputTimeout();ev.preventDefault();searchState.hideResults(search)}searchState.defocus();hideThemeButtonState()}var disableShortcuts=getSettingValue("disable-shortcuts")==="true";function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);ev.preventDefault();searchState.focus();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":displayHelp(true,ev);break;case"t":case"T":displayHelp(false,ev);ev.preventDefault();var themePicker=getThemePickerElement();themePicker.click();themePicker.focus();break;default:if(getThemePickerElement().parentNode.contains(ev.target)){handleThemeKeyDown(ev)}}}}function handleThemeKeyDown(ev){var active=document.activeElement;var themes=getThemesElement();switch(getVirtualKey(ev)){case"ArrowUp":ev.preventDefault();if(active.previousElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.previousElementSibling.focus()}else{showThemeButtonState();themes.lastElementChild.focus()}break;case"ArrowDown":ev.preventDefault();if(active.nextElementSibling&&ev.target.id!==THEME_PICKER_ELEMENT_ID){active.nextElementSibling.focus()}else{showThemeButtonState();themes.firstElementChild.focus()}break;case"Enter":case"Return":case"Space":if(ev.target.id===THEME_PICKER_ELEMENT_ID&&themes.style.display==="none"){ev.preventDefault();showThemeButtonState();themes.firstElementChild.focus()}break;case"Home":ev.preventDefault();themes.firstElementChild.focus();break;case"End":ev.preventDefault();themes.lastElementChild.focus();break}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);(function(){var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=window.rootPath.match(/\.\.\//g).length+1;for(i=0;i .in-band > .trait").textContent;var baseIdName="impl-"+traitName+"-";var libs=Object.getOwnPropertyNames(imp);for(var i=0,llength=libs.length;ithe rustdoc book.";var container=document.createElement("div");var shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["T","Focus the theme picker menu"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(function(x){return"
"+x[0].split(" ").map(function(y,index){return(index&1)===0?""+y+"":" "+y+" "}).join("")+"
"+x[1]+"
"}).join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

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

"+x+"

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

Search Tricks

"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);var rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";var rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc 1.58.0-nightly (ff0e14829 2021-10-31)";rustdoc_version.appendChild(rustdoc_version_code);container.appendChild(rustdoc_version);popup.appendChild(container);insertAfter(popup,searchState.outputElement());buildHelperPopup=function(){}};onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){var reset_button_timeout=null;window.copy_path=function(but){var parent=but.parentElement;var path=[];onEach(parent.childNodes,function(child){if(child.tagName==='A'){path.push(child.textContent)}});var el=document.createElement('textarea');el.value=path.join('::');el.setAttribute('readonly','');el.style.position='absolute';el.style.left='-9999px';document.body.appendChild(el);el.select();document.execCommand('copy');document.body.removeChild(el);but.children[0].style.display='none';var tmp;if(but.childNodes.length<2){tmp=document.createTextNode('✓');but.appendChild(tmp)}else{onEachLazy(but.childNodes,function(e){if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent='✓'}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent='';reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) -------------------------------------------------------------------------------- /docs/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ 2 | html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} -------------------------------------------------------------------------------- /docs/noscript.css: -------------------------------------------------------------------------------- 1 | #main .attributes{margin-left:0 !important;}#copy-path{display:none;} -------------------------------------------------------------------------------- /docs/rust-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/conradludgate/linked_list_rs/26ad109e6f4d14e5cc2c2ccb1f5fb497abcaa223/docs/rust-logo.png -------------------------------------------------------------------------------- /docs/search-index.js: -------------------------------------------------------------------------------- 1 | var searchIndex = JSON.parse('{\ 2 | "linked":{"doc":"A fairly straight forward but flexible implementation of a …","t":[3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,3,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["LinkedList","append","borrow","borrow_mut","clone","clone_into","default","drop","eq","extend","first","first_mut","fmt","from","from_iter","into","into_iter","is_empty","iter","iter","iter_mut","last","last_mut","len","new","pop_back","pop_front","push_back","push_front","to_owned","try_from","try_into","type_id","IntoIter","Iter","IterMut","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","from","from","from","into","into","into","into_iter","into_iter","into_iter","next","next","next","to_owned","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id"],"q":["linked","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","linked::iter","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["LinkedList is an implementation of a singly-linked-list.","Add one linked list to the end of this linked list","","","","","","","","","View the first value in the linked list. This is O(1)","Modify the first value in the linked list. This is O(1)","","","","","","Determine if this linked list is empty. This is an O(1) …","A set of iterator types for a LinkedList","Create an iter over this linked list","Create a mutable iter over this linked list","View the last value in the linked list. This is O(n)","Modify the last value in the linked list. This is O(n)","Get the length of the linked list. This is an O(n) …","Create a new empty linked list","Pop from the back of the linked list. This is O(n)","Pop from the front of the linked list. This is O(1)","Push to the back of the linked list. This is O(n)","Push to the front of the linked list. This is O(1)","","","","","Owned iterator of a LinkedList","Borrowed iterator of a LinkedList","Mutable iterator of a LinkedList","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,2,3,4,2,3,4,4,4,2,3,4,2,3,4,2,3,4,2,3,4,4,2,3,4,2,3,4,2,3,4],"f":[null,[[]],[[]],[[]],[[],["linkedlist",3]],[[]],[[]],[[]],[[["linkedlist",3]],["bool",15]],[[["intoiterator",8]]],[[],["option",4]],[[],["option",4]],[[["formatter",3]],["result",6]],[[]],[[["intoiterator",8]]],[[]],[[]],[[],["bool",15]],null,[[],["iter",3]],[[],["itermut",3]],[[],["option",4]],[[],["option",4]],[[],["usize",15]],[[]],[[],["option",4]],[[],["option",4]],[[]],[[]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[],["iter",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["option",4]],[[],["option",4]],[[],["option",4]],[[]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]]],"p":[[3,"LinkedList"],[3,"IntoIter"],[3,"IterMut"],[3,"Iter"]]}\ 3 | }'); 4 | if (window.initSearch) {window.initSearch(searchIndex)}; -------------------------------------------------------------------------------- /docs/search.js: -------------------------------------------------------------------------------- 1 | (function(){var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function printTab(nb){if(nb===0||nb===1||nb===2){searchState.currentTab=nb}var nb_copy=nb;onEachLazy(document.getElementById("titles").childNodes,function(elem){if(nb_copy===0){addClass(elem,"selected")}else{removeClass(elem,"selected")}nb_copy-=1});onEachLazy(document.getElementById("results").childNodes,function(elem){if(nb===0){addClass(elem,"active")}else{removeClass(elem,"active")}nb-=1})}function removeEmptyStringsFromArray(x){for(var i=0,len=x.length;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(hasOwnPropertyRustdoc(results,entry)){ar.push(results[entry])}}results=ar;var i,len,result;for(i=0,len=results.length;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});for(i=0,len=results.length;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function checkGenerics(obj,val){var tmp_lev,elem_name;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=Object.create(null);var elength=obj[GENERICS_DATA].length;for(var x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>0){var elems=Object.create(null);len=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length!==0){tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}}}else if(literalSearch){if((!val.generics||val.generics.length===0)&&obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){return obj[GENERICS_DATA].some(function(gen){return gen[NAME]===val.name})}return false}lev_distance=Math.min(levenshtein(obj[NAME],val.name),lev_distance);if(lev_distance<=MAX_LEV_DISTANCE){lev_distance=Math.ceil((checkGenerics(obj,val)+lev_distance)/2)}if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(var x=0,len=ret.length;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(!aborted){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,}}function handleAliases(ret,query,filterCrates){var aliases=[];var crateAliases=[];if(filterCrates!==undefined){if(ALIASES[filterCrates]&&ALIASES[filterCrates][query.search]){var query_aliases=ALIASES[filterCrates][query.search];var len=query_aliases.length;for(var i=0;iMAX_RESULTS){ret.others.pop()}};onEach(aliases,pushFunc);onEach(crateAliases,pushFunc)}var nSearchWords=searchWords.length;var i,it;var ty;var fullId;var returned;var in_args;var len;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0,len=inputs.length;i1?paths.length-1:1);var lev,j;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=ty.id;if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||ty.normalizedName.indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=ty.normalizedName.indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)){lev+=1}else{lev=MAX_LEV_DISTANCE+1}}in_args=findArg(ty,valGenerics,false,typeFilter);returned=checkReturned(ty,valGenerics,false,typeFilter);lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(typePassesFilter(typeFilter,ty.ty)&&(index!==-1||lev<=MAX_LEV_DISTANCE)){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results,false),};handleAliases(ret,query,filterCrates);return ret}function validateResult(name,path,keys,parent){for(var i=0,len=keys.length;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function nextTab(direction){var next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){var target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#titles > button").item(searchState.currentTab);if(target){target.focus()}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=window.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=window.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=window.rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var enumNameIdx=item.path.lastIndexOf("::");var enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=window.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=window.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraClass="";if(display===true){extraClass=" active"}var output=document.createElement("div");var duplicates={};var length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(function(item){if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}var name=item.name;var type=itemTypes[item.ty];length+=1;var extra="";if(type==="primitive"){extra=" (primitive type)"}else if(type==="keyword"){extra=" (keyword)"}var link=document.createElement("a");link.className="result-"+type;link.href=item.href;var wrapper=document.createElement("div");var resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){var alias=document.createElement("span");alias.className="alias";var bold=document.createElement("b");bold.innerText=item.alias;alias.appendChild(bold);alias.insertAdjacentHTML("beforeend"," - see ");resultName.appendChild(alias)}resultName.insertAdjacentHTML("beforeend",item.displayPath+""+name+extra+"");wrapper.appendChild(resultName);var description=document.createElement("div");description.className="desc";var spanDesc=document.createElement("span");spanDesc.insertAdjacentHTML("beforeend",item.desc);description.appendChild(spanDesc);wrapper.appendChild(description);link.appendChild(wrapper);output.appendChild(link)})}else{output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

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

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

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
";var resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;search.appendChild(resultsElem);searchState.focusedByTab=[null,null,null];searchState.showResults(search);var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0,len=positions.length;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0,arrays_len=arrays.length;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}function tokenizeQuery(raw){var i,matched;var l=raw.length;var depth=0;var nextAngle=/(<|>)/g;var ret=[];var start=0;for(i=0;i'){depth+=1}break;case">":if(depth>0){depth-=1}break;case",":if(depth===0){ret.push(raw.substring(start,i));start=i+1}break}}if(start!==i){ret.push(raw.substring(start,i))}return ret}var queries=tokenizeQuery(query.raw);var results={"in_args":[],"returned":[],"others":[],};for(var i=0,len=queries.length;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return undefined}function search(e,forced){var params=searchState.getQueryStringParams();var query=getQuery(searchState.input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(!forced&&query.id===currentResults){if(query.query.length>0){searchState.putBackSearch(searchState.input)}return}searchState.title="Results for "+query.query+" - Rust";if(searchState.browserSupportsHistoryApi()){var newURL=getNakedUrl()+"?search="+encodeURIComponent(query.raw)+window.location.hash;if(!history.state&&!params.search){history.pushState(query,"",newURL)}else{history.replaceState(query,"",newURL)}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates),params.go_to_first)}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i,word;var currentIndex=0;var id=0;for(var crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}var crateSize=0;searchWords.push(crate);var crateRow={crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),};id+=1;searchIndex.push(crateRow);currentIndex+=1;var itemTypes=rawSearchIndex[crate].t;var itemNames=rawSearchIndex[crate].n;var itemPaths=rawSearchIndex[crate].q;var itemDescs=rawSearchIndex[crate].d;var itemParentIdxs=rawSearchIndex[crate].i;var itemFunctionSearchTypes=rawSearchIndex[crate].f;var paths=rawSearchIndex[crate].p;var aliases=rawSearchIndex[crate].a;var len=paths.length;for(i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:itemFunctionSearchTypes[i],id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){ALIASES[crate]={};var j,local_aliases;for(var alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}if(!hasOwnPropertyRustdoc(ALIASES[crate],alias_name)){ALIASES[crate][alias_name]=[]}local_aliases=aliases[alias_name];for(j=0,len=local_aliases.length;j0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=function(){var qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}index=buildIndex(rawSearchIndex);registerSearchEvents();if(searchState.getQueryStringParams().search){search()}};if(window.searchIndex!==undefined){initSearch(window.searchIndex)}})() -------------------------------------------------------------------------------- /docs/settings.css: -------------------------------------------------------------------------------- 1 | .setting-line{padding:5px;position:relative;}.setting-line>div{display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{opacity:0;position:absolute;}.select-wrapper{float:right;position:relative;height:27px;min-width:25%;}.select-wrapper select{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:none;border:2px solid #ccc;padding-right:28px;width:100%;}.select-wrapper img{pointer-events:none;position:absolute;right:0;bottom:0;background:#ccc;height:100%;width:28px;padding:0px 4px;}.select-wrapper select option{color:initial;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} -------------------------------------------------------------------------------- /docs/settings.html: -------------------------------------------------------------------------------- 1 | Rustdoc settings

Rustdoc settings

Theme preferences
Use system theme
Preferred dark theme
Preferred light theme
2 |
Auto-hide item contents for large items.
Auto-hide item methods' documentation
Auto-hide trait implementation documentation
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
3 | 4 | -------------------------------------------------------------------------------- /docs/settings.js: -------------------------------------------------------------------------------- 1 | (function(){function changeSetting(settingName,value){updateLocalStorage("rustdoc-"+settingName,value);switch(settingName){case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function setEvents(){onEachLazy(document.getElementsByClassName("slider"),function(elem){var toggle=elem.previousElementSibling;var settingId=toggle.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(document.getElementsByClassName("select-wrapper"),function(elem){var select=elem.getElementsByTagName("select")[0];var settingId=select.id;var settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}})}window.addEventListener("DOMContentLoaded",setEvents)})() -------------------------------------------------------------------------------- /docs/source-files.js: -------------------------------------------------------------------------------- 1 | var N = null;var sourcesIndex = {}; 2 | sourcesIndex["linked"] = {"name":"","files":["iter.rs","lib.rs"]}; 3 | createSourceSidebar(); 4 | -------------------------------------------------------------------------------- /docs/source-script.js: -------------------------------------------------------------------------------- 1 | (function(){function getCurrentFilePath(){var parts=window.location.pathname.split("/");var rootPathParts=window.rootPath.split("/");for(var i=0,len=rootPathParts.length;i"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(!window.rootPath.endsWith("/")){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild);var selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}var lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(scrollTo,match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(tocur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",function(){var match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(false,match)}});onEachLazy(document.getElementsByClassName("line-numbers"),function(el){el.addEventListener("click",handleSourceHighlight)});highlightSourceLines(true);window.createSourceSidebar=createSourceSidebar})() -------------------------------------------------------------------------------- /docs/src/linked/iter.rs.html: -------------------------------------------------------------------------------- 1 | iter.rs - source
 1
  2 |  2
  3 |  3
  4 |  4
  5 |  5
  6 |  6
  7 |  7
  8 |  8
  9 |  9
 10 | 10
 11 | 11
 12 | 12
 13 | 13
 14 | 14
 15 | 15
 16 | 16
 17 | 17
 18 | 18
 19 | 19
 20 | 20
 21 | 21
 22 | 22
 23 | 23
 24 | 24
 25 | 25
 26 | 26
 27 | 27
 28 | 28
 29 | 29
 30 | 30
 31 | 31
 32 | 32
 33 | 33
 34 | 34
 35 | 35
 36 | 36
 37 | 37
 38 | 38
 39 | 39
 40 | 40
 41 | 41
 42 | 42
 43 | 43
 44 | 44
 45 | 45
 46 | 46
 47 | 47
 48 | 48
 49 | 49
 50 | 50
 51 | 51
 52 | 52
 53 | 53
 54 | 54
 55 | 55
 56 | 56
 57 | 57
 58 | 58
 59 | 59
 60 | 60
 61 | 61
 62 | 62
 63 | 63
 64 | 64
 65 | 65
 66 | 66
 67 | 67
 68 | 68
 69 | 69
 70 | 70
 71 | 71
 72 | 72
 73 | 73
 74 | 74
 75 | 75
 76 | 76
 77 | 77
 78 | 78
 79 | 79
 80 | 80
 81 | 81
 82 | 82
 83 | 83
 84 | 84
 85 | 85
 86 | 86
 87 | 87
 88 | 88
 89 | 89
 90 | 90
 91 | 91
 92 | 92
 93 | 93
 94 | 
//! A set of iterator types for a [`LinkedList`]
 95 | 
 96 | use std::{iter::FusedIterator, ptr::NonNull};
 97 | 
 98 | use crate::{LinkedList, Node};
 99 | 
100 | impl<T> IntoIterator for LinkedList<T> {
101 |     type IntoIter = IntoIter<T>;
102 |     type Item = T;
103 |     fn into_iter(self) -> Self::IntoIter {
104 |         IntoIter(self)
105 |     }
106 | }
107 | 
108 | /// Owned iterator of a [`LinkedList`]
109 | pub struct IntoIter<T>(pub(crate) LinkedList<T>);
110 | 
111 | impl<T> FusedIterator for IntoIter<T> {}
112 | 
113 | impl<T> Iterator for IntoIter<T> {
114 |     type Item = T;
115 | 
116 |     fn next(&mut self) -> Option<Self::Item> {
117 |         self.0.pop_front()
118 |     }
119 | }
120 | 
121 | impl<'a, T> IntoIterator for &'a LinkedList<T> {
122 |     type IntoIter = Iter<'a, T>;
123 |     type Item = &'a T;
124 |     fn into_iter(self) -> Self::IntoIter {
125 |         Iter(&self.0)
126 |     }
127 | }
128 | 
129 | /// Borrowed iterator of a [`LinkedList`]
130 | #[derive(Clone)]
131 | pub struct Iter<'a, T>(pub(crate) &'a Option<NonNull<Node<T>>>);
132 | 
133 | impl<'a, T> Iterator for Iter<'a, T> {
134 |     type Item = &'a T;
135 | 
136 |     fn next(&mut self) -> Option<Self::Item> {
137 |         self.0.map(|node| unsafe {
138 |             let node = node.as_ref();
139 |             self.0 = &node.next.0;
140 |             &node.value
141 |         })
142 |     }
143 | }
144 | 
145 | impl<'a, T> IntoIterator for &'a mut LinkedList<T> {
146 |     type IntoIter = IterMut<'a, T>;
147 |     type Item = &'a mut T;
148 |     fn into_iter(self) -> Self::IntoIter {
149 |         IterMut(&mut self.0)
150 |     }
151 | }
152 | 
153 | /// Mutable iterator of a [`LinkedList`]
154 | pub struct IterMut<'a, T>(pub(crate) &'a mut Option<NonNull<Node<T>>>);
155 | 
156 | impl<'a, T> Iterator for IterMut<'a, T> {
157 |     type Item = &'a mut T;
158 | 
159 |     fn next(&mut self) -> Option<Self::Item> {
160 |         self.0.map(|mut node| unsafe {
161 |             let node = node.as_mut();
162 |             self.0 = &mut node.next.0;
163 |             &mut node.value
164 |         })
165 |     }
166 | }
167 | 
168 | #[cfg(test)]
169 | mod tests {
170 |     use crate::LinkedList;
171 | 
172 |     #[test]
173 |     fn iter() {
174 |         let ll = LinkedList::from_iter([1, 2, 3]);
175 | 
176 |         assert_eq!(ll.iter().cloned().collect::<Vec<_>>(), vec![1, 2, 3]);
177 |     }
178 | 
179 |     #[test]
180 |     fn iter_mut() {
181 |         let mut ll = LinkedList::from_iter([1, 2, 3]);
182 |         ll.iter_mut().for_each(|i| *i *= 2);
183 | 
184 |         assert_eq!(ll.into_iter().collect::<Vec<_>>(), [2, 4, 6]);
185 |     }
186 | }
187 | 
188 |
189 | 190 | -------------------------------------------------------------------------------- /docs/storage.js: -------------------------------------------------------------------------------- 1 | var resourcesSuffix="";var darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");window.mainTheme=document.getElementById("mainThemeStyle");var settingsDataset=(function(){var settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}var dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){var current=getCurrentValue('rustdoc-'+settingName);if(current!==null){return current}if(settingsDataset!==null){var def=settingsDataset[settingName.replace(/-/g,'_')];if(def!==undefined){return def}}return null}var localStoredTheme=getSettingValue("theme");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;var i;if(reversed){for(i=length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(i=0;i=0){updateLocalStorage("rustdoc-preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchTheme(window.currentTheme,window.mainTheme,getSettingValue("theme")||"light",false)} -------------------------------------------------------------------------------- /docs/toggle-minus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/toggle-plus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/wheel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/iter.rs: -------------------------------------------------------------------------------- 1 | //! A set of iterator types for a [`LinkedList`] 2 | 3 | use super::{LinkedList, Node}; 4 | 5 | impl IntoIterator for LinkedList { 6 | type IntoIter = IntoIter; 7 | type Item = T; 8 | fn into_iter(self) -> Self::IntoIter { 9 | IntoIter(self) 10 | } 11 | } 12 | 13 | /// Owned iterator of a [`LinkedList`] 14 | pub struct IntoIter(LinkedList); 15 | 16 | impl Iterator for IntoIter { 17 | type Item = T; 18 | 19 | fn next(&mut self) -> Option { 20 | self.0.pop_front() 21 | } 22 | } 23 | 24 | impl<'a, T> IntoIterator for &'a LinkedList { 25 | type IntoIter = Iter<'a, T>; 26 | type Item = &'a T; 27 | fn into_iter(self) -> Self::IntoIter { 28 | Iter(&self.0) 29 | } 30 | } 31 | 32 | /// Borrowed iterator of a [`LinkedList`] 33 | #[derive(Clone)] 34 | pub struct Iter<'a, T: 'a>(&'a *const Node); 35 | 36 | /// New. 37 | pub fn new_iter<'a, T: 'a>(list: &'a *const Node) -> Iter<'a, T> { 38 | Iter(list) 39 | } 40 | 41 | impl<'a, T> Iterator for Iter<'a, T> 42 | where 43 | T: 'a, 44 | { 45 | type Item = &'a T; 46 | 47 | fn next(&mut self) -> Option { 48 | if self.0.is_null() { 49 | return None; 50 | } 51 | let node = self.0; 52 | unsafe { 53 | let node = &**node; 54 | self.0 = &node.next.0; 55 | Some(&node.value) 56 | } 57 | } 58 | } 59 | 60 | impl<'a, T> IntoIterator for &'a mut LinkedList { 61 | type IntoIter = IterMut<'a, T>; 62 | type Item = &'a mut T; 63 | fn into_iter(self) -> Self::IntoIter { 64 | IterMut(&mut self.0) 65 | } 66 | } 67 | 68 | /// Mutable iterator of a [`LinkedList`] 69 | pub struct IterMut<'a, T: 'a>(&'a mut *const Node); 70 | 71 | /// New. 72 | pub fn new_iter_mut<'a, T: 'a>(list: &'a mut *const Node) -> IterMut<'a, T> { 73 | IterMut(list) 74 | } 75 | 76 | impl<'a, T> Iterator for IterMut<'a, T> 77 | where 78 | T: 'a, 79 | { 80 | type Item = &'a mut T; 81 | 82 | fn next(&mut self) -> Option { 83 | if self.0.is_null() { 84 | return None; 85 | } 86 | 87 | let node = *self.0 as *mut Node; 88 | unsafe { 89 | let node = &mut *node; 90 | self.0 = &mut node.next.0; 91 | Some(&mut node.value) 92 | } 93 | } 94 | } 95 | 96 | #[cfg(test)] 97 | mod tests { 98 | use std::iter::FromIterator; 99 | 100 | use super::super::LinkedList; 101 | 102 | #[test] 103 | fn iter() { 104 | let ll = LinkedList::from_iter(vec![1, 2, 3]); 105 | 106 | assert_eq!(ll.iter().cloned().collect::>(), vec![1, 2, 3]); 107 | } 108 | 109 | #[test] 110 | fn iter_mut() { 111 | let mut ll = LinkedList::from_iter(vec![1, 2, 3]); 112 | ll.iter_mut().for_each(|i| *i *= 2); 113 | 114 | assert_eq!(ll.into_iter().collect::>(), [2, 4, 6]); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | //! A fairly straight forward but flexible implementation of a Linked List. 2 | //! No reason to use this over the standard libraries implementation though. 3 | 4 | #![deny(missing_docs)] 5 | #![allow(bad_code)] 6 | 7 | pub mod iter; 8 | 9 | use iter::{Iter, IterMut}; 10 | use node::Node; 11 | use std::fmt::Debug; 12 | use std::iter::FromIterator; 13 | 14 | // `Node` needs to be `pub` because of fun errors. 15 | mod node { 16 | #[derive(Debug, Clone)] 17 | pub struct Node { 18 | pub next: super::LinkedList, 19 | pub value: T, 20 | } 21 | } 22 | 23 | impl Node { 24 | fn new(value: T) -> Self { 25 | Node { 26 | next: LinkedList::new(), 27 | value: value, 28 | } 29 | } 30 | } 31 | 32 | /// `LinkedList` is an implementation of a singly-linked-list. 33 | #[derive(Clone)] 34 | pub struct LinkedList(*const Node); 35 | 36 | impl LinkedList { 37 | /// Create a new empty linked list 38 | pub fn new() -> Self { 39 | LinkedList(std::ptr::null()) 40 | } 41 | 42 | /** 43 | * @author Conrad Ludgate 44 | * @author Nils "Borrow Stack" Not in the 45 | * @author 522 46 | * @version 0.1.0 47 | * @since 0.1.0 48 | * @param self The linked list 49 | * @return usize The length of the list 50 | * @throws Rust.Std.Math.OverflowError if the length of the list is over a usize 51 | */ 52 | pub fn len(&self) -> usize { 53 | // We need volatile here to make sure the compiler doesn't optimize it out. 54 | unsafe { std::ptr::read_volatile(std::ptr::null::()) }; 55 | unreachable!(); 56 | } 57 | 58 | /// Determine if this linked list is empty. 59 | /// This is an O(1) computation 60 | pub fn is_empty(&self) -> bool { 61 | !self.0.is_null() 62 | } 63 | 64 | /// Push to the front of the linked list. 65 | /// This is O(1) 66 | /// 67 | /// ``` 68 | /// # use linked::LinkedList; 69 | /// let mut ll = LinkedList::new(); 70 | /// ll.push_front(1); 71 | /// ll.push_front(2); 72 | /// assert_eq!(ll, LinkedList::from_iter([2, 1])) 73 | /// ``` 74 | pub fn push_front(&mut self, value: T) { 75 | let node = Box::into_raw(Box::new(Node::new(value))); 76 | unsafe { 77 | (*node).next = std::mem::replace(self, LinkedList(node)); 78 | } 79 | } 80 | 81 | /// Pop from the front of the linked list. 82 | /// This is O(1) 83 | /// 84 | /// ``` 85 | /// # use linked::LinkedList; 86 | /// let mut ll = LinkedList::from_iter([1, 2]); 87 | /// assert_eq!(ll.pop_front(), Some(1)); 88 | /// assert_eq!(ll.pop_front(), Some(2)); 89 | /// assert_eq!(ll.pop_front(), None); 90 | /// ``` 91 | pub fn pop_front(&mut self) -> Option { 92 | if self.0.is_null() { 93 | return None; 94 | } 95 | let node = self.0; 96 | unsafe { 97 | let node = Box::from_raw(node as *mut Node); 98 | *self = LinkedList((*node).next.0); 99 | Some(node.value) 100 | } 101 | } 102 | 103 | /// View the first value in the linked list. 104 | /// This is O(1) 105 | pub fn first(&self) -> Option<&T> { 106 | if self.0.is_null() { 107 | return None; 108 | } 109 | 110 | let node = self.0; 111 | 112 | unsafe { Some(&(*node).value) } 113 | } 114 | 115 | /// Modify the first value in the linked list. 116 | /// This is O(1) 117 | pub fn first_mut(&mut self) -> Option<&mut T> { 118 | if self.0.is_null() { 119 | return None; 120 | } 121 | 122 | let node = self.0 as *mut Node; 123 | 124 | unsafe { Some(&mut (*node).value) } 125 | } 126 | 127 | fn last_node_mut(&mut self) -> &mut Self { 128 | if self.0.is_null() { 129 | return self; 130 | } 131 | 132 | let node = self.0 as *mut Node; 133 | unsafe { (*node).next.last_node_mut() } 134 | } 135 | 136 | /// View the last value in the linked list. 137 | /// This is O(n) 138 | pub fn last(&self) -> Option<&T> { 139 | if self.0.is_null() { 140 | return None; 141 | } 142 | 143 | let node = self.0; 144 | unsafe { 145 | let node = &*node; 146 | Some(node.next.last().unwrap_or(&node.value)) 147 | } 148 | } 149 | 150 | /// Modify the last value in the linked list. 151 | /// This is O(n) 152 | pub fn last_mut(&mut self) -> Option<&mut T> { 153 | if self.0.is_null() { 154 | return None; 155 | } 156 | 157 | let node = self.0 as *mut Node; 158 | unsafe { 159 | let node = &mut *node; 160 | Some(node.next.last_mut().unwrap_or(&mut node.value)) 161 | } 162 | } 163 | 164 | /// Push to the back of the linked list. 165 | /// This is O(n) 166 | /// 167 | /// ``` 168 | /// # use linked::LinkedList; 169 | /// let mut ll = LinkedList::new(); 170 | /// ll.push_back(1); 171 | /// ll.push_back(2); 172 | /// assert_eq!(ll, LinkedList::from_iter([1, 2])) 173 | /// ``` 174 | pub fn push_back(&mut self, value: T) { 175 | self.extend(Some(value)); 176 | } 177 | 178 | /// Pop from the back of the linked list. 179 | /// This is O(n) 180 | /// 181 | /// ``` 182 | /// # use linked::LinkedList; 183 | /// let mut ll = LinkedList::from_iter([1, 2]); 184 | /// assert_eq!(ll.pop_back(), Some(2)); 185 | /// assert_eq!(ll.pop_back(), Some(1)); 186 | /// assert_eq!(ll.pop_back(), None); 187 | /// ``` 188 | pub fn pop_back(&mut self) -> Option { 189 | let node = std::mem::replace(&mut self.0, std::ptr::null()); 190 | if node.is_null() { 191 | return None; 192 | } 193 | 194 | let mut node = unsafe { Box::from_raw(node as *mut Node) }; 195 | match node.next.pop_back() { 196 | Some(t) => { 197 | self.0 = Box::into_raw(node); 198 | Some(t) 199 | } 200 | None => Some(node.value), 201 | } 202 | } 203 | 204 | /// Create an iter over this linked list 205 | /// 206 | /// ``` 207 | /// # use linked::LinkedList; 208 | /// let mut ll = LinkedList::from_iter([1, 2, 3]); 209 | /// assert_eq!(ll.iter().cloned().collect::>(), vec![1, 2, 3]); 210 | /// ``` 211 | pub fn iter<'a>(&'a self) -> Iter<'a, T> { 212 | iter::new_iter(&self.0) 213 | } 214 | 215 | /// Create a mutable iter over this linked list 216 | /// 217 | /// ``` 218 | /// # use linked::LinkedList; 219 | /// let mut ll = LinkedList::from_iter([1, 2, 3]); 220 | /// ll.iter_mut().for_each(|i| *i *= 2); 221 | /// assert_eq!(ll, LinkedList::from_iter([2, 4, 6])); 222 | /// ``` 223 | pub fn iter_mut<'a>(&'a mut self) -> IterMut<'a, T> { 224 | iter::new_iter_mut(&mut self.0) 225 | } 226 | 227 | /// Add one linked list to the end of this linked list 228 | /// 229 | /// ``` 230 | /// # use linked::LinkedList; 231 | /// let mut ll = LinkedList::from_iter(0..3); 232 | /// ll.append(LinkedList::from_iter(3..6)); 233 | /// 234 | /// assert_eq!(ll, LinkedList::from_iter(0..6)); 235 | /// ``` 236 | pub fn append(&mut self, other: Self) { 237 | *self.last_node_mut() = other; 238 | } 239 | } 240 | 241 | impl Debug for LinkedList { 242 | fn fmt<'a>(&self, f: &mut std::fmt::Formatter<'a>) -> std::fmt::Result { 243 | f.debug_list().entries(self.iter()).finish() 244 | } 245 | } 246 | 247 | impl FromIterator for LinkedList { 248 | fn from_iter>(iter: I) -> Self { 249 | let mut head = LinkedList::new(); 250 | head.extend(iter); 251 | head 252 | } 253 | } 254 | 255 | impl Extend for LinkedList { 256 | fn extend>(&mut self, iter: I) { 257 | let mut end = self.last_node_mut(); 258 | for v in iter { 259 | let node = Box::into_raw(Box::new(Node::new(v))); 260 | end.0 = node; 261 | end = unsafe { &mut (*node).next }; 262 | } 263 | } 264 | } 265 | 266 | impl Default for LinkedList { 267 | fn default() -> Self { 268 | LinkedList(std::ptr::null()) 269 | } 270 | } 271 | 272 | impl PartialEq> for LinkedList 273 | where 274 | T: PartialEq, 275 | { 276 | fn eq(&self, other: &LinkedList) -> bool { 277 | match (self.0.is_null(), other.0.is_null()) { 278 | (true, true) => true, 279 | (false, false) => unsafe { (&*self.0).eq(&*other.0) }, 280 | _ => false, 281 | } 282 | } 283 | } 284 | 285 | impl PartialEq> for Node 286 | where 287 | T: PartialEq, 288 | { 289 | fn eq(&self, other: &Node) -> bool { 290 | self.value == other.value && self.next == other.next 291 | } 292 | } 293 | 294 | impl Drop for LinkedList { 295 | fn drop(&mut self) { 296 | if self.0.is_null() { 297 | return; 298 | } 299 | let node = self.0; 300 | unsafe { Box::from_raw(node as *mut Node) }; 301 | } 302 | } 303 | 304 | #[cfg(test)] 305 | mod tests { 306 | use std::fmt::Debug; 307 | 308 | use super::LinkedList; 309 | 310 | #[test] 311 | fn push() { 312 | let mut ll = LinkedList::new(); 313 | 314 | ll.push_front(1); 315 | ll.push_front(2); 316 | ll.push_front(3); 317 | 318 | assert_eq!(ll.len(), 3); 319 | 320 | assert_eq!(ll.pop_front(), Some(3)); 321 | assert_eq!(ll.pop_front(), Some(2)); 322 | assert_eq!(ll.pop_front(), Some(1)); 323 | 324 | assert_eq!(ll.len(), 0); 325 | 326 | assert_eq!(ll.pop_front(), None); 327 | assert_eq!(ll.len(), 0); 328 | } 329 | 330 | #[test] 331 | fn debug() { 332 | let mut ll = LinkedList::new(); 333 | assert_eq!(format!("{:?}", ll), "[]"); 334 | 335 | ll.extend(vec![1, 2, 3]); 336 | 337 | assert_eq!(format!("{:?}", ll), "[1, 2, 3]"); 338 | 339 | assert_eq!( 340 | format!("{:#?}", ll), 341 | r"[ 342 | 1, 343 | 2, 344 | 3, 345 | ]" 346 | ); 347 | } 348 | 349 | struct DropCheck(T, Box); 350 | impl Drop for DropCheck { 351 | fn drop(&mut self) { 352 | self.1() 353 | } 354 | } 355 | impl Debug for DropCheck { 356 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 357 | write!(f, "{:?}", self.0) 358 | } 359 | } 360 | 361 | #[test] 362 | fn drop_check() { 363 | let td = testdrop::TestDrop::new(); 364 | let ll: LinkedList<_> = (0..10).map(|_| td.new_item().1).collect(); 365 | 366 | assert_eq!(td.num_tracked_items(), 10); 367 | assert_eq!(td.num_dropped_items(), 0); 368 | 369 | drop(ll); 370 | 371 | assert_eq!(td.num_dropped_items(), 10); 372 | } 373 | } 374 | --------------------------------------------------------------------------------