From 091d408a87d0f73f1c4e0166849ca9a566f005e0 Mon Sep 17 00:00:00 2001 From: johannst Date: Wed, 15 Nov 2023 21:40:27 +0000 Subject: deploy: f52d556e0e1bf2350b3b42cff198550a267ceb0b --- .lock | 0 COPYRIGHT.txt | 46 - FiraSans-LICENSE.txt | 94 -- FiraSans-Medium.woff2 | Bin 132780 -> 0 bytes FiraSans-Regular.woff2 | Bin 129188 -> 0 bytes LICENSE-APACHE.txt | 201 ----- LICENSE-MIT.txt | 23 - NanumBarunGothic-LICENSE.txt | 99 --- NanumBarunGothic.ttf.woff2 | Bin 399468 -> 0 bytes SourceCodePro-It.ttf.woff2 | Bin 44896 -> 0 bytes SourceCodePro-LICENSE.txt | 93 -- SourceCodePro-Regular.ttf.woff2 | Bin 52228 -> 0 bytes SourceCodePro-Semibold.ttf.woff2 | Bin 52348 -> 0 bytes SourceSerif4-Bold.ttf.woff2 | Bin 81320 -> 0 bytes SourceSerif4-It.ttf.woff2 | Bin 59860 -> 0 bytes SourceSerif4-LICENSE.md | 93 -- SourceSerif4-Regular.ttf.woff2 | Bin 76180 -> 0 bytes ayu.css | 1 - clipboard.svg | 1 - dark.css | 1 - down-arrow.svg | 1 - favicon-16x16.png | Bin 715 -> 0 bytes favicon-32x32.png | Bin 1125 -> 0 bytes favicon.svg | 24 - help.html | 1 + implementors/core/convert/trait.AsMut.js | 6 +- implementors/core/convert/trait.AsRef.js | 6 +- implementors/core/convert/trait.Into.js | 6 +- implementors/core/default/trait.Default.js | 6 +- implementors/core/fmt/trait.Debug.js | 6 +- implementors/core/fmt/trait.Display.js | 6 +- implementors/core/marker/trait.Freeze.js | 6 +- implementors/core/marker/trait.Send.js | 6 +- implementors/core/marker/trait.Sync.js | 6 +- implementors/core/marker/trait.Unpin.js | 6 +- implementors/core/ops/drop/trait.Drop.js | 6 +- .../core/panic/unwind_safe/trait.RefUnwindSafe.js | 6 +- .../core/panic/unwind_safe/trait.UnwindSafe.js | 6 +- kvm_rs/all.html | 9 +- kvm_rs/cap/enum.CapBool.html | 37 +- kvm_rs/cap/enum.CapInt.html | 39 +- kvm_rs/cap/index.html | 19 +- kvm_rs/cap/sidebar-items.js | 2 +- kvm_rs/index.html | 20 +- kvm_rs/kvm/index.html | 14 +- kvm_rs/kvm/sidebar-items.js | 2 +- kvm_rs/kvm/struct.Kvm.html | 41 +- kvm_rs/kvm_sys/index.html | 13 +- kvm_rs/kvm_sys/sidebar-items.js | 2 +- kvm_rs/kvm_sys/struct.kvm_debugregs.html | 43 +- kvm_rs/kvm_sys/struct.kvm_dtable.html | 40 +- kvm_rs/kvm_sys/struct.kvm_regs.html | 72 +- kvm_rs/kvm_sys/struct.kvm_segment.html | 58 +- kvm_rs/kvm_sys/struct.kvm_sregs.html | 52 +- kvm_rs/sidebar-items.js | 2 +- kvm_rs/struct.PhysAddr.html | 31 +- kvm_rs/struct.UserMem.html | 43 +- kvm_rs/vcpu/enum.KvmExit.html | 43 +- kvm_rs/vcpu/index.html | 16 +- kvm_rs/vcpu/sidebar-items.js | 2 +- kvm_rs/vcpu/struct.Vcpu.html | 61 +- kvm_rs/vm/index.html | 14 +- kvm_rs/vm/sidebar-items.js | 2 +- kvm_rs/vm/struct.Vm.html | 41 +- kvm_rs/x86_64/constant.CR0_AM.html | 14 +- kvm_rs/x86_64/constant.CR0_CD.html | 12 +- kvm_rs/x86_64/constant.CR0_EM.html | 12 +- kvm_rs/x86_64/constant.CR0_ET.html | 12 +- kvm_rs/x86_64/constant.CR0_MP.html | 12 +- kvm_rs/x86_64/constant.CR0_NE.html | 12 +- kvm_rs/x86_64/constant.CR0_NW.html | 12 +- kvm_rs/x86_64/constant.CR0_PE.html | 12 +- kvm_rs/x86_64/constant.CR0_PG.html | 14 +- kvm_rs/x86_64/constant.CR0_TS.html | 12 +- kvm_rs/x86_64/constant.CR0_WP.html | 12 +- kvm_rs/x86_64/constant.CR3_PAGE_BASE_MASK.html | 12 +- kvm_rs/x86_64/constant.CR3_PCD.html | 12 +- kvm_rs/x86_64/constant.CR3_PWT.html | 12 +- kvm_rs/x86_64/constant.CR4_LA57.html | 12 +- kvm_rs/x86_64/constant.CR4_PAE.html | 12 +- kvm_rs/x86_64/constant.EFER_LMA.html | 12 +- kvm_rs/x86_64/constant.EFER_LME.html | 12 +- kvm_rs/x86_64/constant.MSR_EFER.html | 12 +- kvm_rs/x86_64/constant.PAGE_ENTRY_PRESENT.html | 12 +- kvm_rs/x86_64/constant.PAGE_ENTRY_RW.html | 12 +- kvm_rs/x86_64/constant.RFLAGS_AC.html | 12 +- kvm_rs/x86_64/constant.RFLAGS_AF.html | 12 +- kvm_rs/x86_64/constant.RFLAGS_CF.html | 12 +- kvm_rs/x86_64/constant.RFLAGS_DF.html | 12 +- kvm_rs/x86_64/constant.RFLAGS_IF.html | 12 +- kvm_rs/x86_64/constant.RFLAGS_IOPL.html | 12 +- kvm_rs/x86_64/constant.RFLAGS_OF.html | 12 +- kvm_rs/x86_64/constant.RFLAGS_PF.html | 12 +- kvm_rs/x86_64/constant.RFLAGS_SF.html | 12 +- kvm_rs/x86_64/constant.RFLAGS_TF.html | 12 +- kvm_rs/x86_64/constant.RFLAGS_ZF.html | 12 +- kvm_rs/x86_64/constant.SEG_SELECTOR_INDEX.html | 12 +- kvm_rs/x86_64/constant.SEG_SELECTOR_RPL.html | 12 +- kvm_rs/x86_64/constant.SEG_SELECTOR_TI.html | 12 +- kvm_rs/x86_64/fn.rflags_ac.html | 10 +- kvm_rs/x86_64/fn.rflags_af.html | 10 +- kvm_rs/x86_64/fn.rflags_cf.html | 10 +- kvm_rs/x86_64/fn.rflags_df.html | 10 +- kvm_rs/x86_64/fn.rflags_if.html | 10 +- kvm_rs/x86_64/fn.rflags_iopl.html | 10 +- kvm_rs/x86_64/fn.rflags_of.html | 10 +- kvm_rs/x86_64/fn.rflags_pf.html | 10 +- kvm_rs/x86_64/fn.rflags_sf.html | 10 +- kvm_rs/x86_64/fn.rflags_tf.html | 10 +- kvm_rs/x86_64/fn.rflags_zf.html | 10 +- kvm_rs/x86_64/fn.seg_selector_index.html | 10 +- kvm_rs/x86_64/fn.seg_selector_rpl.html | 10 +- kvm_rs/x86_64/fn.seg_selector_ti.html | 10 +- kvm_rs/x86_64/index.html | 49 +- kvm_rs/x86_64/sidebar-items.js | 2 +- light.css | 1 - main.js | 8 - normalize.css | 2 - noscript.css | 1 - rust-logo.svg | 61 -- rustdoc.css | 1 - search-index.js | 2 +- search.js | 1 - settings.css | 1 - settings.html | 9 +- settings.js | 11 - source-files.js | 3 - source-script.js | 1 - src-files.js | 4 + src/kvm_rs/cap.rs.html | 124 ++- src/kvm_rs/fmt.rs.html | 450 +++++----- src/kvm_rs/kvm.rs.html | 256 +++--- src/kvm_rs/kvm_sys.rs.html | 962 ++++++++++----------- src/kvm_rs/lib.rs.html | 568 ++++++------ src/kvm_rs/vcpu.rs.html | 716 ++++++++------- src/kvm_rs/vm.rs.html | 254 +++--- src/kvm_rs/x86_64.rs.html | 608 +++++++------ static.files/COPYRIGHT-23e9bde6c69aea69.txt | 50 ++ static.files/FiraSans-LICENSE-db4b642586e02d97.txt | 98 +++ .../FiraSans-Medium-8f9a781e4970d388.woff2 | Bin 0 -> 132780 bytes .../FiraSans-Regular-018c141bf0843ffd.woff2 | Bin 0 -> 129188 bytes static.files/LICENSE-APACHE-b91fa81cba47b86a.txt | 201 +++++ static.files/LICENSE-MIT-65090b722b3f6c56.txt | 23 + .../NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 | Bin 0 -> 399468 bytes .../NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt | 103 +++ .../SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 | Bin 0 -> 44896 bytes .../SourceCodePro-LICENSE-d180d465a756484a.txt | 97 +++ ...ourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 | Bin 0 -> 52228 bytes ...urceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 | Bin 0 -> 52348 bytes .../SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 | Bin 0 -> 81540 bytes .../SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 | Bin 0 -> 59716 bytes .../SourceSerif4-LICENSE-3bb119e13b1258b7.md | 98 +++ ...SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 | Bin 0 -> 76260 bytes static.files/ayu-fd19013d6ce078bf.css | 1 + static.files/clipboard-7571035ce49a181d.svg | 1 + static.files/dark-0a43001d3fc2282c.css | 1 + static.files/favicon-16x16-8b506e7a72182f1c.png | Bin 0 -> 715 bytes static.files/favicon-2c020d218678b618.svg | 24 + static.files/favicon-32x32-422f7d1d52889060.png | Bin 0 -> 1125 bytes static.files/light-1596385f77d47ef2.css | 1 + static.files/main-0795b7d26be81095.js | 12 + static.files/normalize-76eba96aa4d2e634.css | 2 + static.files/noscript-cffde32267a19fd6.css | 1 + static.files/rust-logo-151179464ae7ed46.svg | 61 ++ static.files/rustdoc-cb6f1f67f1bcd037.css | 8 + static.files/scrape-examples-ef1e698c1d417c0c.js | 1 + static.files/search-6dfdfced5eff6596.js | 5 + static.files/settings-8c76f75bfb6bd192.css | 3 + static.files/settings-de11bff964e9d4e5.js | 17 + static.files/src-script-3280b574d94e47b4.js | 1 + static.files/storage-db41da1a38ea3cb8.js | 1 + static.files/wheel-7b819b6101059cd0.svg | 1 + storage.js | 1 - toggle-minus.svg | 1 - toggle-plus.svg | 1 - wheel.svg | 1 - 176 files changed, 3137 insertions(+), 3811 deletions(-) mode change 100755 => 100644 .lock delete mode 100644 COPYRIGHT.txt delete mode 100644 FiraSans-LICENSE.txt delete mode 100644 FiraSans-Medium.woff2 delete mode 100644 FiraSans-Regular.woff2 delete mode 100644 LICENSE-APACHE.txt delete mode 100644 LICENSE-MIT.txt delete mode 100644 NanumBarunGothic-LICENSE.txt delete mode 100644 NanumBarunGothic.ttf.woff2 delete mode 100644 SourceCodePro-It.ttf.woff2 delete mode 100644 SourceCodePro-LICENSE.txt delete mode 100644 SourceCodePro-Regular.ttf.woff2 delete mode 100644 SourceCodePro-Semibold.ttf.woff2 delete mode 100644 SourceSerif4-Bold.ttf.woff2 delete mode 100644 SourceSerif4-It.ttf.woff2 delete mode 100644 SourceSerif4-LICENSE.md delete mode 100644 SourceSerif4-Regular.ttf.woff2 delete mode 100644 ayu.css delete mode 100644 clipboard.svg delete mode 100644 dark.css delete mode 100644 down-arrow.svg delete mode 100644 favicon-16x16.png delete mode 100644 favicon-32x32.png delete mode 100644 favicon.svg create mode 100644 help.html delete mode 100644 light.css delete mode 100644 main.js delete mode 100644 normalize.css delete mode 100644 noscript.css delete mode 100644 rust-logo.svg delete mode 100644 rustdoc.css delete mode 100644 search.js delete mode 100644 settings.css delete mode 100644 settings.js delete mode 100644 source-files.js delete mode 100644 source-script.js create mode 100644 src-files.js create mode 100644 static.files/COPYRIGHT-23e9bde6c69aea69.txt create mode 100644 static.files/FiraSans-LICENSE-db4b642586e02d97.txt create mode 100644 static.files/FiraSans-Medium-8f9a781e4970d388.woff2 create mode 100644 static.files/FiraSans-Regular-018c141bf0843ffd.woff2 create mode 100644 static.files/LICENSE-APACHE-b91fa81cba47b86a.txt create mode 100644 static.files/LICENSE-MIT-65090b722b3f6c56.txt create mode 100644 static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 create mode 100644 static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt create mode 100644 static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 create mode 100644 static.files/SourceCodePro-LICENSE-d180d465a756484a.txt create mode 100644 static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 create mode 100644 static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 create mode 100644 static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 create mode 100644 static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 create mode 100644 static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md create mode 100644 static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 create mode 100644 static.files/ayu-fd19013d6ce078bf.css create mode 100644 static.files/clipboard-7571035ce49a181d.svg create mode 100644 static.files/dark-0a43001d3fc2282c.css create mode 100644 static.files/favicon-16x16-8b506e7a72182f1c.png create mode 100644 static.files/favicon-2c020d218678b618.svg create mode 100644 static.files/favicon-32x32-422f7d1d52889060.png create mode 100644 static.files/light-1596385f77d47ef2.css create mode 100644 static.files/main-0795b7d26be81095.js create mode 100644 static.files/normalize-76eba96aa4d2e634.css create mode 100644 static.files/noscript-cffde32267a19fd6.css create mode 100644 static.files/rust-logo-151179464ae7ed46.svg create mode 100644 static.files/rustdoc-cb6f1f67f1bcd037.css create mode 100644 static.files/scrape-examples-ef1e698c1d417c0c.js create mode 100644 static.files/search-6dfdfced5eff6596.js create mode 100644 static.files/settings-8c76f75bfb6bd192.css create mode 100644 static.files/settings-de11bff964e9d4e5.js create mode 100644 static.files/src-script-3280b574d94e47b4.js create mode 100644 static.files/storage-db41da1a38ea3cb8.js create mode 100644 static.files/wheel-7b819b6101059cd0.svg delete mode 100644 storage.js delete mode 100644 toggle-minus.svg delete mode 100644 toggle-plus.svg delete mode 100644 wheel.svg diff --git a/.lock b/.lock old mode 100755 new mode 100644 diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt deleted file mode 100644 index 34e4813..0000000 --- a/COPYRIGHT.txt +++ /dev/null @@ -1,46 +0,0 @@ -These documentation pages include resources by third parties. This copyright -file applies only to those resources. The following third party resources are -included, and carry their own copyright notices and license terms: - -* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): - - Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ - with Reserved Font Name Fira Sans. - - Copyright (c) 2014, Telefonica S.A. - - Licensed under the SIL Open Font License, Version 1.1. - See FiraSans-LICENSE.txt. - -* rustdoc.css, main.js, and playpen.js: - - Copyright 2015 The Rust Developers. - Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or - the MIT license (LICENSE-MIT.txt) at your option. - -* normalize.css: - - Copyright (c) Nicolas Gallagher and Jonathan Neal. - Licensed under the MIT license (see LICENSE-MIT.txt). - -* Source Code Pro (SourceCodePro-Regular.ttf.woff2, - SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): - - Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), - with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark - of Adobe Systems Incorporated in the United States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceCodePro-LICENSE.txt. - -* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, - SourceSerif4-It.ttf.woff2): - - 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. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceSerif4-LICENSE.md. - -This copyright file is intended to be distributed with rustdoc output. diff --git a/FiraSans-LICENSE.txt b/FiraSans-LICENSE.txt deleted file mode 100644 index ff9afab..0000000 --- a/FiraSans-LICENSE.txt +++ /dev/null @@ -1,94 +0,0 @@ -Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. -with Reserved Font Name < Fira >, - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/FiraSans-Medium.woff2 b/FiraSans-Medium.woff2 deleted file mode 100644 index 7a1e5fc..0000000 Binary files a/FiraSans-Medium.woff2 and /dev/null differ diff --git a/FiraSans-Regular.woff2 b/FiraSans-Regular.woff2 deleted file mode 100644 index e766e06..0000000 Binary files a/FiraSans-Regular.woff2 and /dev/null differ diff --git a/LICENSE-APACHE.txt b/LICENSE-APACHE.txt deleted file mode 100644 index 16fe87b..0000000 --- a/LICENSE-APACHE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/LICENSE-MIT.txt b/LICENSE-MIT.txt deleted file mode 100644 index 31aa793..0000000 --- a/LICENSE-MIT.txt +++ /dev/null @@ -1,23 +0,0 @@ -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/NanumBarunGothic-LICENSE.txt b/NanumBarunGothic-LICENSE.txt deleted file mode 100644 index 0bf4668..0000000 --- a/NanumBarunGothic-LICENSE.txt +++ /dev/null @@ -1,99 +0,0 @@ -Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), - -with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, -NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, -Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, -NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, -Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/NanumBarunGothic.ttf.woff2 b/NanumBarunGothic.ttf.woff2 deleted file mode 100644 index 1866ad4..0000000 Binary files a/NanumBarunGothic.ttf.woff2 and /dev/null differ diff --git a/SourceCodePro-It.ttf.woff2 b/SourceCodePro-It.ttf.woff2 deleted file mode 100644 index 462c34e..0000000 Binary files a/SourceCodePro-It.ttf.woff2 and /dev/null differ diff --git a/SourceCodePro-LICENSE.txt b/SourceCodePro-LICENSE.txt deleted file mode 100644 index 0754257..0000000 --- a/SourceCodePro-LICENSE.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/SourceCodePro-Regular.ttf.woff2 b/SourceCodePro-Regular.ttf.woff2 deleted file mode 100644 index 10b558e..0000000 Binary files a/SourceCodePro-Regular.ttf.woff2 and /dev/null differ diff --git a/SourceCodePro-Semibold.ttf.woff2 b/SourceCodePro-Semibold.ttf.woff2 deleted file mode 100644 index 5ec64ee..0000000 Binary files a/SourceCodePro-Semibold.ttf.woff2 and /dev/null differ diff --git a/SourceSerif4-Bold.ttf.woff2 b/SourceSerif4-Bold.ttf.woff2 deleted file mode 100644 index db57d21..0000000 Binary files a/SourceSerif4-Bold.ttf.woff2 and /dev/null differ diff --git a/SourceSerif4-It.ttf.woff2 b/SourceSerif4-It.ttf.woff2 deleted file mode 100644 index 1cbc021..0000000 Binary files a/SourceSerif4-It.ttf.woff2 and /dev/null differ diff --git a/SourceSerif4-LICENSE.md b/SourceSerif4-LICENSE.md deleted file mode 100644 index 68ea189..0000000 --- a/SourceSerif4-LICENSE.md +++ /dev/null @@ -1,93 +0,0 @@ -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. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/SourceSerif4-Regular.ttf.woff2 b/SourceSerif4-Regular.ttf.woff2 deleted file mode 100644 index 2db73fe..0000000 Binary files a/SourceSerif4-Regular.ttf.woff2 and /dev/null differ diff --git a/ayu.css b/ayu.css deleted file mode 100644 index a9c9be0..0000000 --- a/ayu.css +++ /dev/null @@ -1 +0,0 @@ - body,#settings-menu #settings,#settings-menu #settings::before{background-color:#0f1419;color:#c5c5c5;}.setting-line .radio-line input{border-color:#c5c5c5;}.setting-line .radio-line input:checked{box-shadow:inset 0 0 0 3px #0f1419;background-color:#ffb454;}.setting-line .radio-line input:focus{box-shadow:0 0 1px 1px #ffb454;}.setting-line .radio-line input:checked:focus{box-shadow:inset 0 0 0 3px 0f1419,0 0 2px 2px #ffb454;}.setting-line .radio-line input:hover{border-color:#ffb454 !important;}.slider{background-color:#ccc;}.slider:before{background-color:white;}input:checked+.slider{background-color:#ffb454;}input:focus+.slider{box-shadow:0 0 0 2px #0a84ff,0 0 0 6px rgba(10,132,255,0.3);}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,.mobile-topbar,.sidebar-menu-toggle{background-color:#14191f;}.rust-logo{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 #24292f;}.sidebar{scrollbar-color:#5c6773 #24292f;}::-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,.sidebar a:hover{background-color:transparent;color:#ffb44c;}.source .sidebar{background-color:#14191f;}.sidebar-elems .location{color:#ff7733;}.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:#ffa0a5;}.content span.union,.content a.union{color:#ffa0a5;}.content span.constant,.content a.constant,.content span.static,.content a.static{color:#39AFD7;}.content span.primitive,.content a.primitive{color:#ffa0a5;}.content span.traitalias,.content a.traitalias{color:#39AFD7;}.content span.keyword,.content a.keyword{color:#39AFD7;}.content span.externcrate,.content span.mod,.content a.mod{color:#39AFD7;}.content span.struct,.content a.struct{color:#ffa0a5;}.content span.enum,.content a.enum{color:#ffa0a5;}.content span.trait,.content a.trait{color:#39AFD7;}.content span.type,.content a.type{color:#39AFD7;}.content span.type,.content a.type,.block a.current.type{color:#39AFD7;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#39AFD7;}.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;}.sidebar a{color:#53b1db;}.sidebar a.current.type{color:#53b1db;}.sidebar a.current.associatedtype{color:#53b1db;}pre.rust .comment{color:#788797;}pre.rust .doccomment{color:#a1ac88;}nav.main .current{border-top-color:#5c6773;border-bottom-color:#5c6773;}nav.main .separator{border:1px solid #5c6773;}a{color:#39AFD7;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a{color:#c5c5c5;}.sidebar h2 a,.sidebar h3 a{color:white;}.search-results a{color:#0096cf;}body.source .example-wrap pre.rust a{background:#333;}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,.search-input{background-color:#141920;border-color:#424c57 !important;}.search-input{color:#ffffff;}.module-item .stab,.import-item .stab{color:#000;}.stab.empty-impl{}.stab.unstable,.stab.deprecated,.stab.portability,.stab.empty-impl{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;}.rightside,.out-of-band{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{background:rgba(255,236,164,0.06);border-right:3px solid rgba(255,180,76,0.85);}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.4);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.5);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.5);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#39AFD7;}.tooltip::after{background-color:#314559;color:#c5c5c5;border:1px solid #5c6773;}.tooltip::before{border-color:transparent #314559 transparent transparent;}.notable-traits-tooltiptext{background-color:#314559;border-color:#5c6773;}.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.typedef,.content a.typedef,.block a.current.typedef{}.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-associatedtype: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{}.sidebar a.current.enum{}.sidebar a.current.struct{}.sidebar a.current.foreigntype{}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{}.sidebar a.current.union{}.sidebar a.current.constant .sidebar a.current.static{}.sidebar a.current.primitive{}.sidebar a.current.externcrate .sidebar a.current.mod{}.sidebar a.current.trait{}.sidebar a.current.traitalias{}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{}.sidebar a.current.keyword{}@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:inset 0 -1px 0 #5c6773;}#settings-menu>a,#help-button{border-color:#5c6773;background-color:#0f1419;color:#fff;}#settings-menu>a img{filter:invert(100);}#settings-menu #settings,#settings-menu #settings::before{border-color:#5c6773;}#copy-path{color:#fff;}#copy-path>img{filter:invert(70%);}#copy-path:hover>img{filter:invert(100%);}#settings-menu>a:hover,#settings-menu>a: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);}.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;}.scraped-example-list .scrape-help{border-color:#aaa;color:#eee;}.scraped-example-list .scrape-help:hover{border-color:white;color:white;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.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:#999;}.toggle-line:hover .toggle-line-inner{background:#c5c5c5;} \ No newline at end of file diff --git a/clipboard.svg b/clipboard.svg deleted file mode 100644 index 8adbd99..0000000 --- a/clipboard.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/dark.css b/dark.css deleted file mode 100644 index d8bd200..0000000 --- a/dark.css +++ /dev/null @@ -1 +0,0 @@ -body,#settings-menu #settings,#settings-menu #settings::before{background-color:#353535;color:#ddd;}.setting-line .radio-line input{border-color:#ddd;}.setting-line .radio-line input:checked{box-shadow:inset 0 0 0 3px #353535;background-color:#2196f3;}.setting-line .radio-line input:focus{box-shadow:0 0 1px 1px #2196f3;}.setting-line .radio-line input:checked:focus{box-shadow:inset 0 0 0 3px #353535,0 0 2px 2px #2196f3;}.setting-line .radio-line input:hover{border-color:#2196f3 !important;}.slider{background-color:#ccc;}.slider:before{background-color:white;}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);}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,.mobile-topbar,.sidebar-menu-toggle{background-color:#505050;}.rust-logo{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) #5a5a5a;}::-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,.sidebar a:hover{background:#444;}.source .sidebar{background-color:#565656;}.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:#884719;}a.result-enum:focus{background-color:#194e9f;}a.result-struct:focus{background-color:#194e9f;}a.result-union:focus{background-color:#194e9f;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#4950ed;}a.result-type:focus{background-color:#194e9f;}a.result-associatedtype:focus{background-color:#884719;}a.result-foreigntype:focus{background-color:#194e9f;}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:#884719;}a.result-primitive:focus{background-color:#194e9f;}a.result-keyword:focus{background-color:#884719;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#2dbfb8;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#2dbfb8;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#D2991D;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#2dbfb8;}.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:#2dbfb8;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#D2991D;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2dbfb8;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#D2991D;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b78cf2;}.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:#D2991D;}.sidebar a{color:#fdbf35;}.sidebar a.current.enum{color:#12ece2;}.sidebar a.current.struct{color:#12ece2;}.sidebar a.current.type{color:#12ece2;}.sidebar a.current.associatedtype{color:#fdbf35;}.sidebar a.current.foreigntype{color:#12ece2;}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{color:#0be900;}.sidebar a.current.union{color:#12ece2;}.sidebar a.current.constant .sidebar a.current.static{color:#fdbf35;}.sidebar a.current.primitive{color:#12ece2;}.sidebar a.current.externcrate .sidebar a.current.mod{color:#fdbf35;}.sidebar a.current.trait{color:#cca7ff;}.sidebar a.current.traitalias{color:#cca7ff;}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{color:#32d479;}.sidebar a.current.keyword{color:#fdbf35;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#D2991D;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a{color:#ddd;}.search-results a{color:#ddd;}a.test-arrow{color:#dedede;}body.source .example-wrap pre.rust a{background:#333;}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,.search-input{color:#111;background-color:#f0f0f0;border-color:#f0f0f0 !important;}.search-input{border-color:#e0e0e0;}.search-input:focus{border-color:#008dfd;}.module-item .stab,.import-item .stab{color:#ddd;}.stab.empty-impl{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.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);}.rightside,.out-of-band{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{background-color:#494a3d;border-right:3px solid #bb7410;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.8);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.should_panic{border-left:2px solid rgba(255,0,0,.8);}pre.should_panic:hover,.information:hover+pre.should_panic{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.8);}.information>.compile_fail:hover{color:#f00;}.tooltip.should_panic{color:rgba(255,0,0,.8);}.information>.should_panic:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:#ff9200;}.search-failed a{color:#0089ff;}.tooltip::after{background-color:#000;color:#fff;border-color:#000;}.tooltip::before{border-color:transparent black transparent transparent;}.notable-traits-tooltiptext{background-color:#111;border-color:#777;}.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:inset 0 -1px 0 #c6cbd1;}#settings-menu>a,#help-button{border-color:#e0e0e0;background:#f0f0f0;color:#000;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button:hover,#help-button:focus{border-color:#ffb900;}#settings-menu #settings,#settings-menu #settings::before{border-color:#d2d2d2;}#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;}.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;}.scraped-example-list .scrape-help{border-color:#aaa;color:#eee;}.scraped-example-list .scrape-help:hover{border-color:white;color:white;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.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:#999;}.toggle-line:hover .toggle-line-inner{background:#c5c5c5;} \ No newline at end of file diff --git a/down-arrow.svg b/down-arrow.svg deleted file mode 100644 index 35437e7..0000000 --- a/down-arrow.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/favicon-16x16.png b/favicon-16x16.png deleted file mode 100644 index ea4b45c..0000000 Binary files a/favicon-16x16.png and /dev/null differ diff --git a/favicon-32x32.png b/favicon-32x32.png deleted file mode 100644 index 69b8613..0000000 Binary files a/favicon-32x32.png and /dev/null differ diff --git a/favicon.svg b/favicon.svg deleted file mode 100644 index 8b34b51..0000000 --- a/favicon.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/help.html b/help.html new file mode 100644 index 0000000..127479a --- /dev/null +++ b/help.html @@ -0,0 +1 @@ +Rustdoc help

Rustdoc help

Back
\ No newline at end of file diff --git a/implementors/core/convert/trait.AsMut.js b/implementors/core/convert/trait.AsMut.js index c20d62a..2fe4128 100644 --- a/implementors/core/convert/trait.AsMut.js +++ b/implementors/core/convert/trait.AsMut.js @@ -1,3 +1,3 @@ -(function() {var implementors = {}; -implementors["kvm_rs"] = [{"text":"impl AsMut<[u8]> for UserMem","synthetic":false,"types":["kvm_rs::UserMem"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file +(function() {var implementors = { +"kvm_rs":[["impl AsMut<[u8]> for UserMem"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/convert/trait.AsRef.js b/implementors/core/convert/trait.AsRef.js index cb1c6a5..f0fe80f 100644 --- a/implementors/core/convert/trait.AsRef.js +++ b/implementors/core/convert/trait.AsRef.js @@ -1,3 +1,3 @@ -(function() {var implementors = {}; -implementors["kvm_rs"] = [{"text":"impl AsRef<[u8]> for UserMem","synthetic":false,"types":["kvm_rs::UserMem"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file +(function() {var implementors = { +"kvm_rs":[["impl AsRef<[u8]> for UserMem"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/convert/trait.Into.js b/implementors/core/convert/trait.Into.js index aafe66a..a7aca58 100644 --- a/implementors/core/convert/trait.Into.js +++ b/implementors/core/convert/trait.Into.js @@ -1,3 +1,3 @@ -(function() {var implementors = {}; -implementors["kvm_rs"] = [{"text":"impl Into<u64> for CapBool","synthetic":false,"types":["kvm_rs::cap::CapBool"]},{"text":"impl Into<u64> for CapInt","synthetic":false,"types":["kvm_rs::cap::CapInt"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file +(function() {var implementors = { +"kvm_rs":[["impl Into<u64> for CapBool"],["impl Into<u64> for CapInt"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/default/trait.Default.js b/implementors/core/default/trait.Default.js index 5c16869..e3a9fdb 100644 --- a/implementors/core/default/trait.Default.js +++ b/implementors/core/default/trait.Default.js @@ -1,3 +1,3 @@ -(function() {var implementors = {}; -implementors["kvm_rs"] = [{"text":"impl Default for kvm_regs","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_regs"]},{"text":"impl Default for kvm_segment","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_segment"]},{"text":"impl Default for kvm_dtable","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_dtable"]},{"text":"impl Default for kvm_sregs","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_sregs"]},{"text":"impl Default for kvm_debugregs","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_debugregs"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file +(function() {var implementors = { +"kvm_rs":[["impl Default for kvm_sregs"],["impl Default for kvm_debugregs"],["impl Default for kvm_segment"],["impl Default for kvm_regs"],["impl Default for kvm_dtable"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/fmt/trait.Debug.js b/implementors/core/fmt/trait.Debug.js index 48a1c5a..3f828dd 100644 --- a/implementors/core/fmt/trait.Debug.js +++ b/implementors/core/fmt/trait.Debug.js @@ -1,3 +1,3 @@ -(function() {var implementors = {}; -implementors["kvm_rs"] = [{"text":"impl Debug for kvm_regs","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_regs"]},{"text":"impl Debug for kvm_segment","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_segment"]},{"text":"impl Debug for kvm_dtable","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_dtable"]},{"text":"impl Debug for kvm_sregs","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_sregs"]},{"text":"impl Debug for kvm_debugregs","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_debugregs"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file +(function() {var implementors = { +"kvm_rs":[["impl Debug for kvm_debugregs"],["impl Debug for kvm_regs"],["impl Debug for kvm_sregs"],["impl Debug for kvm_dtable"],["impl Debug for kvm_segment"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/fmt/trait.Display.js b/implementors/core/fmt/trait.Display.js index b640a01..9dd1320 100644 --- a/implementors/core/fmt/trait.Display.js +++ b/implementors/core/fmt/trait.Display.js @@ -1,3 +1,3 @@ -(function() {var implementors = {}; -implementors["kvm_rs"] = [{"text":"impl Display for kvm_regs","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_regs"]},{"text":"impl Display for kvm_segment","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_segment"]},{"text":"impl Display for kvm_dtable","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_dtable"]},{"text":"impl Display for kvm_sregs","synthetic":false,"types":["kvm_rs::kvm_sys::kvm_sregs"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file +(function() {var implementors = { +"kvm_rs":[["impl Display for kvm_regs"],["impl Display for kvm_dtable"],["impl Display for kvm_sregs"],["impl Display for kvm_segment"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Freeze.js b/implementors/core/marker/trait.Freeze.js index d2154b5..9817cbe 100644 --- a/implementors/core/marker/trait.Freeze.js +++ b/implementors/core/marker/trait.Freeze.js @@ -1,3 +1,3 @@ -(function() {var implementors = {}; -implementors["kvm_rs"] = [{"text":"impl Freeze for CapBool","synthetic":true,"types":["kvm_rs::cap::CapBool"]},{"text":"impl Freeze for CapInt","synthetic":true,"types":["kvm_rs::cap::CapInt"]},{"text":"impl Freeze for Kvm","synthetic":true,"types":["kvm_rs::kvm::Kvm"]},{"text":"impl Freeze for kvm_regs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_regs"]},{"text":"impl Freeze for kvm_segment","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_segment"]},{"text":"impl Freeze for kvm_dtable","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_dtable"]},{"text":"impl Freeze for kvm_sregs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_sregs"]},{"text":"impl Freeze for kvm_debugregs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_debugregs"]},{"text":"impl<'cpu> Freeze for KvmExit<'cpu>","synthetic":true,"types":["kvm_rs::vcpu::KvmExit"]},{"text":"impl Freeze for Vcpu","synthetic":true,"types":["kvm_rs::vcpu::Vcpu"]},{"text":"impl Freeze for Vm","synthetic":true,"types":["kvm_rs::vm::Vm"]},{"text":"impl Freeze for PhysAddr","synthetic":true,"types":["kvm_rs::PhysAddr"]},{"text":"impl Freeze for UserMem","synthetic":true,"types":["kvm_rs::UserMem"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file +(function() {var implementors = { +"kvm_rs":[["impl Freeze for CapBool",1,["kvm_rs::cap::CapBool"]],["impl Freeze for CapInt",1,["kvm_rs::cap::CapInt"]],["impl Freeze for Kvm",1,["kvm_rs::kvm::Kvm"]],["impl Freeze for kvm_regs",1,["kvm_rs::kvm_sys::kvm_regs"]],["impl Freeze for kvm_segment",1,["kvm_rs::kvm_sys::kvm_segment"]],["impl Freeze for kvm_dtable",1,["kvm_rs::kvm_sys::kvm_dtable"]],["impl Freeze for kvm_sregs",1,["kvm_rs::kvm_sys::kvm_sregs"]],["impl Freeze for kvm_debugregs",1,["kvm_rs::kvm_sys::kvm_debugregs"]],["impl<'cpu> Freeze for KvmExit<'cpu>",1,["kvm_rs::vcpu::KvmExit"]],["impl Freeze for Vcpu",1,["kvm_rs::vcpu::Vcpu"]],["impl Freeze for Vm",1,["kvm_rs::vm::Vm"]],["impl Freeze for PhysAddr",1,["kvm_rs::PhysAddr"]],["impl Freeze for UserMem",1,["kvm_rs::UserMem"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Send.js b/implementors/core/marker/trait.Send.js index 3ed21be..595578a 100644 --- a/implementors/core/marker/trait.Send.js +++ b/implementors/core/marker/trait.Send.js @@ -1,3 +1,3 @@ -(function() {var implementors = {}; -implementors["kvm_rs"] = [{"text":"impl Send for CapBool","synthetic":true,"types":["kvm_rs::cap::CapBool"]},{"text":"impl Send for CapInt","synthetic":true,"types":["kvm_rs::cap::CapInt"]},{"text":"impl Send for Kvm","synthetic":true,"types":["kvm_rs::kvm::Kvm"]},{"text":"impl Send for kvm_regs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_regs"]},{"text":"impl Send for kvm_segment","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_segment"]},{"text":"impl Send for kvm_dtable","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_dtable"]},{"text":"impl Send for kvm_sregs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_sregs"]},{"text":"impl Send for kvm_debugregs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_debugregs"]},{"text":"impl<'cpu> Send for KvmExit<'cpu>","synthetic":true,"types":["kvm_rs::vcpu::KvmExit"]},{"text":"impl !Send for Vcpu","synthetic":true,"types":["kvm_rs::vcpu::Vcpu"]},{"text":"impl Send for Vm","synthetic":true,"types":["kvm_rs::vm::Vm"]},{"text":"impl Send for PhysAddr","synthetic":true,"types":["kvm_rs::PhysAddr"]},{"text":"impl !Send for UserMem","synthetic":true,"types":["kvm_rs::UserMem"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file +(function() {var implementors = { +"kvm_rs":[["impl Send for CapBool",1,["kvm_rs::cap::CapBool"]],["impl Send for CapInt",1,["kvm_rs::cap::CapInt"]],["impl Send for Kvm",1,["kvm_rs::kvm::Kvm"]],["impl Send for kvm_regs",1,["kvm_rs::kvm_sys::kvm_regs"]],["impl Send for kvm_segment",1,["kvm_rs::kvm_sys::kvm_segment"]],["impl Send for kvm_dtable",1,["kvm_rs::kvm_sys::kvm_dtable"]],["impl Send for kvm_sregs",1,["kvm_rs::kvm_sys::kvm_sregs"]],["impl Send for kvm_debugregs",1,["kvm_rs::kvm_sys::kvm_debugregs"]],["impl<'cpu> Send for KvmExit<'cpu>",1,["kvm_rs::vcpu::KvmExit"]],["impl !Send for Vcpu",1,["kvm_rs::vcpu::Vcpu"]],["impl Send for Vm",1,["kvm_rs::vm::Vm"]],["impl Send for PhysAddr",1,["kvm_rs::PhysAddr"]],["impl !Send for UserMem",1,["kvm_rs::UserMem"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Sync.js b/implementors/core/marker/trait.Sync.js index 050d220..223e6ec 100644 --- a/implementors/core/marker/trait.Sync.js +++ b/implementors/core/marker/trait.Sync.js @@ -1,3 +1,3 @@ -(function() {var implementors = {}; -implementors["kvm_rs"] = [{"text":"impl Sync for CapBool","synthetic":true,"types":["kvm_rs::cap::CapBool"]},{"text":"impl Sync for CapInt","synthetic":true,"types":["kvm_rs::cap::CapInt"]},{"text":"impl Sync for Kvm","synthetic":true,"types":["kvm_rs::kvm::Kvm"]},{"text":"impl Sync for kvm_regs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_regs"]},{"text":"impl Sync for kvm_segment","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_segment"]},{"text":"impl Sync for kvm_dtable","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_dtable"]},{"text":"impl Sync for kvm_sregs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_sregs"]},{"text":"impl Sync for kvm_debugregs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_debugregs"]},{"text":"impl<'cpu> Sync for KvmExit<'cpu>","synthetic":true,"types":["kvm_rs::vcpu::KvmExit"]},{"text":"impl !Sync for Vcpu","synthetic":true,"types":["kvm_rs::vcpu::Vcpu"]},{"text":"impl Sync for Vm","synthetic":true,"types":["kvm_rs::vm::Vm"]},{"text":"impl Sync for PhysAddr","synthetic":true,"types":["kvm_rs::PhysAddr"]},{"text":"impl !Sync for UserMem","synthetic":true,"types":["kvm_rs::UserMem"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file +(function() {var implementors = { +"kvm_rs":[["impl Sync for CapBool",1,["kvm_rs::cap::CapBool"]],["impl Sync for CapInt",1,["kvm_rs::cap::CapInt"]],["impl Sync for Kvm",1,["kvm_rs::kvm::Kvm"]],["impl Sync for kvm_regs",1,["kvm_rs::kvm_sys::kvm_regs"]],["impl Sync for kvm_segment",1,["kvm_rs::kvm_sys::kvm_segment"]],["impl Sync for kvm_dtable",1,["kvm_rs::kvm_sys::kvm_dtable"]],["impl Sync for kvm_sregs",1,["kvm_rs::kvm_sys::kvm_sregs"]],["impl Sync for kvm_debugregs",1,["kvm_rs::kvm_sys::kvm_debugregs"]],["impl<'cpu> Sync for KvmExit<'cpu>",1,["kvm_rs::vcpu::KvmExit"]],["impl !Sync for Vcpu",1,["kvm_rs::vcpu::Vcpu"]],["impl Sync for Vm",1,["kvm_rs::vm::Vm"]],["impl Sync for PhysAddr",1,["kvm_rs::PhysAddr"]],["impl !Sync for UserMem",1,["kvm_rs::UserMem"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/marker/trait.Unpin.js b/implementors/core/marker/trait.Unpin.js index a2d6fb7..f90f83a 100644 --- a/implementors/core/marker/trait.Unpin.js +++ b/implementors/core/marker/trait.Unpin.js @@ -1,3 +1,3 @@ -(function() {var implementors = {}; -implementors["kvm_rs"] = [{"text":"impl Unpin for CapBool","synthetic":true,"types":["kvm_rs::cap::CapBool"]},{"text":"impl Unpin for CapInt","synthetic":true,"types":["kvm_rs::cap::CapInt"]},{"text":"impl Unpin for Kvm","synthetic":true,"types":["kvm_rs::kvm::Kvm"]},{"text":"impl Unpin for kvm_regs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_regs"]},{"text":"impl Unpin for kvm_segment","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_segment"]},{"text":"impl Unpin for kvm_dtable","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_dtable"]},{"text":"impl Unpin for kvm_sregs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_sregs"]},{"text":"impl Unpin for kvm_debugregs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_debugregs"]},{"text":"impl<'cpu> Unpin for KvmExit<'cpu>","synthetic":true,"types":["kvm_rs::vcpu::KvmExit"]},{"text":"impl Unpin for Vcpu","synthetic":true,"types":["kvm_rs::vcpu::Vcpu"]},{"text":"impl Unpin for Vm","synthetic":true,"types":["kvm_rs::vm::Vm"]},{"text":"impl Unpin for PhysAddr","synthetic":true,"types":["kvm_rs::PhysAddr"]},{"text":"impl Unpin for UserMem","synthetic":true,"types":["kvm_rs::UserMem"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file +(function() {var implementors = { +"kvm_rs":[["impl Unpin for CapBool",1,["kvm_rs::cap::CapBool"]],["impl Unpin for CapInt",1,["kvm_rs::cap::CapInt"]],["impl Unpin for Kvm",1,["kvm_rs::kvm::Kvm"]],["impl Unpin for kvm_regs",1,["kvm_rs::kvm_sys::kvm_regs"]],["impl Unpin for kvm_segment",1,["kvm_rs::kvm_sys::kvm_segment"]],["impl Unpin for kvm_dtable",1,["kvm_rs::kvm_sys::kvm_dtable"]],["impl Unpin for kvm_sregs",1,["kvm_rs::kvm_sys::kvm_sregs"]],["impl Unpin for kvm_debugregs",1,["kvm_rs::kvm_sys::kvm_debugregs"]],["impl<'cpu> Unpin for KvmExit<'cpu>",1,["kvm_rs::vcpu::KvmExit"]],["impl Unpin for Vcpu",1,["kvm_rs::vcpu::Vcpu"]],["impl Unpin for Vm",1,["kvm_rs::vm::Vm"]],["impl Unpin for PhysAddr",1,["kvm_rs::PhysAddr"]],["impl Unpin for UserMem",1,["kvm_rs::UserMem"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/ops/drop/trait.Drop.js b/implementors/core/ops/drop/trait.Drop.js index 196293a..858da32 100644 --- a/implementors/core/ops/drop/trait.Drop.js +++ b/implementors/core/ops/drop/trait.Drop.js @@ -1,3 +1,3 @@ -(function() {var implementors = {}; -implementors["kvm_rs"] = [{"text":"impl Drop for UserMem","synthetic":false,"types":["kvm_rs::UserMem"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file +(function() {var implementors = { +"kvm_rs":[["impl Drop for UserMem"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js b/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js index b9d02a4..3b98807 100644 --- a/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -1,3 +1,3 @@ -(function() {var implementors = {}; -implementors["kvm_rs"] = [{"text":"impl RefUnwindSafe for CapBool","synthetic":true,"types":["kvm_rs::cap::CapBool"]},{"text":"impl RefUnwindSafe for CapInt","synthetic":true,"types":["kvm_rs::cap::CapInt"]},{"text":"impl RefUnwindSafe for Kvm","synthetic":true,"types":["kvm_rs::kvm::Kvm"]},{"text":"impl RefUnwindSafe for kvm_regs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_regs"]},{"text":"impl RefUnwindSafe for kvm_segment","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_segment"]},{"text":"impl RefUnwindSafe for kvm_dtable","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_dtable"]},{"text":"impl RefUnwindSafe for kvm_sregs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_sregs"]},{"text":"impl RefUnwindSafe for kvm_debugregs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_debugregs"]},{"text":"impl<'cpu> RefUnwindSafe for KvmExit<'cpu>","synthetic":true,"types":["kvm_rs::vcpu::KvmExit"]},{"text":"impl RefUnwindSafe for Vcpu","synthetic":true,"types":["kvm_rs::vcpu::Vcpu"]},{"text":"impl RefUnwindSafe for Vm","synthetic":true,"types":["kvm_rs::vm::Vm"]},{"text":"impl RefUnwindSafe for PhysAddr","synthetic":true,"types":["kvm_rs::PhysAddr"]},{"text":"impl RefUnwindSafe for UserMem","synthetic":true,"types":["kvm_rs::UserMem"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file +(function() {var implementors = { +"kvm_rs":[["impl RefUnwindSafe for CapBool",1,["kvm_rs::cap::CapBool"]],["impl RefUnwindSafe for CapInt",1,["kvm_rs::cap::CapInt"]],["impl RefUnwindSafe for Kvm",1,["kvm_rs::kvm::Kvm"]],["impl RefUnwindSafe for kvm_regs",1,["kvm_rs::kvm_sys::kvm_regs"]],["impl RefUnwindSafe for kvm_segment",1,["kvm_rs::kvm_sys::kvm_segment"]],["impl RefUnwindSafe for kvm_dtable",1,["kvm_rs::kvm_sys::kvm_dtable"]],["impl RefUnwindSafe for kvm_sregs",1,["kvm_rs::kvm_sys::kvm_sregs"]],["impl RefUnwindSafe for kvm_debugregs",1,["kvm_rs::kvm_sys::kvm_debugregs"]],["impl<'cpu> RefUnwindSafe for KvmExit<'cpu>",1,["kvm_rs::vcpu::KvmExit"]],["impl RefUnwindSafe for Vcpu",1,["kvm_rs::vcpu::Vcpu"]],["impl RefUnwindSafe for Vm",1,["kvm_rs::vm::Vm"]],["impl RefUnwindSafe for PhysAddr",1,["kvm_rs::PhysAddr"]],["impl RefUnwindSafe for UserMem",1,["kvm_rs::UserMem"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/implementors/core/panic/unwind_safe/trait.UnwindSafe.js b/implementors/core/panic/unwind_safe/trait.UnwindSafe.js index 8714ad5..fd391ea 100644 --- a/implementors/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/implementors/core/panic/unwind_safe/trait.UnwindSafe.js @@ -1,3 +1,3 @@ -(function() {var implementors = {}; -implementors["kvm_rs"] = [{"text":"impl UnwindSafe for CapBool","synthetic":true,"types":["kvm_rs::cap::CapBool"]},{"text":"impl UnwindSafe for CapInt","synthetic":true,"types":["kvm_rs::cap::CapInt"]},{"text":"impl UnwindSafe for Kvm","synthetic":true,"types":["kvm_rs::kvm::Kvm"]},{"text":"impl UnwindSafe for kvm_regs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_regs"]},{"text":"impl UnwindSafe for kvm_segment","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_segment"]},{"text":"impl UnwindSafe for kvm_dtable","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_dtable"]},{"text":"impl UnwindSafe for kvm_sregs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_sregs"]},{"text":"impl UnwindSafe for kvm_debugregs","synthetic":true,"types":["kvm_rs::kvm_sys::kvm_debugregs"]},{"text":"impl<'cpu> !UnwindSafe for KvmExit<'cpu>","synthetic":true,"types":["kvm_rs::vcpu::KvmExit"]},{"text":"impl UnwindSafe for Vcpu","synthetic":true,"types":["kvm_rs::vcpu::Vcpu"]},{"text":"impl UnwindSafe for Vm","synthetic":true,"types":["kvm_rs::vm::Vm"]},{"text":"impl UnwindSafe for PhysAddr","synthetic":true,"types":["kvm_rs::PhysAddr"]},{"text":"impl UnwindSafe for UserMem","synthetic":true,"types":["kvm_rs::UserMem"]}]; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file +(function() {var implementors = { +"kvm_rs":[["impl UnwindSafe for CapBool",1,["kvm_rs::cap::CapBool"]],["impl UnwindSafe for CapInt",1,["kvm_rs::cap::CapInt"]],["impl UnwindSafe for Kvm",1,["kvm_rs::kvm::Kvm"]],["impl UnwindSafe for kvm_regs",1,["kvm_rs::kvm_sys::kvm_regs"]],["impl UnwindSafe for kvm_segment",1,["kvm_rs::kvm_sys::kvm_segment"]],["impl UnwindSafe for kvm_dtable",1,["kvm_rs::kvm_sys::kvm_dtable"]],["impl UnwindSafe for kvm_sregs",1,["kvm_rs::kvm_sys::kvm_sregs"]],["impl UnwindSafe for kvm_debugregs",1,["kvm_rs::kvm_sys::kvm_debugregs"]],["impl<'cpu> !UnwindSafe for KvmExit<'cpu>",1,["kvm_rs::vcpu::KvmExit"]],["impl UnwindSafe for Vcpu",1,["kvm_rs::vcpu::Vcpu"]],["impl UnwindSafe for Vm",1,["kvm_rs::vm::Vm"]],["impl UnwindSafe for PhysAddr",1,["kvm_rs::PhysAddr"]],["impl UnwindSafe for UserMem",1,["kvm_rs::UserMem"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/kvm_rs/all.html b/kvm_rs/all.html index 328a658..88b7466 100644 --- a/kvm_rs/all.html +++ b/kvm_rs/all.html @@ -1,8 +1 @@ -List of all items in this crate -
- \ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/kvm_rs/cap/enum.CapBool.html b/kvm_rs/cap/enum.CapBool.html index 0df131e..fb40efb 100644 --- a/kvm_rs/cap/enum.CapBool.html +++ b/kvm_rs/cap/enum.CapBool.html @@ -1,27 +1,16 @@ -CapBool in kvm_rs::cap - Rust -
#[repr(u64)]
-pub enum CapBool {
+CapBool in kvm_rs::cap - Rust

Enum kvm_rs::cap::CapBool

source ·
#[repr(u64)]
pub enum CapBool { CheckExtensionVm, -}
Expand description

Definition of capabilities that return a bool value indicating whether the capability is +}

Expand description

Definition of capabilities that return a bool value indicating whether the capability is supported or not.

-

Variants

CheckExtensionVm

Check if capabilities can be queried on VM fds (KVM_CAP_CHECK_EXTENSION_VM).

-

Trait Implementations

Converts this type into the (usually inferred) input type.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Variants§

§

CheckExtensionVm

Check if capabilities can be queried on VM fds (KVM_CAP_CHECK_EXTENSION_VM).

+

Trait Implementations§

source§

impl Into<u64> for CapBool

source§

fn into(self) -> u64

Converts this type into the (usually inferred) input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/kvm_rs/cap/enum.CapInt.html b/kvm_rs/cap/enum.CapInt.html index 4e4a7c2..ac2412a 100644 --- a/kvm_rs/cap/enum.CapInt.html +++ b/kvm_rs/cap/enum.CapInt.html @@ -1,29 +1,18 @@ -CapInt in kvm_rs::cap - Rust -
#[repr(u64)]
-pub enum CapInt {
+CapInt in kvm_rs::cap - Rust

Enum kvm_rs::cap::CapInt

source ·
#[repr(u64)]
pub enum CapInt { NrVcpus, MaxVcpus, -}
Expand description

Definition of capabilities that return an integer value indicating the amount of the queried +}

Expand description

Definition of capabilities that return an integer value indicating the amount of the queried capability.

-

Variants

NrVcpus

Get the recommended max VPCUs (KVM_CAP_NR_VCPUS).

-

MaxVcpus

Get the possible max VPCUs (KVM_CAP_MAX_VCPUS).

-

Trait Implementations

Converts this type into the (usually inferred) input type.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Variants§

§

NrVcpus

Get the recommended max VPCUs (KVM_CAP_NR_VCPUS).

+
§

MaxVcpus

Get the possible max VPCUs (KVM_CAP_MAX_VCPUS).

+

Trait Implementations§

source§

impl Into<u64> for CapInt

source§

fn into(self) -> u64

Converts this type into the (usually inferred) input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/kvm_rs/cap/index.html b/kvm_rs/cap/index.html index 71c61aa..514850f 100644 --- a/kvm_rs/cap/index.html +++ b/kvm_rs/cap/index.html @@ -1,15 +1,4 @@ -kvm_rs::cap - Rust -
-

Module kvm_rs::cap

source · []
Expand description

Definitions of KVM capabilities.

-

Enums

-

Definition of capabilities that return a bool value indicating whether the capability is -supported or not.

-

Definition of capabilities that return an integer value indicating the amount of the queried -capability.

-
- \ No newline at end of file +kvm_rs::cap - Rust

Module kvm_rs::cap

source ·
Expand description

Definitions of KVM capabilities.

+

Enums

  • Definition of capabilities that return a bool value indicating whether the capability is +supported or not.
  • Definition of capabilities that return an integer value indicating the amount of the queried +capability.
\ No newline at end of file diff --git a/kvm_rs/cap/sidebar-items.js b/kvm_rs/cap/sidebar-items.js index c1f8adc..514a3d3 100644 --- a/kvm_rs/cap/sidebar-items.js +++ b/kvm_rs/cap/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"enum":[["CapBool","Definition of capabilities that return a bool value indicating whether the capability is supported or not."],["CapInt","Definition of capabilities that return an integer value indicating the amount of the queried capability."]]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"enum":["CapBool","CapInt"]}; \ No newline at end of file diff --git a/kvm_rs/index.html b/kvm_rs/index.html index 1a587a7..eb0a421 100644 --- a/kvm_rs/index.html +++ b/kvm_rs/index.html @@ -1,19 +1 @@ -kvm_rs - Rust -
-

Crate kvm_rs

source · []

Modules

-

Definitions of KVM capabilities.

-

KVM system ioctls.

-

Definitions of the system header <linux/kvm.h>.

-

VCPU system ioctls.

-

VM system ioctls.

-

x86_64 flags and bitfields.

-

Structs

-

Strong type representing physical addresses.

-

Wrapper to safely allocate memory for guest VMs.

-
- \ No newline at end of file +kvm_rs - Rust

Crate kvm_rs

source ·

Modules

Structs

  • Strong type representing physical addresses.
  • Wrapper to safely allocate memory for guest VMs.
\ No newline at end of file diff --git a/kvm_rs/kvm/index.html b/kvm_rs/kvm/index.html index 3117741..21255ce 100644 --- a/kvm_rs/kvm/index.html +++ b/kvm_rs/kvm/index.html @@ -1,12 +1,2 @@ -kvm_rs::kvm - Rust -
-

Module kvm_rs::kvm

source · []
Expand description

KVM system ioctls.

-

Structs

-

Wrapper for /dev/kvm ioctls.

-
- \ No newline at end of file +kvm_rs::kvm - Rust

Module kvm_rs::kvm

source ·
Expand description

KVM system ioctls.

+

Structs

  • Wrapper for /dev/kvm ioctls.
\ No newline at end of file diff --git a/kvm_rs/kvm/sidebar-items.js b/kvm_rs/kvm/sidebar-items.js index 4a6a1e6..e8ecb95 100644 --- a/kvm_rs/kvm/sidebar-items.js +++ b/kvm_rs/kvm/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"struct":[["Kvm","Wrapper for `/dev/kvm` ioctls."]]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"struct":["Kvm"]}; \ No newline at end of file diff --git a/kvm_rs/kvm/struct.Kvm.html b/kvm_rs/kvm/struct.Kvm.html index 533acc4..5dc9c82 100644 --- a/kvm_rs/kvm/struct.Kvm.html +++ b/kvm_rs/kvm/struct.Kvm.html @@ -1,30 +1,21 @@ -Kvm in kvm_rs::kvm - Rust -
-

Struct kvm_rs::kvm::Kvm

source · []
pub struct Kvm { /* private fields */ }
Expand description

Wrapper for /dev/kvm ioctls.

+Kvm in kvm_rs::kvm - Rust

Struct kvm_rs::kvm::Kvm

source ·
pub struct Kvm { /* private fields */ }
Expand description

Wrapper for /dev/kvm ioctls.

Representation of the file descriptor obtained by opening /dev/kvm. This wrapper provides access to the system ioctls as described in KVM API.

-

Implementations

Open the /dev/kvm device.

-

Create a new virtual machine with the KVM_CREATE_VM ioctl. -Returns a wrapper vm::Vm representing the VM.

-

Check availability of an extension with the KVM_CHECK_EXTENSION +

Implementations§

source§

impl Kvm

source

pub fn new() -> Result<Kvm>

Open the /dev/kvm device.

+
source

pub fn create_vm(&self) -> Result<Vm>

Create a new virtual machine with the KVM_CREATE_VM ioctl. +Returns a wrapper vm::Vm representing the VM.

+
source

pub fn check_extenstion(&self, cap: CapBool) -> bool

Check availability of an extension with the KVM_CHECK_EXTENSION ioctl.

-

Check availability of an extension with the KVM_CHECK_EXTENSION +

source

pub fn check_extenstion_int(&self, cap: CapInt) -> i32

Check availability of an extension with the KVM_CHECK_EXTENSION ioctl.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Auto Trait Implementations§

§

impl RefUnwindSafe for Kvm

§

impl Send for Kvm

§

impl Sync for Kvm

§

impl Unpin for Kvm

§

impl UnwindSafe for Kvm

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/kvm_rs/kvm_sys/index.html b/kvm_rs/kvm_sys/index.html index 7686159..641a69d 100644 --- a/kvm_rs/kvm_sys/index.html +++ b/kvm_rs/kvm_sys/index.html @@ -1,11 +1,2 @@ -kvm_rs::kvm_sys - Rust -
-

Module kvm_rs::kvm_sys

source · []
Expand description

Definitions of the system header <linux/kvm.h>.

-

Structs

-
- \ No newline at end of file +kvm_rs::kvm_sys - Rust

Module kvm_rs::kvm_sys

source ·
Expand description

Definitions of the system header <linux/kvm.h>.

+

Structs

\ No newline at end of file diff --git a/kvm_rs/kvm_sys/sidebar-items.js b/kvm_rs/kvm_sys/sidebar-items.js index 51cc1de..d3bc6a0 100644 --- a/kvm_rs/kvm_sys/sidebar-items.js +++ b/kvm_rs/kvm_sys/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"struct":[["kvm_debugregs",""],["kvm_dtable",""],["kvm_regs",""],["kvm_segment",""],["kvm_sregs",""]]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"struct":["kvm_debugregs","kvm_dtable","kvm_regs","kvm_segment","kvm_sregs"]}; \ No newline at end of file diff --git a/kvm_rs/kvm_sys/struct.kvm_debugregs.html b/kvm_rs/kvm_sys/struct.kvm_debugregs.html index 7c9ea8e..f2a2466 100644 --- a/kvm_rs/kvm_sys/struct.kvm_debugregs.html +++ b/kvm_rs/kvm_sys/struct.kvm_debugregs.html @@ -1,28 +1,17 @@ -kvm_debugregs in kvm_rs::kvm_sys - Rust -
#[repr(C)]
pub struct kvm_debugregs { - pub db: [u64; 4], - pub dr6: u64, - pub dr7: u64, - pub flags: u64, - pub reserved: [u64; 9], -}

Fields

db: [u64; 4]dr6: u64dr7: u64flags: u64reserved: [u64; 9]

Trait Implementations

Formats the value using the given formatter. Read more

-

Returns the “default value” for a type. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+kvm_debugregs in kvm_rs::kvm_sys - Rust
#[repr(C)]
pub struct kvm_debugregs { + pub db: [u64; 4], + pub dr6: u64, + pub dr7: u64, + pub flags: u64, + pub reserved: [u64; 9], +}

Fields§

§db: [u64; 4]§dr6: u64§dr7: u64§flags: u64§reserved: [u64; 9]

Trait Implementations§

source§

impl Debug for kvm_debugregs

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for kvm_debugregs

source§

fn default() -> kvm_debugregs

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/kvm_rs/kvm_sys/struct.kvm_dtable.html b/kvm_rs/kvm_sys/struct.kvm_dtable.html index 78b1ce7..a8d5398 100644 --- a/kvm_rs/kvm_sys/struct.kvm_dtable.html +++ b/kvm_rs/kvm_sys/struct.kvm_dtable.html @@ -1,28 +1,16 @@ -kvm_dtable in kvm_rs::kvm_sys - Rust -
#[repr(C)]
pub struct kvm_dtable { - pub base: u64, - pub limit: u16, +kvm_dtable in kvm_rs::kvm_sys - Rust

Struct kvm_rs::kvm_sys::kvm_dtable

source ·
#[repr(C)]
pub struct kvm_dtable { + pub base: u64, + pub limit: u16, /* private fields */ -}

Fields

base: u64limit: u16

Trait Implementations

Formats the value using the given formatter. Read more

-

Returns the “default value” for a type. Read more

-

Formats the value using the given formatter. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+}

Fields§

§base: u64§limit: u16

Trait Implementations§

source§

impl Debug for kvm_dtable

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for kvm_dtable

source§

fn default() -> kvm_dtable

Returns the “default value” for a type. Read more
source§

impl Display for kvm_dtable

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Converts the given value to a String. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/kvm_rs/kvm_sys/struct.kvm_regs.html b/kvm_rs/kvm_sys/struct.kvm_regs.html index 5a067fc..203a4cb 100644 --- a/kvm_rs/kvm_sys/struct.kvm_regs.html +++ b/kvm_rs/kvm_sys/struct.kvm_regs.html @@ -1,43 +1,31 @@ -kvm_regs in kvm_rs::kvm_sys - Rust -
#[repr(C)]
pub struct kvm_regs {
Show 18 fields - pub rax: u64, - pub rbx: u64, - pub rcx: u64, - pub rdx: u64, - pub rsi: u64, - pub rdi: u64, - pub rsp: u64, - pub rbp: u64, - pub r8: u64, - pub r9: u64, - pub r10: u64, - pub r11: u64, - pub r12: u64, - pub r13: u64, - pub r14: u64, - pub r15: u64, - pub rip: u64, - pub rflags: u64, -
}

Fields

rax: u64rbx: u64rcx: u64rdx: u64rsi: u64rdi: u64rsp: u64rbp: u64r8: u64r9: u64r10: u64r11: u64r12: u64r13: u64r14: u64r15: u64rip: u64rflags: u64

Trait Implementations

Formats the value using the given formatter. Read more

-

Returns the “default value” for a type. Read more

-

Formats the value using the given formatter. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+kvm_regs in kvm_rs::kvm_sys - Rust

Struct kvm_rs::kvm_sys::kvm_regs

source ·
#[repr(C)]
pub struct kvm_regs {
Show 18 fields + pub rax: u64, + pub rbx: u64, + pub rcx: u64, + pub rdx: u64, + pub rsi: u64, + pub rdi: u64, + pub rsp: u64, + pub rbp: u64, + pub r8: u64, + pub r9: u64, + pub r10: u64, + pub r11: u64, + pub r12: u64, + pub r13: u64, + pub r14: u64, + pub r15: u64, + pub rip: u64, + pub rflags: u64, +
}

Fields§

§rax: u64§rbx: u64§rcx: u64§rdx: u64§rsi: u64§rdi: u64§rsp: u64§rbp: u64§r8: u64§r9: u64§r10: u64§r11: u64§r12: u64§r13: u64§r14: u64§r15: u64§rip: u64§rflags: u64

Trait Implementations§

source§

impl Debug for kvm_regs

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for kvm_regs

source§

fn default() -> kvm_regs

Returns the “default value” for a type. Read more
source§

impl Display for kvm_regs

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Converts the given value to a String. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/kvm_rs/kvm_sys/struct.kvm_segment.html b/kvm_rs/kvm_sys/struct.kvm_segment.html index db0768b..903d8a3 100644 --- a/kvm_rs/kvm_sys/struct.kvm_segment.html +++ b/kvm_rs/kvm_sys/struct.kvm_segment.html @@ -1,37 +1,25 @@ -kvm_segment in kvm_rs::kvm_sys - Rust -
#[repr(C)]
pub struct kvm_segment { - pub base: u64, - pub limit: u32, - pub selector: u16, - pub type_: u8, - pub present: u8, - pub dpl: u8, - pub db: u8, - pub s: u8, - pub l: u8, - pub g: u8, - pub avl: u8, +kvm_segment in kvm_rs::kvm_sys - Rust

Struct kvm_rs::kvm_sys::kvm_segment

source ·
#[repr(C)]
pub struct kvm_segment { + pub base: u64, + pub limit: u32, + pub selector: u16, + pub type_: u8, + pub present: u8, + pub dpl: u8, + pub db: u8, + pub s: u8, + pub l: u8, + pub g: u8, + pub avl: u8, /* private fields */ -}

Fields

base: u64limit: u32selector: u16type_: u8present: u8dpl: u8db: u8s: u8l: u8g: u8avl: u8

Trait Implementations

Formats the value using the given formatter. Read more

-

Returns the “default value” for a type. Read more

-

Formats the value using the given formatter. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+}

Fields§

§base: u64§limit: u32§selector: u16§type_: u8§present: u8§dpl: u8§db: u8§s: u8§l: u8§g: u8§avl: u8

Trait Implementations§

source§

impl Debug for kvm_segment

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for kvm_segment

source§

fn default() -> kvm_segment

Returns the “default value” for a type. Read more
source§

impl Display for kvm_segment

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Converts the given value to a String. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/kvm_rs/kvm_sys/struct.kvm_sregs.html b/kvm_rs/kvm_sys/struct.kvm_sregs.html index 5d0e2ec..01f26be 100644 --- a/kvm_rs/kvm_sys/struct.kvm_sregs.html +++ b/kvm_rs/kvm_sys/struct.kvm_sregs.html @@ -1,11 +1,4 @@ -kvm_sregs in kvm_rs::kvm_sys - Rust -
#[repr(C)]
pub struct kvm_sregs {
Show 18 fields +kvm_sregs in kvm_rs::kvm_sys - Rust

Struct kvm_rs::kvm_sys::kvm_sregs

source ·
#[repr(C)]
pub struct kvm_sregs {
Show 18 fields pub cs: kvm_segment, pub ds: kvm_segment, pub es: kvm_segment, @@ -16,28 +9,23 @@ pub ldt: kvm_segment, pub gdt: kvm_dtable, pub idt: kvm_dtable, - pub cr0: u64, - pub cr2: u64, - pub cr3: u64, - pub cr4: u64, - pub cr8: u64, - pub efer: u64, - pub apic_base: u64, - pub interrupt_bitmap: [u64; 4], -
}

Fields

cs: kvm_segmentds: kvm_segmentes: kvm_segmentfs: kvm_segmentgs: kvm_segmentss: kvm_segmenttr: kvm_segmentldt: kvm_segmentgdt: kvm_dtableidt: kvm_dtablecr0: u64cr2: u64cr3: u64cr4: u64cr8: u64efer: u64apic_base: u64interrupt_bitmap: [u64; 4]

Trait Implementations

Formats the value using the given formatter. Read more

-

Returns the “default value” for a type. Read more

-

Formats the value using the given formatter. Read more

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+ pub cr0: u64, + pub cr2: u64, + pub cr3: u64, + pub cr4: u64, + pub cr8: u64, + pub efer: u64, + pub apic_base: u64, + pub interrupt_bitmap: [u64; 4], +
}

Fields§

§cs: kvm_segment§ds: kvm_segment§es: kvm_segment§fs: kvm_segment§gs: kvm_segment§ss: kvm_segment§tr: kvm_segment§ldt: kvm_segment§gdt: kvm_dtable§idt: kvm_dtable§cr0: u64§cr2: u64§cr3: u64§cr4: u64§cr8: u64§efer: u64§apic_base: u64§interrupt_bitmap: [u64; 4]

Trait Implementations§

source§

impl Debug for kvm_sregs

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for kvm_sregs

source§

fn default() -> kvm_sregs

Returns the “default value” for a type. Read more
source§

impl Display for kvm_sregs

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

Converts the given value to a String. Read more

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/kvm_rs/sidebar-items.js b/kvm_rs/sidebar-items.js index 659e510..3468939 100644 --- a/kvm_rs/sidebar-items.js +++ b/kvm_rs/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"mod":[["cap","Definitions of KVM capabilities."],["kvm","KVM system ioctls."],["kvm_sys","Definitions of the system header ``."],["vcpu","VCPU system ioctls."],["vm","VM system ioctls."],["x86_64","`x86_64` flags and bitfields."]],"struct":[["PhysAddr","Strong type representing physical addresses."],["UserMem","Wrapper to safely allocate memory for guest VMs."]]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"mod":["cap","kvm","kvm_sys","vcpu","vm","x86_64"],"struct":["PhysAddr","UserMem"]}; \ No newline at end of file diff --git a/kvm_rs/struct.PhysAddr.html b/kvm_rs/struct.PhysAddr.html index 4b5e4de..06a7696 100644 --- a/kvm_rs/struct.PhysAddr.html +++ b/kvm_rs/struct.PhysAddr.html @@ -1,21 +1,12 @@ -PhysAddr in kvm_rs - Rust -
pub struct PhysAddr(pub u64);
Expand description

Strong type representing physical addresses.

-

Tuple Fields

0: u64

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+PhysAddr in kvm_rs - Rust

Struct kvm_rs::PhysAddr

source ·
pub struct PhysAddr(pub u64);
Expand description

Strong type representing physical addresses.

+

Tuple Fields§

§0: u64

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/kvm_rs/struct.UserMem.html b/kvm_rs/struct.UserMem.html index 9fc82be..55065b8 100644 --- a/kvm_rs/struct.UserMem.html +++ b/kvm_rs/struct.UserMem.html @@ -1,35 +1,24 @@ -UserMem in kvm_rs - Rust -
-

Struct kvm_rs::UserMem

source · []
pub struct UserMem { /* private fields */ }
Expand description

Wrapper to safely allocate memory for guest VMs.

+UserMem in kvm_rs - Rust

Struct kvm_rs::UserMem

source ·
pub struct UserMem { /* private fields */ }
Expand description

Wrapper to safely allocate memory for guest VMs.

The underlying memory is freed automatically once the UserMem instance is dropped.

Memory can be mapped into a guest VM with -Vm::set_user_memory_region.

-

Implementations

Allocate a zero-initialized memory region of len bytes.

-

Allocate a zero-initialized memory region of len bytes and initialize the first bytes +Vm::set_user_memory_region.

+

Implementations§

source§

impl UserMem

source

pub fn new(len: usize) -> Result<UserMem>

Allocate a zero-initialized memory region of len bytes.

+
source

pub fn with_init(len: usize, init_from: &[u8]) -> Result<UserMem>

Allocate a zero-initialized memory region of len bytes and initialize the first bytes with init_from.

Panics

Panics if init_from is larger than the memory size len.

-

Load the bytes stored in data into memory at physical address addr.

+
source

pub fn load(&mut self, addr: PhysAddr, data: &[u8])

Load the bytes stored in data into memory at physical address addr.

Panics

Panics if addr + data.len is larger than the memory size len.

-

Trait Implementations

Converts this type into a mutable reference of the (usually inferred) input type.

-

Converts this type into a shared reference of the (usually inferred) input type.

-

Free underlying memory.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Trait Implementations§

source§

impl AsMut<[u8]> for UserMem

source§

fn as_mut(&mut self) -> &mut [u8]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsRef<[u8]> for UserMem

source§

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

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Drop for UserMem

source§

fn drop(&mut self)

Free underlying memory.

+

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/kvm_rs/vcpu/enum.KvmExit.html b/kvm_rs/vcpu/enum.KvmExit.html index 1bc8f5e..60efe11 100644 --- a/kvm_rs/vcpu/enum.KvmExit.html +++ b/kvm_rs/vcpu/enum.KvmExit.html @@ -1,30 +1,21 @@ -KvmExit in kvm_rs::vcpu - Rust -
pub enum KvmExit<'cpu> {
+KvmExit in kvm_rs::vcpu - Rust

Enum kvm_rs::vcpu::KvmExit

source ·
pub enum KvmExit<'cpu> {
     Halt,
-    IoIn(u16, &'cpu mut [u8]),
-    IoOut(u16, &'cpu [u8]),
-    MmioRead(u64, &'cpu mut [u8]),
-    MmioWrite(u64, &'cpu [u8]),
-    Debug(u64),
-}
Expand description

Exit reasons for the Vcpu::run function.

+ IoIn(u16, &'cpu mut [u8]), + IoOut(u16, &'cpu [u8]), + MmioRead(u64, &'cpu mut [u8]), + MmioWrite(u64, &'cpu [u8]), + Debug(u64), +}
Expand description

Exit reasons for the Vcpu::run function.

Details for the different exit reasons can be found in the kvm_run structure description.

-

Variants

Halt

IoIn(u16, &'cpu mut [u8])

IoOut(u16, &'cpu [u8])

MmioRead(u64, &'cpu mut [u8])

MmioWrite(u64, &'cpu [u8])

Debug(u64)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+

Variants§

§

Halt

§

IoIn(u16, &'cpu mut [u8])

§

IoOut(u16, &'cpu [u8])

§

MmioRead(u64, &'cpu mut [u8])

§

MmioWrite(u64, &'cpu [u8])

§

Debug(u64)

Auto Trait Implementations§

§

impl<'cpu> RefUnwindSafe for KvmExit<'cpu>

§

impl<'cpu> Send for KvmExit<'cpu>

§

impl<'cpu> Sync for KvmExit<'cpu>

§

impl<'cpu> Unpin for KvmExit<'cpu>

§

impl<'cpu> !UnwindSafe for KvmExit<'cpu>

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/kvm_rs/vcpu/index.html b/kvm_rs/vcpu/index.html index 2fc5904..c2a404f 100644 --- a/kvm_rs/vcpu/index.html +++ b/kvm_rs/vcpu/index.html @@ -1,14 +1,2 @@ -kvm_rs::vcpu - Rust -
-

Module kvm_rs::vcpu

source · []
Expand description

VCPU system ioctls.

-

Structs

-

Wrapper for VCPU ioctls.

-

Enums

-

Exit reasons for the Vcpu::run function.

-
- \ No newline at end of file +kvm_rs::vcpu - Rust

Module kvm_rs::vcpu

source ·
Expand description

VCPU system ioctls.

+

Structs

  • Wrapper for VCPU ioctls.

Enums

\ No newline at end of file diff --git a/kvm_rs/vcpu/sidebar-items.js b/kvm_rs/vcpu/sidebar-items.js index 352c960..50995ef 100644 --- a/kvm_rs/vcpu/sidebar-items.js +++ b/kvm_rs/vcpu/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"enum":[["KvmExit","Exit reasons for the [`Vcpu::run`][crate::vcpu::Vcpu::run] function."]],"struct":[["Vcpu","Wrapper for VCPU ioctls."]]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"enum":["KvmExit"],"struct":["Vcpu"]}; \ No newline at end of file diff --git a/kvm_rs/vcpu/struct.Vcpu.html b/kvm_rs/vcpu/struct.Vcpu.html index e2f3d32..4272687 100644 --- a/kvm_rs/vcpu/struct.Vcpu.html +++ b/kvm_rs/vcpu/struct.Vcpu.html @@ -1,39 +1,30 @@ -Vcpu in kvm_rs::vcpu - Rust -
-

Struct kvm_rs::vcpu::Vcpu

source · []
pub struct Vcpu { /* private fields */ }
Expand description

Wrapper for VCPU ioctls.

+Vcpu in kvm_rs::vcpu - Rust

Struct kvm_rs::vcpu::Vcpu

source ·
pub struct Vcpu { /* private fields */ }
Expand description

Wrapper for VCPU ioctls.

Representation of the file descriptor obtained by the KVM_CREATE_VCPU ioctl. This wrapper provides access to the VCPU ioctls as described in KVM API.

-

Implementations

Get the general purpose registers with the KVM_GET_REGS ioctl in form of -kvm_regs.

-

Set the general purpose registers with the KVM_SET_REGS ioctl in form of -kvm_regs.

-

Get the special registers with the KVM_GET_SREGS ioctl in form of -kvm_sregs.

-

Set the special registers with the KVM_SET_SREGS ioctl in form of -kvm_sregs.

-

Get the debug registers with the KVM_GET_DEBUGREGS ioctl in form of -kvm_debugregs.

-

Set the debug registers with the KVM_SET_DEBUGREGS ioctl in form of -kvm_debugregs.

-

Enable or disable guest single steppig (debug) with the +

Implementations§

source§

impl Vcpu

source

pub fn get_regs(&self) -> Result<kvm_regs>

Get the general purpose registers with the KVM_GET_REGS ioctl in form of +kvm_regs.

+
source

pub fn set_regs(&self, regs: kvm_regs) -> Result<()>

Set the general purpose registers with the KVM_SET_REGS ioctl in form of +kvm_regs.

+
source

pub fn get_sregs(&self) -> Result<kvm_sregs>

Get the special registers with the KVM_GET_SREGS ioctl in form of +kvm_sregs.

+
source

pub fn set_sregs(&self, sregs: kvm_sregs) -> Result<()>

Set the special registers with the KVM_SET_SREGS ioctl in form of +kvm_sregs.

+
source

pub fn get_debugregs(&self) -> Result<kvm_debugregs>

Get the debug registers with the KVM_GET_DEBUGREGS ioctl in form of +kvm_debugregs.

+
source

pub fn set_debugregs(&self, dregs: kvm_debugregs) -> Result<()>

Set the debug registers with the KVM_SET_DEBUGREGS ioctl in form of +kvm_debugregs.

+
source

pub fn set_single_step(&self, enable: bool) -> Result<()>

Enable or disable guest single steppig (debug) with the KVM_GUESTDBG_ENABLE ioctl.

-

Run the guest VCPU with the KVM_RUN ioctl until it exits with one of the exit -reasons described in KvmExit.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+
source

pub fn run(&mut self) -> Result<KvmExit<'_>>

Run the guest VCPU with the KVM_RUN ioctl until it exits with one of the exit +reasons described in KvmExit.

+

Auto Trait Implementations§

§

impl RefUnwindSafe for Vcpu

§

impl !Send for Vcpu

§

impl !Sync for Vcpu

§

impl Unpin for Vcpu

§

impl UnwindSafe for Vcpu

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/kvm_rs/vm/index.html b/kvm_rs/vm/index.html index d6be8f9..7912acc 100644 --- a/kvm_rs/vm/index.html +++ b/kvm_rs/vm/index.html @@ -1,12 +1,2 @@ -kvm_rs::vm - Rust -
-

Module kvm_rs::vm

source · []
Expand description

VM system ioctls.

-

Structs

-

Wrapper for VM ioctls.

-
- \ No newline at end of file +kvm_rs::vm - Rust

Module kvm_rs::vm

source ·
Expand description

VM system ioctls.

+

Structs

  • Wrapper for VM ioctls.
\ No newline at end of file diff --git a/kvm_rs/vm/sidebar-items.js b/kvm_rs/vm/sidebar-items.js index 981eb36..63ddaf5 100644 --- a/kvm_rs/vm/sidebar-items.js +++ b/kvm_rs/vm/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"struct":[["Vm","Wrapper for VM ioctls."]]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"struct":["Vm"]}; \ No newline at end of file diff --git a/kvm_rs/vm/struct.Vm.html b/kvm_rs/vm/struct.Vm.html index 97bf0ab..99e5728 100644 --- a/kvm_rs/vm/struct.Vm.html +++ b/kvm_rs/vm/struct.Vm.html @@ -1,32 +1,27 @@ -Vm in kvm_rs::vm - Rust -
-

Struct kvm_rs::vm::Vm

source · []
pub struct Vm { /* private fields */ }
Expand description

Wrapper for VM ioctls.

+Vm in kvm_rs::vm - Rust

Struct kvm_rs::vm::Vm

source ·
pub struct Vm { /* private fields */ }
Expand description

Wrapper for VM ioctls.

Representation of the file descriptor obtained by the KVM_CREATE_VM ioctl. This wrapper provides access to the VM ioctls as described in KVM API.

-

Implementations

Map memory from userspace into the VM as guest physical memory starting at address +

Implementations§

source§

impl Vm

source

pub unsafe fn set_user_memory_region( + &self, + phys_addr: PhysAddr, + mem: &UserMem +) -> Result<()>

Map memory from userspace into the VM as guest physical memory starting at address phys_addr. The underlying operation is the KVM_SET_USER_MEMORY_REGION ioctl.

Safety

The mem: &UserMem argument passed to this function must at least live as long the Vcpu instance.

-

Create a new virtual cpu with the KVM_CREATE_VCPU ioctl. -Returns a wrapper vcpu::Vcpu representing the VCPU.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

+
source

pub fn create_vpcu(&self, id: u64) -> Result<Vcpu>

Create a new virtual cpu with the KVM_CREATE_VCPU ioctl. +Returns a wrapper vcpu::Vcpu representing the VCPU.

+

Auto Trait Implementations§

§

impl RefUnwindSafe for Vm

§

impl Send for Vm

§

impl Sync for Vm

§

impl Unpin for Vm

§

impl UnwindSafe for Vm

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
- \ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR0_AM.html b/kvm_rs/x86_64/constant.CR0_AM.html index d8e0cc8..9b27682 100644 --- a/kvm_rs/x86_64/constant.CR0_AM.html +++ b/kvm_rs/x86_64/constant.CR0_AM.html @@ -1,12 +1,4 @@ -CR0_AM in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR0_AM

source · []
pub const CR0_AM: u64 = 1 << 18; // 262_144u64
Expand description

Alignment Mask.

-

Enables alignment check for CPL=3, check is only done if the AC +CR0_AM in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR0_AM

source ·
pub const CR0_AM: u64 = _; // 262_144u64
Expand description

Alignment Mask.

+

Enables alignment check for CPL=3, check is only done if the AC bit of the rflags register ist set.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR0_CD.html b/kvm_rs/x86_64/constant.CR0_CD.html index 5b60f49..d68a02d 100644 --- a/kvm_rs/x86_64/constant.CR0_CD.html +++ b/kvm_rs/x86_64/constant.CR0_CD.html @@ -1,10 +1,2 @@ -CR0_CD in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR0_CD

source · []
pub const CR0_CD: u64 = 1 << 30; // 1_073_741_824u64
Expand description

Cachine disable.

-
- \ No newline at end of file +CR0_CD in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR0_CD

source ·
pub const CR0_CD: u64 = _; // 1_073_741_824u64
Expand description

Cachine disable.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR0_EM.html b/kvm_rs/x86_64/constant.CR0_EM.html index f6ef025..110d0f6 100644 --- a/kvm_rs/x86_64/constant.CR0_EM.html +++ b/kvm_rs/x86_64/constant.CR0_EM.html @@ -1,12 +1,4 @@ -CR0_EM in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR0_EM

source · []
pub const CR0_EM: u64 = 1 << 2; // 4u64
Expand description

Emulation.

+CR0_EM in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR0_EM

source ·
pub const CR0_EM: u64 = _; // 4u64
Expand description

Emulation.

When set indicates the process does not have a FPU. FPU instructions will generate an exception that software can emulate the instruction.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR0_ET.html b/kvm_rs/x86_64/constant.CR0_ET.html index aeaa0a6..e92c905 100644 --- a/kvm_rs/x86_64/constant.CR0_ET.html +++ b/kvm_rs/x86_64/constant.CR0_ET.html @@ -1,10 +1,2 @@ -CR0_ET in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR0_ET

source · []
pub const CR0_ET: u64 = 1 << 4; // 16u64
Expand description

Extension Type.

-
- \ No newline at end of file +CR0_ET in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR0_ET

source ·
pub const CR0_ET: u64 = _; // 16u64
Expand description

Extension Type.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR0_MP.html b/kvm_rs/x86_64/constant.CR0_MP.html index 2b8659f..16944b2 100644 --- a/kvm_rs/x86_64/constant.CR0_MP.html +++ b/kvm_rs/x86_64/constant.CR0_MP.html @@ -1,10 +1,2 @@ -CR0_MP in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR0_MP

source · []
pub const CR0_MP: u64 = 1 << 1; // 2u64
Expand description

Monitor Coprocessor.

-
- \ No newline at end of file +CR0_MP in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR0_MP

source ·
pub const CR0_MP: u64 = _; // 2u64
Expand description

Monitor Coprocessor.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR0_NE.html b/kvm_rs/x86_64/constant.CR0_NE.html index 1a76108..db2813c 100644 --- a/kvm_rs/x86_64/constant.CR0_NE.html +++ b/kvm_rs/x86_64/constant.CR0_NE.html @@ -1,10 +1,2 @@ -CR0_NE in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR0_NE

source · []
pub const CR0_NE: u64 = 1 << 5; // 32u64
Expand description

Numeric Error.

-
- \ No newline at end of file +CR0_NE in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR0_NE

source ·
pub const CR0_NE: u64 = _; // 32u64
Expand description

Numeric Error.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR0_NW.html b/kvm_rs/x86_64/constant.CR0_NW.html index a831fe7..76d02a6 100644 --- a/kvm_rs/x86_64/constant.CR0_NW.html +++ b/kvm_rs/x86_64/constant.CR0_NW.html @@ -1,10 +1,2 @@ -CR0_NW in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR0_NW

source · []
pub const CR0_NW: u64 = 1 << 29; // 536_870_912u64
Expand description

Not Write-Torugh.

-
- \ No newline at end of file +CR0_NW in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR0_NW

source ·
pub const CR0_NW: u64 = _; // 536_870_912u64
Expand description

Not Write-Torugh.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR0_PE.html b/kvm_rs/x86_64/constant.CR0_PE.html index abce4e4..aedff9d 100644 --- a/kvm_rs/x86_64/constant.CR0_PE.html +++ b/kvm_rs/x86_64/constant.CR0_PE.html @@ -1,12 +1,4 @@ -CR0_PE in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR0_PE

source · []
pub const CR0_PE: u64 = 1 << 0; // 1u64
Expand description

Protection Enable.

+CR0_PE in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR0_PE

source ·
pub const CR0_PE: u64 = _; // 1u64
Expand description

Protection Enable.

Enables protected mode when set and real-address mode when cleared. This enables segment-level protection not paging.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR0_PG.html b/kvm_rs/x86_64/constant.CR0_PG.html index 7730518..6c29bab 100644 --- a/kvm_rs/x86_64/constant.CR0_PG.html +++ b/kvm_rs/x86_64/constant.CR0_PG.html @@ -1,11 +1,3 @@ -CR0_PG in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR0_PG

source · []
pub const CR0_PG: u64 = 1 << 31; // 2_147_483_648u64
Expand description

Paging.

-

Enables paging when set, requires CR0_PE to be set as well.

-
- \ No newline at end of file +CR0_PG in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR0_PG

source ·
pub const CR0_PG: u64 = _; // 2_147_483_648u64
Expand description

Paging.

+

Enables paging when set, requires CR0_PE to be set as well.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR0_TS.html b/kvm_rs/x86_64/constant.CR0_TS.html index e326488..d1cfd77 100644 --- a/kvm_rs/x86_64/constant.CR0_TS.html +++ b/kvm_rs/x86_64/constant.CR0_TS.html @@ -1,10 +1,2 @@ -CR0_TS in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR0_TS

source · []
pub const CR0_TS: u64 = 1 << 3; // 8u64
Expand description

Task Switched.

-
- \ No newline at end of file +CR0_TS in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR0_TS

source ·
pub const CR0_TS: u64 = _; // 8u64
Expand description

Task Switched.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR0_WP.html b/kvm_rs/x86_64/constant.CR0_WP.html index 284674b..9ba728c 100644 --- a/kvm_rs/x86_64/constant.CR0_WP.html +++ b/kvm_rs/x86_64/constant.CR0_WP.html @@ -1,11 +1,3 @@ -CR0_WP in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR0_WP

source · []
pub const CR0_WP: u64 = 1 << 16; // 65_536u64
Expand description

Write Protect.

+CR0_WP in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR0_WP

source ·
pub const CR0_WP: u64 = _; // 65_536u64
Expand description

Write Protect.

When set supervisor-level procedures can’t write to read-only pages.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR3_PAGE_BASE_MASK.html b/kvm_rs/x86_64/constant.CR3_PAGE_BASE_MASK.html index 3ad7e2b..b597c96 100644 --- a/kvm_rs/x86_64/constant.CR3_PAGE_BASE_MASK.html +++ b/kvm_rs/x86_64/constant.CR3_PAGE_BASE_MASK.html @@ -1,10 +1,2 @@ -CR3_PAGE_BASE_MASK in kvm_rs::x86_64 - Rust -
pub const CR3_PAGE_BASE_MASK: u64 = 0xffff_ffff_ffff_0000;
Expand description

Mask for physical base address of paging structure.

-
- \ No newline at end of file +CR3_PAGE_BASE_MASK in kvm_rs::x86_64 - Rust
pub const CR3_PAGE_BASE_MASK: u64 = 0xffff_ffff_ffff_0000;
Expand description

Mask for physical base address of paging structure.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR3_PCD.html b/kvm_rs/x86_64/constant.CR3_PCD.html index a13c407..f74674f 100644 --- a/kvm_rs/x86_64/constant.CR3_PCD.html +++ b/kvm_rs/x86_64/constant.CR3_PCD.html @@ -1,10 +1,2 @@ -CR3_PCD in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR3_PCD

source · []
pub const CR3_PCD: u64 = 1 << 4; // 16u64
Expand description

Page-level Cache Disable.

-
- \ No newline at end of file +CR3_PCD in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR3_PCD

source ·
pub const CR3_PCD: u64 = _; // 16u64
Expand description

Page-level Cache Disable.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR3_PWT.html b/kvm_rs/x86_64/constant.CR3_PWT.html index b0c5e19..bbbfab4 100644 --- a/kvm_rs/x86_64/constant.CR3_PWT.html +++ b/kvm_rs/x86_64/constant.CR3_PWT.html @@ -1,10 +1,2 @@ -CR3_PWT in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR3_PWT

source · []
pub const CR3_PWT: u64 = 1 << 3; // 8u64
Expand description

Page-level Write-Through.

-
- \ No newline at end of file +CR3_PWT in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR3_PWT

source ·
pub const CR3_PWT: u64 = _; // 8u64
Expand description

Page-level Write-Through.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR4_LA57.html b/kvm_rs/x86_64/constant.CR4_LA57.html index 47c28ef..bfc83e9 100644 --- a/kvm_rs/x86_64/constant.CR4_LA57.html +++ b/kvm_rs/x86_64/constant.CR4_LA57.html @@ -1,12 +1,4 @@ -CR4_LA57 in kvm_rs::x86_64 - Rust -
pub const CR4_LA57: u64 = 1 << 5; // 32u64
Expand description

57-bit Linear Addresses.

+CR4_LA57 in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR4_LA57

source ·
pub const CR4_LA57: u64 = _; // 32u64
Expand description

57-bit Linear Addresses.

When set in long mode enables 5-level paging to translate 57-bit linear addresses. When cleared use 4-level paging to translate 48-bit linear addresses.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.CR4_PAE.html b/kvm_rs/x86_64/constant.CR4_PAE.html index 4bd0326..85a50ea 100644 --- a/kvm_rs/x86_64/constant.CR4_PAE.html +++ b/kvm_rs/x86_64/constant.CR4_PAE.html @@ -1,12 +1,4 @@ -CR4_PAE in kvm_rs::x86_64 - Rust -
-

Constant kvm_rs::x86_64::CR4_PAE

source · []
pub const CR4_PAE: u64 = 1 << 5; // 32u64
Expand description

Physical Address Extenstion.

+CR4_PAE in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::CR4_PAE

source ·
pub const CR4_PAE: u64 = _; // 32u64
Expand description

Physical Address Extenstion.

When set enables paging to produce physicall addresses with more than 32 bits. Required before entering long mode.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.EFER_LMA.html b/kvm_rs/x86_64/constant.EFER_LMA.html index c6baf9c..2368111 100644 --- a/kvm_rs/x86_64/constant.EFER_LMA.html +++ b/kvm_rs/x86_64/constant.EFER_LMA.html @@ -1,11 +1,3 @@ -EFER_LMA in kvm_rs::x86_64 - Rust -
pub const EFER_LMA: u64 = 1 << 10; // 1_024u64
Expand description

Long Mode Active (readonly).

+EFER_LMA in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::EFER_LMA

source ·
pub const EFER_LMA: u64 = _; // 1_024u64
Expand description

Long Mode Active (readonly).

When set indicates long mode is active.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.EFER_LME.html b/kvm_rs/x86_64/constant.EFER_LME.html index fc822f5..16cbf36 100644 --- a/kvm_rs/x86_64/constant.EFER_LME.html +++ b/kvm_rs/x86_64/constant.EFER_LME.html @@ -1,11 +1,3 @@ -EFER_LME in kvm_rs::x86_64 - Rust -
pub const EFER_LME: u64 = 1 << 8; // 256u64
Expand description

Long Mode Enable.

+EFER_LME in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::EFER_LME

source ·
pub const EFER_LME: u64 = _; // 256u64
Expand description

Long Mode Enable.

When set enables long mode operations.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.MSR_EFER.html b/kvm_rs/x86_64/constant.MSR_EFER.html index 0823089..c83b8b2 100644 --- a/kvm_rs/x86_64/constant.MSR_EFER.html +++ b/kvm_rs/x86_64/constant.MSR_EFER.html @@ -1,12 +1,4 @@ -MSR_EFER in kvm_rs::x86_64 - Rust -
pub const MSR_EFER: u64 = 0xc000_0080;
Expand description

Extended Feature Enable Register MSR number.

+MSR_EFER in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::MSR_EFER

source ·
pub const MSR_EFER: u64 = 0xc000_0080;
Expand description

Extended Feature Enable Register MSR number.

MSR number used with the rdmsr and wrmsr instructions to read/write the EFER model specific register.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.PAGE_ENTRY_PRESENT.html b/kvm_rs/x86_64/constant.PAGE_ENTRY_PRESENT.html index f3dd17d..eac9476 100644 --- a/kvm_rs/x86_64/constant.PAGE_ENTRY_PRESENT.html +++ b/kvm_rs/x86_64/constant.PAGE_ENTRY_PRESENT.html @@ -1,10 +1,2 @@ -PAGE_ENTRY_PRESENT in kvm_rs::x86_64 - Rust -
pub const PAGE_ENTRY_PRESENT: u64 = 1 << 0; // 1u64
Expand description

Page entry present.

-
- \ No newline at end of file +PAGE_ENTRY_PRESENT in kvm_rs::x86_64 - Rust
pub const PAGE_ENTRY_PRESENT: u64 = _; // 1u64
Expand description

Page entry present.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.PAGE_ENTRY_RW.html b/kvm_rs/x86_64/constant.PAGE_ENTRY_RW.html index 8632909..7704dac 100644 --- a/kvm_rs/x86_64/constant.PAGE_ENTRY_RW.html +++ b/kvm_rs/x86_64/constant.PAGE_ENTRY_RW.html @@ -1,11 +1,3 @@ -PAGE_ENTRY_RW in kvm_rs::x86_64 - Rust -
pub const PAGE_ENTRY_RW: u64 = 1 << 1; // 2u64
Expand description

Page region read/write.

+PAGE_ENTRY_RW in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::PAGE_ENTRY_RW

source ·
pub const PAGE_ENTRY_RW: u64 = _; // 2u64
Expand description

Page region read/write.

If set, region reference by paging entry is writeable.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.RFLAGS_AC.html b/kvm_rs/x86_64/constant.RFLAGS_AC.html index 02cb32a..54cb40e 100644 --- a/kvm_rs/x86_64/constant.RFLAGS_AC.html +++ b/kvm_rs/x86_64/constant.RFLAGS_AC.html @@ -1,10 +1,2 @@ -RFLAGS_AC in kvm_rs::x86_64 - Rust -
pub const RFLAGS_AC: u64 = 1 << 18; // 262_144u64
Expand description

Alignment check.

-
- \ No newline at end of file +RFLAGS_AC in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::RFLAGS_AC

source ·
pub const RFLAGS_AC: u64 = _; // 262_144u64
Expand description

Alignment check.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.RFLAGS_AF.html b/kvm_rs/x86_64/constant.RFLAGS_AF.html index 0be5b88..8982636 100644 --- a/kvm_rs/x86_64/constant.RFLAGS_AF.html +++ b/kvm_rs/x86_64/constant.RFLAGS_AF.html @@ -1,10 +1,2 @@ -RFLAGS_AF in kvm_rs::x86_64 - Rust -
pub const RFLAGS_AF: u64 = 1 << 4; // 16u64
Expand description

Adjust flag.

-
- \ No newline at end of file +RFLAGS_AF in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::RFLAGS_AF

source ·
pub const RFLAGS_AF: u64 = _; // 16u64
Expand description

Adjust flag.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.RFLAGS_CF.html b/kvm_rs/x86_64/constant.RFLAGS_CF.html index 1dbb911..424ee2b 100644 --- a/kvm_rs/x86_64/constant.RFLAGS_CF.html +++ b/kvm_rs/x86_64/constant.RFLAGS_CF.html @@ -1,10 +1,2 @@ -RFLAGS_CF in kvm_rs::x86_64 - Rust -
pub const RFLAGS_CF: u64 = 1 << 0; // 1u64
Expand description

Carry flag.

-
- \ No newline at end of file +RFLAGS_CF in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::RFLAGS_CF

source ·
pub const RFLAGS_CF: u64 = _; // 1u64
Expand description

Carry flag.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.RFLAGS_DF.html b/kvm_rs/x86_64/constant.RFLAGS_DF.html index 84963f7..752b379 100644 --- a/kvm_rs/x86_64/constant.RFLAGS_DF.html +++ b/kvm_rs/x86_64/constant.RFLAGS_DF.html @@ -1,10 +1,2 @@ -RFLAGS_DF in kvm_rs::x86_64 - Rust -
pub const RFLAGS_DF: u64 = 1 << 10; // 1_024u64
Expand description

Direction flag.

-
- \ No newline at end of file +RFLAGS_DF in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::RFLAGS_DF

source ·
pub const RFLAGS_DF: u64 = _; // 1_024u64
Expand description

Direction flag.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.RFLAGS_IF.html b/kvm_rs/x86_64/constant.RFLAGS_IF.html index 34e3bf8..fc56a0d 100644 --- a/kvm_rs/x86_64/constant.RFLAGS_IF.html +++ b/kvm_rs/x86_64/constant.RFLAGS_IF.html @@ -1,10 +1,2 @@ -RFLAGS_IF in kvm_rs::x86_64 - Rust -
pub const RFLAGS_IF: u64 = 1 << 9; // 512u64
Expand description

Sign flag.

-
- \ No newline at end of file +RFLAGS_IF in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::RFLAGS_IF

source ·
pub const RFLAGS_IF: u64 = _; // 512u64
Expand description

Sign flag.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.RFLAGS_IOPL.html b/kvm_rs/x86_64/constant.RFLAGS_IOPL.html index 192a715..73598ba 100644 --- a/kvm_rs/x86_64/constant.RFLAGS_IOPL.html +++ b/kvm_rs/x86_64/constant.RFLAGS_IOPL.html @@ -1,10 +1,2 @@ -RFLAGS_IOPL in kvm_rs::x86_64 - Rust -
pub const RFLAGS_IOPL: u64 = 0b11 << 12; // 12_288u64
Expand description

I/O privilege level.

-
- \ No newline at end of file +RFLAGS_IOPL in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::RFLAGS_IOPL

source ·
pub const RFLAGS_IOPL: u64 = _; // 12_288u64
Expand description

I/O privilege level.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.RFLAGS_OF.html b/kvm_rs/x86_64/constant.RFLAGS_OF.html index 458c78b..3b3dd0c 100644 --- a/kvm_rs/x86_64/constant.RFLAGS_OF.html +++ b/kvm_rs/x86_64/constant.RFLAGS_OF.html @@ -1,10 +1,2 @@ -RFLAGS_OF in kvm_rs::x86_64 - Rust -
pub const RFLAGS_OF: u64 = 1 << 11; // 2_048u64
Expand description

Overflow flag.

-
- \ No newline at end of file +RFLAGS_OF in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::RFLAGS_OF

source ·
pub const RFLAGS_OF: u64 = _; // 2_048u64
Expand description

Overflow flag.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.RFLAGS_PF.html b/kvm_rs/x86_64/constant.RFLAGS_PF.html index 0339e79..60a02f6 100644 --- a/kvm_rs/x86_64/constant.RFLAGS_PF.html +++ b/kvm_rs/x86_64/constant.RFLAGS_PF.html @@ -1,10 +1,2 @@ -RFLAGS_PF in kvm_rs::x86_64 - Rust -
pub const RFLAGS_PF: u64 = 1 << 2; // 4u64
Expand description

Parity flag.

-
- \ No newline at end of file +RFLAGS_PF in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::RFLAGS_PF

source ·
pub const RFLAGS_PF: u64 = _; // 4u64
Expand description

Parity flag.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.RFLAGS_SF.html b/kvm_rs/x86_64/constant.RFLAGS_SF.html index 0f57b05..c76df45 100644 --- a/kvm_rs/x86_64/constant.RFLAGS_SF.html +++ b/kvm_rs/x86_64/constant.RFLAGS_SF.html @@ -1,10 +1,2 @@ -RFLAGS_SF in kvm_rs::x86_64 - Rust -
pub const RFLAGS_SF: u64 = 1 << 7; // 128u64
Expand description

Sign flag.

-
- \ No newline at end of file +RFLAGS_SF in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::RFLAGS_SF

source ·
pub const RFLAGS_SF: u64 = _; // 128u64
Expand description

Sign flag.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.RFLAGS_TF.html b/kvm_rs/x86_64/constant.RFLAGS_TF.html index e222737..f90a74e 100644 --- a/kvm_rs/x86_64/constant.RFLAGS_TF.html +++ b/kvm_rs/x86_64/constant.RFLAGS_TF.html @@ -1,10 +1,2 @@ -RFLAGS_TF in kvm_rs::x86_64 - Rust -
pub const RFLAGS_TF: u64 = 1 << 8; // 256u64
Expand description

Trap flag.

-
- \ No newline at end of file +RFLAGS_TF in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::RFLAGS_TF

source ·
pub const RFLAGS_TF: u64 = _; // 256u64
Expand description

Trap flag.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.RFLAGS_ZF.html b/kvm_rs/x86_64/constant.RFLAGS_ZF.html index fd3cece..966a9ce 100644 --- a/kvm_rs/x86_64/constant.RFLAGS_ZF.html +++ b/kvm_rs/x86_64/constant.RFLAGS_ZF.html @@ -1,10 +1,2 @@ -RFLAGS_ZF in kvm_rs::x86_64 - Rust -
pub const RFLAGS_ZF: u64 = 1 << 6; // 64u64
Expand description

Zero flag.

-
- \ No newline at end of file +RFLAGS_ZF in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::RFLAGS_ZF

source ·
pub const RFLAGS_ZF: u64 = _; // 64u64
Expand description

Zero flag.

+
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.SEG_SELECTOR_INDEX.html b/kvm_rs/x86_64/constant.SEG_SELECTOR_INDEX.html index bd05fd0..8824d41 100644 --- a/kvm_rs/x86_64/constant.SEG_SELECTOR_INDEX.html +++ b/kvm_rs/x86_64/constant.SEG_SELECTOR_INDEX.html @@ -1,12 +1,4 @@ -SEG_SELECTOR_INDEX in kvm_rs::x86_64 - Rust -
pub const SEG_SELECTOR_INDEX: u16 = 0x1fff << 3; // 65_528u16
Expand description

Table index.

+SEG_SELECTOR_INDEX in kvm_rs::x86_64 - Rust
pub const SEG_SELECTOR_INDEX: u16 = _; // 65_528u16
Expand description

Table index.

Index into the GDT or LDT table to select the segment descriptor. GDT.base + 8 * index gives the address of the segment descriptor (times 8 because every segment descriptor is 8 byte).

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.SEG_SELECTOR_RPL.html b/kvm_rs/x86_64/constant.SEG_SELECTOR_RPL.html index 0c73e6f..7422838 100644 --- a/kvm_rs/x86_64/constant.SEG_SELECTOR_RPL.html +++ b/kvm_rs/x86_64/constant.SEG_SELECTOR_RPL.html @@ -1,12 +1,4 @@ -SEG_SELECTOR_RPL in kvm_rs::x86_64 - Rust -
pub const SEG_SELECTOR_RPL: u16 = 0b11 << 0; // 3u16
Expand description

Requested privilege level.

+SEG_SELECTOR_RPL in kvm_rs::x86_64 - Rust
pub const SEG_SELECTOR_RPL: u16 = _; // 3u16
Expand description

Requested privilege level.

Privilege level of the segment selector, where 0 is the most privileged mode and 3 the least.

-
- \ No newline at end of file +
\ No newline at end of file diff --git a/kvm_rs/x86_64/constant.SEG_SELECTOR_TI.html b/kvm_rs/x86_64/constant.SEG_SELECTOR_TI.html index 2e4d3c0..4b59437 100644 --- a/kvm_rs/x86_64/constant.SEG_SELECTOR_TI.html +++ b/kvm_rs/x86_64/constant.SEG_SELECTOR_TI.html @@ -1,14 +1,6 @@ -SEG_SELECTOR_TI in kvm_rs::x86_64 - Rust -
pub const SEG_SELECTOR_TI: u16 = 1 << 2; // 4u16
Expand description

Table indicator.

+SEG_SELECTOR_TI in kvm_rs::x86_64 - Rust

Constant kvm_rs::x86_64::SEG_SELECTOR_TI

source ·
pub const SEG_SELECTOR_TI: u16 = _; // 4u16
Expand description

Table indicator.

TITable
0GDT
1LDT
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.rflags_ac.html b/kvm_rs/x86_64/fn.rflags_ac.html index b82d256..0711145 100644 --- a/kvm_rs/x86_64/fn.rflags_ac.html +++ b/kvm_rs/x86_64/fn.rflags_ac.html @@ -1,9 +1 @@ -rflags_ac in kvm_rs::x86_64 - Rust -
pub const fn rflags_ac(r: u64) -> u64
- \ No newline at end of file +rflags_ac in kvm_rs::x86_64 - Rust

Function kvm_rs::x86_64::rflags_ac

source ·
pub const fn rflags_ac(r: u64) -> u64
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.rflags_af.html b/kvm_rs/x86_64/fn.rflags_af.html index 8bf02b6..f517642 100644 --- a/kvm_rs/x86_64/fn.rflags_af.html +++ b/kvm_rs/x86_64/fn.rflags_af.html @@ -1,9 +1 @@ -rflags_af in kvm_rs::x86_64 - Rust -
pub const fn rflags_af(r: u64) -> u64
- \ No newline at end of file +rflags_af in kvm_rs::x86_64 - Rust

Function kvm_rs::x86_64::rflags_af

source ·
pub const fn rflags_af(r: u64) -> u64
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.rflags_cf.html b/kvm_rs/x86_64/fn.rflags_cf.html index f2cfa35..7222f67 100644 --- a/kvm_rs/x86_64/fn.rflags_cf.html +++ b/kvm_rs/x86_64/fn.rflags_cf.html @@ -1,9 +1 @@ -rflags_cf in kvm_rs::x86_64 - Rust -
pub const fn rflags_cf(r: u64) -> u64
- \ No newline at end of file +rflags_cf in kvm_rs::x86_64 - Rust

Function kvm_rs::x86_64::rflags_cf

source ·
pub const fn rflags_cf(r: u64) -> u64
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.rflags_df.html b/kvm_rs/x86_64/fn.rflags_df.html index afe943d..321a9e2 100644 --- a/kvm_rs/x86_64/fn.rflags_df.html +++ b/kvm_rs/x86_64/fn.rflags_df.html @@ -1,9 +1 @@ -rflags_df in kvm_rs::x86_64 - Rust -
pub const fn rflags_df(r: u64) -> u64
- \ No newline at end of file +rflags_df in kvm_rs::x86_64 - Rust

Function kvm_rs::x86_64::rflags_df

source ·
pub const fn rflags_df(r: u64) -> u64
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.rflags_if.html b/kvm_rs/x86_64/fn.rflags_if.html index d9e2245..65cbedc 100644 --- a/kvm_rs/x86_64/fn.rflags_if.html +++ b/kvm_rs/x86_64/fn.rflags_if.html @@ -1,9 +1 @@ -rflags_if in kvm_rs::x86_64 - Rust -
pub const fn rflags_if(r: u64) -> u64
- \ No newline at end of file +rflags_if in kvm_rs::x86_64 - Rust

Function kvm_rs::x86_64::rflags_if

source ·
pub const fn rflags_if(r: u64) -> u64
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.rflags_iopl.html b/kvm_rs/x86_64/fn.rflags_iopl.html index 1fb1e54..9eb1690 100644 --- a/kvm_rs/x86_64/fn.rflags_iopl.html +++ b/kvm_rs/x86_64/fn.rflags_iopl.html @@ -1,9 +1 @@ -rflags_iopl in kvm_rs::x86_64 - Rust -
pub const fn rflags_iopl(r: u64) -> u64
- \ No newline at end of file +rflags_iopl in kvm_rs::x86_64 - Rust

Function kvm_rs::x86_64::rflags_iopl

source ·
pub const fn rflags_iopl(r: u64) -> u64
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.rflags_of.html b/kvm_rs/x86_64/fn.rflags_of.html index a3ce4a2..9f44e9d 100644 --- a/kvm_rs/x86_64/fn.rflags_of.html +++ b/kvm_rs/x86_64/fn.rflags_of.html @@ -1,9 +1 @@ -rflags_of in kvm_rs::x86_64 - Rust -
pub const fn rflags_of(r: u64) -> u64
- \ No newline at end of file +rflags_of in kvm_rs::x86_64 - Rust

Function kvm_rs::x86_64::rflags_of

source ·
pub const fn rflags_of(r: u64) -> u64
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.rflags_pf.html b/kvm_rs/x86_64/fn.rflags_pf.html index 03b1c90..b0ffc88 100644 --- a/kvm_rs/x86_64/fn.rflags_pf.html +++ b/kvm_rs/x86_64/fn.rflags_pf.html @@ -1,9 +1 @@ -rflags_pf in kvm_rs::x86_64 - Rust -
pub const fn rflags_pf(r: u64) -> u64
- \ No newline at end of file +rflags_pf in kvm_rs::x86_64 - Rust

Function kvm_rs::x86_64::rflags_pf

source ·
pub const fn rflags_pf(r: u64) -> u64
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.rflags_sf.html b/kvm_rs/x86_64/fn.rflags_sf.html index 4b4b7bd..317592e 100644 --- a/kvm_rs/x86_64/fn.rflags_sf.html +++ b/kvm_rs/x86_64/fn.rflags_sf.html @@ -1,9 +1 @@ -rflags_sf in kvm_rs::x86_64 - Rust -
pub const fn rflags_sf(r: u64) -> u64
- \ No newline at end of file +rflags_sf in kvm_rs::x86_64 - Rust

Function kvm_rs::x86_64::rflags_sf

source ·
pub const fn rflags_sf(r: u64) -> u64
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.rflags_tf.html b/kvm_rs/x86_64/fn.rflags_tf.html index 8246815..d34f68d 100644 --- a/kvm_rs/x86_64/fn.rflags_tf.html +++ b/kvm_rs/x86_64/fn.rflags_tf.html @@ -1,9 +1 @@ -rflags_tf in kvm_rs::x86_64 - Rust -
pub const fn rflags_tf(r: u64) -> u64
- \ No newline at end of file +rflags_tf in kvm_rs::x86_64 - Rust

Function kvm_rs::x86_64::rflags_tf

source ·
pub const fn rflags_tf(r: u64) -> u64
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.rflags_zf.html b/kvm_rs/x86_64/fn.rflags_zf.html index 44f4042..0ac01d0 100644 --- a/kvm_rs/x86_64/fn.rflags_zf.html +++ b/kvm_rs/x86_64/fn.rflags_zf.html @@ -1,9 +1 @@ -rflags_zf in kvm_rs::x86_64 - Rust -
pub const fn rflags_zf(r: u64) -> u64
- \ No newline at end of file +rflags_zf in kvm_rs::x86_64 - Rust

Function kvm_rs::x86_64::rflags_zf

source ·
pub const fn rflags_zf(r: u64) -> u64
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.seg_selector_index.html b/kvm_rs/x86_64/fn.seg_selector_index.html index 9310f3a..783408d 100644 --- a/kvm_rs/x86_64/fn.seg_selector_index.html +++ b/kvm_rs/x86_64/fn.seg_selector_index.html @@ -1,9 +1 @@ -seg_selector_index in kvm_rs::x86_64 - Rust -
pub const fn seg_selector_index(s: u16) -> u16
- \ No newline at end of file +seg_selector_index in kvm_rs::x86_64 - Rust
pub const fn seg_selector_index(s: u16) -> u16
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.seg_selector_rpl.html b/kvm_rs/x86_64/fn.seg_selector_rpl.html index d7c5c50..a3a647f 100644 --- a/kvm_rs/x86_64/fn.seg_selector_rpl.html +++ b/kvm_rs/x86_64/fn.seg_selector_rpl.html @@ -1,9 +1 @@ -seg_selector_rpl in kvm_rs::x86_64 - Rust -
pub const fn seg_selector_rpl(s: u16) -> u16
- \ No newline at end of file +seg_selector_rpl in kvm_rs::x86_64 - Rust
pub const fn seg_selector_rpl(s: u16) -> u16
\ No newline at end of file diff --git a/kvm_rs/x86_64/fn.seg_selector_ti.html b/kvm_rs/x86_64/fn.seg_selector_ti.html index 8639b79..e572d64 100644 --- a/kvm_rs/x86_64/fn.seg_selector_ti.html +++ b/kvm_rs/x86_64/fn.seg_selector_ti.html @@ -1,9 +1 @@ -seg_selector_ti in kvm_rs::x86_64 - Rust -
pub const fn seg_selector_ti(s: u16) -> u16
- \ No newline at end of file +seg_selector_ti in kvm_rs::x86_64 - Rust

Function kvm_rs::x86_64::seg_selector_ti

source ·
pub const fn seg_selector_ti(s: u16) -> u16
\ No newline at end of file diff --git a/kvm_rs/x86_64/index.html b/kvm_rs/x86_64/index.html index 65f147c..7e6a415 100644 --- a/kvm_rs/x86_64/index.html +++ b/kvm_rs/x86_64/index.html @@ -1,47 +1,2 @@ -kvm_rs::x86_64 - Rust -
-

Module kvm_rs::x86_64

source · []
Expand description

x86_64 flags and bitfields.

-

Constants

-

Alignment Mask.

-

Cachine disable.

-

Emulation.

-

Extension Type.

-

Monitor Coprocessor.

-

Numeric Error.

-

Not Write-Torugh.

-

Protection Enable.

-

Paging.

-

Task Switched.

-

Write Protect.

-

Mask for physical base address of paging structure.

-

Page-level Cache Disable.

-

Page-level Write-Through.

-

57-bit Linear Addresses.

-

Physical Address Extenstion.

-

Long Mode Active (readonly).

-

Long Mode Enable.

-

Extended Feature Enable Register MSR number.

-

Page entry present.

-

Page region read/write.

-

Alignment check.

-

Adjust flag.

-

Carry flag.

-

Direction flag.

-

Sign flag.

-

I/O privilege level.

-

Overflow flag.

-

Parity flag.

-

Sign flag.

-

Trap flag.

-

Zero flag.

-

Table index.

-

Requested privilege level.

-

Table indicator.

-

Functions

-
- \ No newline at end of file +kvm_rs::x86_64 - Rust

Module kvm_rs::x86_64

source ·
Expand description

x86_64 flags and bitfields.

+

Constants

Functions

\ No newline at end of file diff --git a/kvm_rs/x86_64/sidebar-items.js b/kvm_rs/x86_64/sidebar-items.js index 0a85c3a..33e29f9 100644 --- a/kvm_rs/x86_64/sidebar-items.js +++ b/kvm_rs/x86_64/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"constant":[["CR0_AM","Alignment Mask."],["CR0_CD","Cachine disable."],["CR0_EM","Emulation."],["CR0_ET","Extension Type."],["CR0_MP","Monitor Coprocessor."],["CR0_NE","Numeric Error."],["CR0_NW","Not Write-Torugh."],["CR0_PE","Protection Enable."],["CR0_PG","Paging."],["CR0_TS","Task Switched."],["CR0_WP","Write Protect."],["CR3_PAGE_BASE_MASK","Mask for physical base address of paging structure."],["CR3_PCD","Page-level Cache Disable."],["CR3_PWT","Page-level Write-Through."],["CR4_LA57","57-bit Linear Addresses."],["CR4_PAE","Physical Address Extenstion."],["EFER_LMA","Long Mode Active (readonly)."],["EFER_LME","Long Mode Enable."],["MSR_EFER","Extended Feature Enable Register MSR number."],["PAGE_ENTRY_PRESENT","Page entry present."],["PAGE_ENTRY_RW","Page region read/write."],["RFLAGS_AC","Alignment check."],["RFLAGS_AF","Adjust flag."],["RFLAGS_CF","Carry flag."],["RFLAGS_DF","Direction flag."],["RFLAGS_IF","Sign flag."],["RFLAGS_IOPL","I/O privilege level."],["RFLAGS_OF","Overflow flag."],["RFLAGS_PF","Parity flag."],["RFLAGS_SF","Sign flag."],["RFLAGS_TF","Trap flag."],["RFLAGS_ZF","Zero flag."],["SEG_SELECTOR_INDEX","Table index."],["SEG_SELECTOR_RPL","Requested privilege level."],["SEG_SELECTOR_TI","Table indicator."]],"fn":[["rflags_ac",""],["rflags_af",""],["rflags_cf",""],["rflags_df",""],["rflags_if",""],["rflags_iopl",""],["rflags_of",""],["rflags_pf",""],["rflags_sf",""],["rflags_tf",""],["rflags_zf",""],["seg_selector_index",""],["seg_selector_rpl",""],["seg_selector_ti",""]]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":["CR0_AM","CR0_CD","CR0_EM","CR0_ET","CR0_MP","CR0_NE","CR0_NW","CR0_PE","CR0_PG","CR0_TS","CR0_WP","CR3_PAGE_BASE_MASK","CR3_PCD","CR3_PWT","CR4_LA57","CR4_PAE","EFER_LMA","EFER_LME","MSR_EFER","PAGE_ENTRY_PRESENT","PAGE_ENTRY_RW","RFLAGS_AC","RFLAGS_AF","RFLAGS_CF","RFLAGS_DF","RFLAGS_IF","RFLAGS_IOPL","RFLAGS_OF","RFLAGS_PF","RFLAGS_SF","RFLAGS_TF","RFLAGS_ZF","SEG_SELECTOR_INDEX","SEG_SELECTOR_RPL","SEG_SELECTOR_TI"],"fn":["rflags_ac","rflags_af","rflags_cf","rflags_df","rflags_if","rflags_iopl","rflags_of","rflags_pf","rflags_sf","rflags_tf","rflags_zf","seg_selector_index","seg_selector_rpl","seg_selector_ti"]}; \ No newline at end of file diff --git a/light.css b/light.css deleted file mode 100644 index ceb83fc..0000000 --- a/light.css +++ /dev/null @@ -1 +0,0 @@ - body,#settings-menu #settings,#settings-menu #settings::before{background-color:white;color:black;}.setting-line .radio-line input{border-color:black;}.setting-line .radio-line input:checked{box-shadow:inset 0 0 0 3px white;background-color:#2196f3;}.setting-line .radio-line input:focus{box-shadow:0 0 1px 1px #2196f3;}.setting-line .radio-line input:checked:focus{box-shadow:inset 0 0 0 3px white,0 0 2px 2px #2196f3;}.setting-line .radio-line input:hover{border-color:#2196f3 !important;}.slider{background-color:#ccc;}.slider:before{background-color:white;}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);}h1,h2,h3,h4{color:black;}h1.fqn{border-bottom-color:#DDDDDD;}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,.mobile-topbar,.sidebar-menu-toggle{background-color:#F5F5F5;}*{scrollbar-color:rgba(36,37,39,0.6) #e6e6e6;}.sidebar{scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;}.rust-logo{}::-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,.sidebar a:hover{background-color:#fff;}.source .sidebar{background-color:#f1f1f1;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#FDFFD3 !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:#e7b1a0;}a.result-struct:focus{background-color:#e7b1a0;}a.result-union:focus{background-color:#e7b1a0;}a.result-fn:focus,a.result-method:focus,a.result-tymethod:focus{background-color:#c6afb3;}a.result-type:focus{background-color:#e7b1a0;}a.result-associatedtype:focus{background-color:#afc6e4;}a.result-foreigntype:focus{background-color:#e7b1a0;}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:#afc6e4;}a.result-primitive:focus{background-color:#e7b1a0;}a.result-keyword:focus{background-color:#afc6e4;}.content .item-info::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#AD378A;}.content span.struct,.content a.struct,.block a.current.struct{color:#AD378A;}.content span.type,.content a.type,.block a.current.type{color:#AD378A;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#3873AD;}.content span.associatedtype,.content a.associatedtype,.block a.current.associatedtype{color:#3873AD;}.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:#AD378A;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#3873AD;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#AD378A;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#3873AD;}.content span.trait,.content a.trait,.block a.current.trait{color:#6E4FC9;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#5137AD;}.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:#AD7C37;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#3873AD;}.sidebar a{color:#356da4;}.sidebar a.current.enum{color:#a63283;}.sidebar a.current.struct{color:#a63283;}.sidebar a.current.type{color:#a63283;}.sidebar a.current.associatedtype{color:#356da4;}.sidebar a.current.foreigntype{color:#356da4;}.sidebar a.current.attr,.sidebar a.current.derive,.sidebar a.current.macro{color:#067901;}.sidebar a.current.union{color:#a63283;}.sidebar a.current.constant .sidebar a.current.static{color:#356da4;}.sidebar a.current.primitive{color:#a63283;}.sidebar a.current.externcrate .sidebar a.current.mod{color:#356da4;}.sidebar a.current.trait{color:#6849c3;}.sidebar a.current.traitalias{color:#4b349e;}.sidebar a.current.fn,.sidebar a.current.method,.sidebar a.current.tymethod{color:#a67736;}.sidebar a.current.keyword{color:#356da4;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#3873AD;}a#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,pre.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,.in-band a{color:#000;}.search-results a{color:initial;}a.test-arrow{color:#f5f5f5;}body.source .example-wrap pre.rust a{background:#eee;}details.rustdoc-toggle>summary.hideme>span,details.rustdoc-toggle>summary::before,details.undocumented>summary::before{color:#999;}#crate-search,.search-input{background-color:white;border-color:#e0e0e0 !important;}.search-input:focus{border-color:#66afe9;}.module-item .stab,.import-item .stab{color:#000;}.stab.empty-impl{background:#FFF5D6;border-color:#FFC600;}.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;}.rightside,.out-of-band{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:rgb(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label,.code-attribute{color:#999;}:target{background:#FDFFD3;border-right:3px solid #AD7C37;}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:#3873AD;}.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:#F5F5F5;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F5F5F5;border-right-color:#000;}#sidebar-filler{background-color:#F5F5F5;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow:inset 0 -1px 0 #c6cbd1;}#settings-menu>a,#help-button{border-color:#e0e0e0;background-color:#fff;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button:hover,#help-button:focus{border-color:#717171;}#settings-menu #settings,#settings-menu #settings::before{border-color:#DDDDDD;}#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;}.search-results .result-name span.alias{color:#000;}.search-results .result-name span.grey{color:#999;}#sidebar-toggle{background-color:#F5F5F5;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F5F5F5;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.scraped-example-list .scrape-help{border-color:#555;color:#333;}.scraped-example-list .scrape-help:hover{border-color:black;color:black;}.more-examples-toggle summary,.more-examples-toggle .hide-more{color:#999;}.scraped-example .example-wrap .rust span.highlight{background:#fcffd6;}.scraped-example .example-wrap .rust span.highlight.focus{background:#f6fdb0;}.scraped-example:not(.expanded) .code-wrapper:before{background:linear-gradient(to bottom,rgba(255,255,255,1),rgba(255,255,255,0));}.scraped-example:not(.expanded) .code-wrapper:after{background:linear-gradient(to top,rgba(255,255,255,1),rgba(255,255,255,0));}.toggle-line-inner{background:#ccc;}.toggle-line:hover .toggle-line-inner{background:#999;} \ No newline at end of file diff --git a/main.js b/main.js deleted file mode 100644 index a756f49..0000000 --- a/main.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict";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){const 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 getVar(name){const el=document.getElementById("rustdoc-vars");if(el){return el.attributes["data-"+name].value}else{return null}}function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}(function(){window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate")}());function setMobileTopbar(){const mobileLocationTitle=document.querySelector(".mobile-topbar h2.location");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileLocationTitle&&locationTitle){mobileLocationTitle.innerHTML=locationTitle.innerHTML}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}window.hideSettings=()=>{};function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function loadCss(cssFileName){const link=document.createElement("link");link.href=resourcePath(cssFileName,".css");link.type="text/css";link.rel="stylesheet";document.getElementsByTagName("head")[0].appendChild(link)}(function(){function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{addClass(getSettingsButton(),"rotate");event.preventDefault();loadCss("settings");loadScript(resourcePath("settings",".js"))};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:()=>{switchDisplayedElement(null);document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(resourcePath("search",".js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search);loadSearch()}},};function getPageId(){if(window.location.hash){const tmp=window.location.hash.replace(/^#/,"");if(tmp.length>0){return tmp}}return null}const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const 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){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown");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){searchState.clearInputTimeout();const help=getHelpElement(false);if(help&&!hasClass(help,"hidden")){displayHelp(false,ev,help)}else{switchDisplayedElement(null);if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}ev.preventDefault()}searchState.defocus();window.hideSettings()}const 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;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const div=document.createElement("div");div.className="block "+shortty;const h3=document.createElement("h3");h3.innerHTML=`${longty}`;div.appendChild(h3);const ul=document.createElement("ul");for(const item of filtered){const name=item[0];const desc=item[1];let klass=shortty;let path;if(shortty==="mod"){path=name+"/index.html"}else{path=shortty+"."+name+".html"}const current_page=document.location.href.split("/").pop();if(path===current_page){klass+=" current"}const link=document.createElement("a");link.href=path;link.title=desc;link.className=klass;link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}div.appendChild(ul);sidebar.appendChild(div)}if(sidebar){const isModule=hasClass(document.body,"mod");if(!isModule){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("union","unions","Unions");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Definitions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("traitalias","trait-aliases","Trait Aliases")}}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector("h1.fqn > .in-band > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const ignoreExternCrates=document.querySelector("script[data-ignore-extern-crates]").getAttribute("data-ignore-extern-crates");for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.indexOf(lib)!==-1){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct.synthetic?synthetic_implementors:implementors;if(struct.synthetic){for(const struct_type of struct.types){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct.text;addClass(code,"code-header");addClass(code,"in-band");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&href.indexOf("http")!==0){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const div=document.createElement("div");div.className="block crate";div.innerHTML="

Crates

";const ul=document.createElement("ul");div.appendChild(ul);for(const crate of window.ALL_CRATES){let klass="crate";if(window.rootPath!=="./"&&crate===window.currentCrate){klass+=" current"}const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.className=klass;link.textContent=crate;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(div)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}let sectionIsCollapsed=false;if(hasClass(innerToggle,"will-expand")){removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),e=>{if(!hasClass(e,"type-contents-toggle")){e.open=true}});innerToggle.title="collapse all docs"}else{addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("rustdoc-toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});sectionIsCollapsed=true;innerToggle.title="expand all docs"}innerToggle.children[0].innerText=labelForToggleButton(sectionIsCollapsed)}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("rustdoc-toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}});const pageId=getPageId();if(pageId!==null){expandSection(pageId)}}());(function(){let lineNumbersFunc=()=>{};if(getSettingValue("line-numbers")==="true"){lineNumbersFunc=x=>{const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{if(hasClass(e,"compile_fail")){e.addEventListener("mouseover",function(){this.parentElement.previousElementSibling.childNodes[0].style.color="#f00"});e.addEventListener("mouseout",function(){this.parentElement.previousElementSibling.childNodes[0].style.color=""})}else if(hasClass(e,"ignore")){e.addEventListener("mouseover",function(){this.parentElement.previousElementSibling.childNodes[0].style.color="#ff9200"});e.addEventListener("mouseout",function(){this.parentElement.previousElementSibling.childNodes[0].style.color=""})}lineNumbersFunc(e)})}());function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}function handleClick(id,f){const elem=document.getElementById(id);if(elem){elem.addEventListener("click",f)}}handleClick("help-button",ev=>{displayHelp(true,ev)});handleClick(MAIN_ID,()=>{hideSidebar()});onEachLazy(document.getElementsByTagName("a"),el=>{if(el.hash){el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})}});onEachLazy(document.querySelectorAll(".rustdoc-toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});onEachLazy(document.getElementsByClassName("notable-traits"),e=>{e.onclick=function(){this.getElementsByClassName("notable-traits-tooltiptext")[0].classList.toggle("force-tooltip")}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){addClass(sidebar,"shown")}else{removeClass(sidebar,"shown")}})}let buildHelperPopup=()=>{const popup=document.createElement("aside");addClass(popup,"hidden");popup.id="help";popup.addEventListener("click",ev=>{if(ev.target===popup){displayHelp(false,ev)}});const book_info=document.createElement("span");book_info.className="top";book_info.innerHTML="You can find more information in \ - the rustdoc book.";const container=document.createElement("div");const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","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(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

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

"+x+"

").join("");const 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);const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);container.appendChild(rustdoc_version);popup.appendChild(container);insertAfter(popup,document.querySelector("main"));buildHelperPopup=()=>{}};setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){let reset_button_timeout=null;window.copy_path=but=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const 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";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,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)}}()) \ No newline at end of file diff --git a/normalize.css b/normalize.css deleted file mode 100644 index 469959f..0000000 --- a/normalize.css +++ /dev/null @@ -1,2 +0,0 @@ - /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ -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} \ No newline at end of file diff --git a/noscript.css b/noscript.css deleted file mode 100644 index d850bb3..0000000 --- a/noscript.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}.sub{display:none;} \ No newline at end of file diff --git a/rust-logo.svg b/rust-logo.svg deleted file mode 100644 index 62424d8..0000000 --- a/rust-logo.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - diff --git a/rustdoc.css b/rustdoc.css deleted file mode 100644 index 26904c7..0000000 --- a/rustdoc.css +++ /dev/null @@ -1 +0,0 @@ - @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:20px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}h1.fqn{margin:0;padding:0;}.main-heading{display:flex;flex-wrap:wrap;justify-content:space-between;padding-bottom:6px;margin-bottom:15px;}.main-heading a:hover{text-decoration:underline;}#toggle-all-docs{text-decoration:none;}h2,.top-doc h3,.top-doc h4{border-bottom:1px solid;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;border-bottom-style:none;margin:0;padding:0;margin-top:0.6em;margin-bottom:0.4em;}.impl,.impl-items .method,.methods .method,.impl-items .type,.methods .type,.impl-items .associatedconstant,.methods .associatedconstant,.impl-items .associatedtype,.methods .associatedtype{flex-basis:100%;font-weight:600;position:relative;}div.impl-items>div{padding-left:0;}h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,a.source,.search-input,.search-results .result-name,.content table td:first-child>a,.item-left>a,.out-of-band,span.since,#source-sidebar,#sidebar-toggle,details.rustdoc-toggle>summary::before,div.impl-items>div:not(.docblock):not(.item-info),.content ul.crate a.crate,a.srclink,#main-content>ul.docblock>li>a{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p{margin:0 0 .75em 0;}summary{outline:none;}td,th{padding:0;}table{border-collapse:collapse;}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;}button{padding:1px 6px;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.source main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}.source .width-limiter{max-width:unset;}details:not(.rustdoc-toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;}.docblock.item-decl{margin-left:0;}.item-decl pre{overflow-x:auto;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{max-width:none;overflow:visible;margin-left:0px;}nav.sub{position:relative;font-size:1rem;}.sub-container{display:flex;flex-direction:row;flex-wrap:nowrap;}.sub-logo-container{display:none;margin-right:20px;}.source .sub-logo-container{display:block;}.source .sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.sidebar{font-size:0.875rem;width:250px;min-width:200px;overflow-y:scroll;position:sticky;height:100vh;top:0;left:0;}.sidebar-elems,.sidebar>.location{padding-left:24px;}.sidebar .location{overflow-wrap:anywhere;}.rustdoc.source .sidebar{width:50px;min-width:0px;max-width:300px;flex-grow:0;flex-shrink:0;flex-basis:auto;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.rustdoc.source .sidebar .sidebar-logo{display:none;}.source .sidebar>*:not(#sidebar-toggle){opacity:0;visibility:hidden;}.source-sidebar-expanded .source .sidebar{overflow-y:auto;}.source-sidebar-expanded .source .sidebar>*:not(#sidebar-toggle){opacity:1;visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;}.sidebar{scrollbar-width:thin;}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;}.hidden{display:none !important;}.sidebar .logo-container{display:flex;margin-top:10px;margin-bottom:10px;justify-content:center;}.version{overflow-wrap:break-word;}.logo-container>img{height:100px;width:100px;}.location:empty{border:none;}.location a:first-of-type{font-weight:500;}.block{padding:0;}.block ul,.block li{padding:0;margin:0;list-style:none;}.block a,h2.location a{display:block;padding:0.25rem;margin-left:-0.25rem;text-overflow:ellipsis;overflow:hidden;}.sidebar h2{border-bottom:none;font-weight:500;padding:0;margin:0;margin-top:0.7rem;margin-bottom:0.7rem;}.sidebar h3{font-size:1.125rem;font-weight:500;padding:0;margin:0;}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;}.mobile-topbar{display:none;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc .example-wrap{display:inline-flex;margin-bottom:10px;}.example-wrap{position:relative;width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;padding:13px 8px;text-align:right;border-top-left-radius:5px;border-bottom-left-radius:5px;}.example-wrap>pre.rust a:hover{text-decoration:underline;}.line-numbers{text-align:right;}.rustdoc:not(.source) .example-wrap>pre:not(.line-number){width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre.line-numbers{width:auto;overflow-x:visible;}.rustdoc .example-wrap>pre{margin:0;}#search{position:relative;}.search-loading{text-align:center;}#results>table{width:100%;table-layout:fixed;}.content>.example-wrap pre.line-numbers{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock-short p{display:inline;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock>:not(pre)>code,.docblock-short>:not(pre)>code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.information):not(.more-examples-toggle){max-width:100%;overflow-x:auto;}.content .out-of-band{flex-grow:0;font-size:1.125rem;font-weight:normal;float:right;}.method>.code-header,.trait-impl>.code-header{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{flex-grow:1;margin:0px;padding:0px;overflow-wrap:break-word;overflow-wrap:anywhere;}.in-band>code,.in-band>.code-header{display:inline-block;}#main-content{position:relative;}#main-content>.since{top:inherit;font-family:"Fira Sans",Arial,sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.125rem;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);overflow-x:auto;display:block;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content>.methods>.method{font-size:1rem;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.875rem;}.content .methods>div:not(.notable-traits):not(.method){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.item-info{display:block;}.content .item-info code{font-size:0.875rem;}.content .item-info{position:relative;margin-left:24px;}.sub-variant>div>.item-info{margin-top:initial;}.content .impl-items .docblock,.content .impl-items .item-info{margin-bottom:.6em;}.content .impl-items>.item-info{margin-left:40px;}.methods>.item-info,.content .impl-items>.item-info{margin-top:-8px;}.impl-items{flex-basis:100%;}#main-content>.item-info{margin-top:0;margin-left:0;}nav.sub{flex-grow:1;margin-bottom:25px;}.source nav.sub{margin-left:32px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}a{text-decoration:none;background:transparent;}.small-section-header{display:flex;justify-content:space-between;position:relative;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor,.impl:hover>.anchor,.method.trait-impl:hover>.anchor,.type.trait-impl:hover>.anchor,.associatedconstant.trait-impl:hover>.anchor,.associatedtype.trait-impl:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.anchor::before{content:'§';}.docblock a:not(.srclink):not(.test-arrow):not(.scrape-help):hover,.docblock-short a:not(.srclink):not(.test-arrow):not(.scrape-help):hover,.item-info a{text-decoration:underline;}.block a.current.crate{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;}.item-row{display:table-row;}.item-left,.item-right{display:table-cell;}.item-left{padding-right:1.25rem;}.search-container{position:relative;display:flex;height:34px;}.search-container>*{height:100%;}.search-results-title{display:inline;}#search-settings{font-size:1.5rem;font-weight:500;margin-bottom:20px;}#crate-search{min-width:115px;margin-top:5px;margin-left:0.25em;padding-left:0.3125em;padding-right:23px;border:1px solid;border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;background-image:url("down-arrow.svg");}.search-container{margin-top:4px;}.search-input{-webkit-appearance:none;-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:1px solid;border-radius:2px;padding:8px;font-size:1rem;transition:border-color 300ms ease;width:100%;}.search-results{display:none;padding-bottom:2em;}.search-results.active{display:block;clear:both;}.search-results .desc>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results>a{display:block;width:100%;margin-left:2px;margin-right:2px;border-bottom:1px solid #aaa3;}.search-results>a>div{display:flex;flex-flow:row wrap;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:50%;}.search-results .result-name{padding-right:1em;}.search-results .result-name>span{display:inline-block;margin:0;font-weight:normal;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{text-align:center;display:block;margin:10px 0;border-bottom:1px solid;padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:0 20px 20px 17px;;}.item-info .stab{display:inline-block;}.stab{padding:3px;margin-bottom:5px;font-size:0.875rem;font-weight:normal;}.stab p{display:inline;}.stab .emoji{font-size:1.25rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.module-item .stab,.import-item .stab{border-radius:3px;display:inline-block;font-size:0.875rem;line-height:1.2;margin-bottom:0;margin-left:0.3125em;padding:2px;vertical-align:text-bottom;}.module-item.unstable,.import-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink,.methods .srclink{font-weight:normal;font-size:1rem;}.rightside{float:right;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;}.example-wrap:hover .test-arrow{visibility:visible;}a.test-arrow:hover{text-decoration:none;}.code-attribute{font-weight:300;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:1.25rem;}h3.variant{font-weight:600;font-size:1.125rem;margin-bottom:10px;border-bottom:none;}.sub-variant h4{font-size:1rem;font-weight:400;border-bottom:none;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}:target>code,:target>.code-header{opacity:1;}:target{padding-right:3px;}.information{position:absolute;left:-25px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip::after{display:none;text-align:center;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;font-size:1rem;}.tooltip.ignore::after{content:"This example is not tested";}.tooltip.compile_fail::after{content:"This example deliberately fails to compile";}.tooltip.should_panic::after{content:"This example panics";}.tooltip.edition::after{content:"This code runs with edition " attr(data-edition);}.tooltip::before{content:" ";position:absolute;top:50%;left:16px;margin-top:-5px;border-width:5px;border-style:solid;display:none;}.tooltip:hover::before,.tooltip:hover::after{display:inline;}.tooltip.compile_fail,.tooltip.should_panic,.tooltip.ignore{font-weight:bold;font-size:1.25rem;}.notable-traits-tooltip{display:inline-block;cursor:pointer;}.notable-traits:hover .notable-traits-tooltiptext,.notable-traits .notable-traits-tooltiptext.force-tooltip{display:inline-block;}.notable-traits .notable-traits-tooltiptext{display:none;padding:5px 3px 3px 3px;border-radius:6px;margin-left:5px;z-index:10;font-size:1rem;cursor:default;position:absolute;border:1px solid;}.notable-traits-tooltip::after{content:"\00a0\00a0\00a0";}.notable-traits .notable,.notable-traits .docblock{margin:0;}.notable-traits .notable{margin:0;margin-bottom:13px;font-size:1.1875rem;font-weight:600;display:block;}.notable-traits .docblock code.content{margin:0;padding:0;font-size:1.25rem;}pre.rust.rust-example-rendered{position:relative;}pre.rust{tab-size:4;-moz-tab-size:4;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>button{float:left;width:33.3%;text-align:center;font-size:1.125rem;cursor:pointer;border:0;border-top:2px solid;}#titles>button:first-child:last-child{margin-right:1px;width:calc(100% - 1px);}#titles>button:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>button>div.count{display:inline-block;font-size:1rem;}.notable-traits{cursor:pointer;z-index:2;margin-left:5px;}#sidebar-toggle{position:sticky;top:0;left:0;cursor:pointer;font-weight:bold;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:center;align-items:center;z-index:10;}#source-sidebar{width:100%;z-index:1;overflow:auto;}#source-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid;margin-bottom:6px;}#settings-menu,#help-button{margin-left:4px;outline:none;}#copy-path{height:34px;}#settings-menu>a,#help-button,#copy-path{padding:5px;width:33px;border:1px solid;border-radius:2px;cursor:pointer;}#settings-menu{padding:0;}#settings-menu>a{padding:5px;width:100%;height:100%;display:block;}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}#help-button{font-family:"Fira Sans",Arial,sans-serif;text-align:center;font-size:20px;padding-top:2px;}#copy-path{background:initial;margin-left:10px;padding:0;padding-left:2px;border:0;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px 8px;text-align:center;background:rgba(0,0,0,0);overflow-wrap:normal;}#theme-choices>button:not(:first-child){border-top:1px solid;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:1rem;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:1.125rem;display:block;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main-content>ul{padding-left:10px;}#main-content>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.625rem;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}details.rustdoc-toggle>summary.hideme{cursor:pointer;}details.rustdoc-toggle>summary{list-style:none;}details.rustdoc-toggle>summary::-webkit-details-marker,details.rustdoc-toggle>summary::marker{display:none;}details.rustdoc-toggle>summary.hideme>span{margin-left:9px;}details.rustdoc-toggle>summary::before{content:"";cursor:pointer;width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;vertical-align:middle;opacity:.5;}details.rustdoc-toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.rustdoc-toggle>summary.hideme::after{content:"";}details.rustdoc-toggle>summary:focus::before,details.rustdoc-toggle>summary:hover::before{opacity:1;}details.rustdoc-toggle.top-doc>summary,details.rustdoc-toggle.top-doc>summary::before,details.rustdoc-toggle.non-exhaustive>summary,details.rustdoc-toggle.non-exhaustive>summary::before{font-family:'Fira Sans';font-size:1rem;}details.non-exhaustive{margin-bottom:8px;}details.rustdoc-toggle>summary.hideme::before{position:relative;}details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.rustdoc-toggle[open] >summary.hideme{position:absolute;}details.rustdoc-toggle{position:relative;}details.rustdoc-toggle[open] >summary.hideme>span{display:none;}details.undocumented[open] >summary::before,details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{background-image:url("toggle-minus.svg");}details.undocumented>summary::before,details.rustdoc-toggle>summary::before{background-image:url("toggle-plus.svg");}details.rustdoc-toggle[open] >summary::before,details.rustdoc-toggle[open] >summary.hideme::before{width:16px;height:16px;background-repeat:no-repeat;background-position:top left;display:inline-block;content:"";}details.rustdoc-toggle[open] >summary::after,details.rustdoc-toggle[open] >summary.hideme::after{content:"Collapse";}@media (min-width:701px){.docblock>.information:first-child>.tooltip{margin-top:16px;}.source-sidebar-expanded .source .sidebar+main .width-limiter .sub-logo-container.rust-logo{display:none;}.source-sidebar-expanded .source .sidebar{width:300px;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{padding-top:0px;display:block;}main{padding-left:15px;padding-top:0px;}.rustdoc,.main-heading{flex-direction:column;}.content .out-of-band{text-align:left;margin-left:initial;padding:initial;}.content .out-of-band .since::before{content:"Since ";}#copy-path{display:none;}.sidebar .sidebar-logo,.sidebar .location{display:none;}.sidebar-elems{margin-top:1em;}.sidebar{position:fixed;top:45px;left:-1000px;margin-left:0;background-color:rgba(0,0,0,0);margin:0;padding:0;z-index:11;height:calc(100vh - 45px);}.source main,.source .sidebar{top:0;padding:0;}.sidebar.shown,.source-sidebar-expanded .source .sidebar,.sidebar:focus-within{left:0;}.rustdoc.source>.sidebar{position:fixed;margin:0;z-index:11;width:0;}.mobile-topbar .location a{padding:0;margin:0;}.mobile-topbar .location{border:none;padding:0;margin:auto 0.5em auto auto;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:24px;}.mobile-topbar .logo-container{max-height:45px;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin-left:20px;margin-top:5px;margin-bottom:5px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.source .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;}.source nav:not(.sidebar).sub{margin-left:32px;}.content{margin-left:0px;}.source .content{margin-top:10px;}#search{margin-left:0;padding:0;}.anchor{display:none !important;}.notable-traits{position:absolute;left:-22px;top:24px;}#titles>button>div.count{float:left;width:100%;}#titles{height:50px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}#main-content>details.rustdoc-toggle>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}#sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;border:1px solid;border-left:0;}.source-sidebar-expanded #sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;}#source-sidebar{z-index:11;}#main-content>.line-numbers{margin-top:0;}.notable-traits .notable-traits-tooltiptext{left:0;top:100%;}#help-button{display:none;}.item-table{display:block;}.item-row{display:flex;flex-flow:column wrap;}.item-left,.item-right{width:100%;}.search-results>a{border-bottom:1px solid #aaa9;padding:5px 0px;}.search-results .result-name,.search-results div.desc,.search-results .result-description{width:100%;}.search-results div.desc,.search-results .result-description,.item-right{padding-left:2em;}.source-sidebar-expanded .source .sidebar{max-width:100vw;width:100vw;}details.rustdoc-toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.rustdoc-toggle>summary:not(.hideme)::before,#main-content>details.rustdoc-toggle:not(.top-doc)>summary::before,#main-content>div>details.rustdoc-toggle>summary::before{left:-11px;}}@media print{nav.sub,.content .out-of-band{display:none;}}@media (max-width:464px){#titles,#titles>button{height:73px;}#main-content>table:not(.table-display) td{word-break:break-word;width:50%;}#crate-search{border-radius:4px;}.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}.sub-container{flex-direction:column;}.sub-logo-container{align-self:center;}.source .sub-logo-container>img{height:35px;width:35px;}#sidebar-toggle{top:10px;}.source-sidebar-expanded #sidebar-toggle{top:unset;}}.method-toggle summary,.implementors-toggle summary,.impl{margin-bottom:0.75em;}.method-toggle[open]{margin-bottom:2em;}.implementors-toggle[open]{margin-bottom:2em;}#trait-implementations-list .method-toggle,#synthetic-implementations-list .method-toggle,#blanket-implementations-list .method-toggle{margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;background:transparent;border-width:1px;border-style:solid;border-radius:50px;}.scraped-example-title{font-family:'Fira Sans';}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:240px;}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;max-height:240px;padding-bottom:0;}.scraped-example:not(.expanded) .code-wrapper pre.line-numbers{overflow-x:hidden;}.scraped-example .code-wrapper .prev{position:absolute;top:0.25em;right:2.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .next{position:absolute;top:0.25em;right:1.25em;z-index:100;cursor:pointer;}.scraped-example .code-wrapper .expand{position:absolute;top:0.25em;right:0.25em;z-index:100;cursor:pointer;}.scraped-example:not(.expanded) .code-wrapper:before{content:" ";width:100%;height:5px;position:absolute;z-index:100;top:0;}.scraped-example:not(.expanded) .code-wrapper:after{content:" ";width:100%;height:5px;position:absolute;z-index:100;bottom:0;}.scraped-example .code-wrapper .line-numbers{margin:0;padding:14px 0;}.scraped-example .code-wrapper .line-numbers span{padding:0 14px;}.scraped-example .code-wrapper .example-wrap{flex:1;overflow-x:auto;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .code-wrapper .example-wrap pre.rust{overflow-x:inherit;width:inherit;overflow-y:hidden;}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;margin-bottom:5px;cursor:pointer;}.more-examples-toggle summary,.more-examples-toggle .hide-more{font-family:'Fira Sans';}.more-scraped-examples{margin-left:5px;display:flex;flex-direction:row;}.more-scraped-examples-inner{width:calc(100% - 20px);}.toggle-line{align-self:stretch;margin-right:10px;margin-top:5px;padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;}.more-scraped-examples .scraped-example{margin-bottom:20px;}.more-scraped-examples .scraped-example:last-child{margin-bottom:0;}.example-links a{margin-top:20px;font-family:'Fira Sans';}.example-links ul{margin-bottom:0;} \ No newline at end of file diff --git a/search-index.js b/search-index.js index 7fe38ab..4715d62 100644 --- a/search-index.js +++ b/search-index.js @@ -1,5 +1,5 @@ var searchIndex = JSON.parse('{\ -"kvm_rs":{"doc":"","t":[12,3,3,11,11,11,11,11,11,0,11,11,11,11,11,0,0,11,11,11,11,11,11,11,11,0,0,11,0,4,4,13,13,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,11,11,11,11,11,12,12,12,12,12,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,11,11,11,11,11,3,3,3,3,3,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,13,13,13,13,4,13,13,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,3,11,11,11,11,11,11,11,11,11,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,5,5,5,5,5,5,5,5,5,5,5,5,5,5],"n":["0","PhysAddr","UserMem","as_mut","as_ref","borrow","borrow","borrow_mut","borrow_mut","cap","drop","from","from","into","into","kvm","kvm_sys","load","new","try_from","try_from","try_into","try_into","type_id","type_id","vcpu","vm","with_init","x86_64","CapBool","CapInt","CheckExtensionVm","MaxVcpus","NrVcpus","borrow","borrow","borrow_mut","borrow_mut","from","from","into","into","into","into","try_from","try_from","try_into","try_into","type_id","type_id","Kvm","borrow","borrow_mut","check_extenstion","check_extenstion_int","create_vm","from","into","new","try_from","try_into","type_id","apic_base","avl","base","base","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","cr0","cr2","cr3","cr4","cr8","cs","db","db","default","default","default","default","default","dpl","dr6","dr7","ds","efer","es","flags","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","fs","g","gdt","gs","idt","interrupt_bitmap","into","into","into","into","into","kvm_debugregs","kvm_dtable","kvm_regs","kvm_segment","kvm_sregs","l","ldt","limit","limit","present","r10","r11","r12","r13","r14","r15","r8","r9","rax","rbp","rbx","rcx","rdi","rdx","reserved","rflags","rip","rsi","rsp","s","selector","ss","to_string","to_string","to_string","to_string","tr","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_","type_id","type_id","type_id","type_id","type_id","Debug","Halt","IoIn","IoOut","KvmExit","MmioRead","MmioWrite","Vcpu","borrow","borrow","borrow_mut","borrow_mut","from","from","get_debugregs","get_regs","get_sregs","into","into","run","set_debugregs","set_regs","set_single_step","set_sregs","try_from","try_from","try_into","try_into","type_id","type_id","0","0","0","0","0","1","1","1","1","Vm","borrow","borrow_mut","create_vpcu","from","into","set_user_memory_region","try_from","try_into","type_id","CR0_AM","CR0_CD","CR0_EM","CR0_ET","CR0_MP","CR0_NE","CR0_NW","CR0_PE","CR0_PG","CR0_TS","CR0_WP","CR3_PAGE_BASE_MASK","CR3_PCD","CR3_PWT","CR4_LA57","CR4_PAE","EFER_LMA","EFER_LME","MSR_EFER","PAGE_ENTRY_PRESENT","PAGE_ENTRY_RW","RFLAGS_AC","RFLAGS_AF","RFLAGS_CF","RFLAGS_DF","RFLAGS_IF","RFLAGS_IOPL","RFLAGS_OF","RFLAGS_PF","RFLAGS_SF","RFLAGS_TF","RFLAGS_ZF","SEG_SELECTOR_INDEX","SEG_SELECTOR_RPL","SEG_SELECTOR_TI","rflags_ac","rflags_af","rflags_cf","rflags_df","rflags_if","rflags_iopl","rflags_of","rflags_pf","rflags_sf","rflags_tf","rflags_zf","seg_selector_index","seg_selector_rpl","seg_selector_ti"],"q":["kvm_rs","","","","","","","","","","","","","","","","","","","","","","","","","","","","","kvm_rs::cap","","","","","","","","","","","","","","","","","","","","","kvm_rs::kvm","","","","","","","","","","","","kvm_rs::kvm_sys","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","kvm_rs::vcpu","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","kvm_rs::vcpu::KvmExit","","","","","","","","","kvm_rs::vm","","","","","","","","","","kvm_rs::x86_64","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["","Strong type representing physical addresses.","Wrapper to safely allocate memory for guest VMs.","","","","","","","Definitions of KVM capabilities.","Free underlying memory.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","KVM system ioctls.","Definitions of the system header <linux/kvm.h>.","Load the bytes stored in data into memory at physical …","Allocate a zero-initialized memory region of len bytes.","","","","","","","VCPU system ioctls.","VM system ioctls.","Allocate a zero-initialized memory region of len bytes and …","x86_64 flags and bitfields.","Definition of capabilities that return a bool value …","Definition of capabilities that return an integer value …","Check if capabilities can be queried on VM fds (…","Get the possible max VPCUs (KVM_CAP_MAX_VCPUS).","Get the recommended max VPCUs (KVM_CAP_NR_VCPUS).","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","Calls U::from(self).","","Calls U::from(self).","","","","","","","Wrapper for /dev/kvm ioctls.","","","Check availability of an extension with the …","Check availability of an extension with the …","Create a new virtual machine with the KVM_CREATE_VM ioctl. …","Returns the argument unchanged.","Calls U::from(self).","Open the /dev/kvm device.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Exit reasons for the Vcpu::run function.","","","Wrapper for VCPU ioctls.","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Get the debug registers with the KVM_GET_DEBUGREGS ioctl …","Get the general purpose registers with the KVM_GET_REGS …","Get the special registers with the KVM_GET_SREGS ioctl in …","Calls U::from(self).","Calls U::from(self).","Run the guest VCPU with the KVM_RUN ioctl until it exits …","Set the debug registers with the KVM_SET_DEBUGREGS ioctl …","Set the general purpose registers with the KVM_SET_REGS …","Enable or disable guest single steppig (debug) with the …","Set the special registers with the KVM_SET_SREGS ioctl in …","","","","","","","","","","","","","","","","Wrapper for VM ioctls.","","","Create a new virtual cpu with the KVM_CREATE_VCPU ioctl. …","Returns the argument unchanged.","Calls U::from(self).","Map memory from userspace into the VM as guest physical …","","","","Alignment Mask.","Cachine disable.","Emulation.","Extension Type.","Monitor Coprocessor.","Numeric Error.","Not Write-Torugh.","Protection Enable.","Paging.","Task Switched.","Write Protect.","Mask for physical base address of paging structure.","Page-level Cache Disable.","Page-level Write-Through.","57-bit Linear Addresses.","Physical Address Extenstion.","Long Mode Active (readonly).","Long Mode Enable.","Extended Feature Enable Register MSR number.","Page entry present.","Page region read/write.","Alignment check.","Adjust flag.","Carry flag.","Direction flag.","Sign flag.","I/O privilege level.","Overflow flag.","Parity flag.","Sign flag.","Trap flag.","Zero flag.","Table index.","Requested privilege level.","Table indicator.","","","","","","","","","","","","","",""],"i":[1,0,0,2,2,1,2,1,2,0,2,1,2,1,2,0,0,2,2,1,2,1,2,1,2,0,0,2,0,0,0,3,4,4,3,4,3,4,3,4,3,3,4,4,3,4,3,4,3,4,0,5,5,5,5,5,5,5,5,5,5,5,6,7,7,8,9,7,8,6,10,9,7,8,6,10,6,6,6,6,6,6,7,10,9,7,8,6,10,7,10,10,6,6,6,10,9,9,7,7,8,8,6,6,10,9,7,8,6,10,6,7,6,6,6,6,9,7,8,6,10,0,0,0,0,0,7,6,7,8,7,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,9,9,9,9,7,7,6,9,7,8,6,6,9,7,8,6,10,9,7,8,6,10,7,9,7,8,6,10,11,11,11,11,0,11,11,0,11,12,11,12,11,12,12,12,12,11,12,12,12,12,12,12,11,12,11,12,11,12,13,14,15,16,17,13,14,15,16,0,18,18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"f":[null,null,null,[[["usermem",3]]],[[["usermem",3]]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],null,[[["usermem",3]]],[[]],[[]],[[]],[[]],null,null,[[["usermem",3],["physaddr",3]]],[[["usize",0]],["result",6,[["usermem",3]]]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],null,null,[[["usize",0]],["result",6,[["usermem",3]]]],null,null,null,null,null,null,[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[]],[[]],[[["capbool",4]],["u64",0]],[[]],[[["capint",4]],["u64",0]],[[]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],null,[[["",0]],["",0]],[[["",0]],["",0]],[[["kvm",3],["capbool",4]],["bool",0]],[[["kvm",3],["capint",4]],["i32",0]],[[["kvm",3]],["result",6,[["vm",3]]]],[[]],[[]],[[],["result",6,[["kvm",3]]]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],null,null,null,null,[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],null,null,null,null,null,null,null,null,[[],["kvm_regs",3]],[[],["kvm_segment",3]],[[],["kvm_dtable",3]],[[],["kvm_sregs",3]],[[],["kvm_debugregs",3]],null,null,null,null,null,null,null,[[["kvm_regs",3],["formatter",3]],["result",6]],[[["kvm_regs",3],["formatter",3]],["result",6]],[[["kvm_segment",3],["formatter",3]],["result",6]],[[["kvm_segment",3],["formatter",3]],["result",6]],[[["kvm_dtable",3],["formatter",3]],["result",6]],[[["kvm_dtable",3],["formatter",3]],["result",6]],[[["kvm_sregs",3],["formatter",3]],["result",6]],[[["kvm_sregs",3],["formatter",3]],["result",6]],[[["kvm_debugregs",3],["formatter",3]],["result",6]],[[]],[[]],[[]],[[]],[[]],null,null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[["",0]],["string",3]],[[["",0]],["string",3]],[[["",0]],["string",3]],[[["",0]],["string",3]],null,[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],null,[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],null,null,null,null,null,null,null,null,[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[]],[[]],[[["vcpu",3]],["result",6,[["kvm_debugregs",3]]]],[[["vcpu",3]],["result",6,[["kvm_regs",3]]]],[[["vcpu",3]],["result",6,[["kvm_sregs",3]]]],[[]],[[]],[[["vcpu",3]],["result",6,[["kvmexit",4]]]],[[["vcpu",3],["kvm_debugregs",3]],["result",6]],[[["vcpu",3],["kvm_regs",3]],["result",6]],[[["vcpu",3],["bool",0]],["result",6]],[[["vcpu",3],["kvm_sregs",3]],["result",6]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],null,null,null,null,null,null,null,null,null,null,[[["",0]],["",0]],[[["",0]],["",0]],[[["vm",3],["u64",0]],["result",6,[["vcpu",3]]]],[[]],[[]],[[["vm",3],["physaddr",3],["usermem",3]],["result",6]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[["u64",0]],["u64",0]],[[["u64",0]],["u64",0]],[[["u64",0]],["u64",0]],[[["u64",0]],["u64",0]],[[["u64",0]],["u64",0]],[[["u64",0]],["u64",0]],[[["u64",0]],["u64",0]],[[["u64",0]],["u64",0]],[[["u64",0]],["u64",0]],[[["u64",0]],["u64",0]],[[["u64",0]],["u64",0]],[[["u16",0]],["u16",0]],[[["u16",0]],["u16",0]],[[["u16",0]],["u16",0]]],"p":[[3,"PhysAddr"],[3,"UserMem"],[4,"CapBool"],[4,"CapInt"],[3,"Kvm"],[3,"kvm_sregs"],[3,"kvm_segment"],[3,"kvm_dtable"],[3,"kvm_regs"],[3,"kvm_debugregs"],[4,"KvmExit"],[3,"Vcpu"],[13,"IoIn"],[13,"IoOut"],[13,"MmioRead"],[13,"MmioWrite"],[13,"Debug"],[3,"Vm"]]}\ +"kvm_rs":{"doc":"","t":"DDLLLLLLALLLLLAALLLLLLLLAALAEENNNLLLLLLLLLLLLLLLLDLLLLLLLLLLLMMMMLLLLLLLLLLMMMMMMMMLLLLLMMMMMMMLLLLLLLLLLLLLLMMMMMMLLLLLDDDDDMMMMMMMMMMMMMMMMMMMMMMMMMMMLLLLMLLLLLLLLLLMLLLLLNNNNENNDLLLLLLLLLLLLLLLLLLLLLLDLLLLLLLLLRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRFFFFFFFFFFFFFF","n":["PhysAddr","UserMem","as_mut","as_ref","borrow","borrow","borrow_mut","borrow_mut","cap","drop","from","from","into","into","kvm","kvm_sys","load","new","try_from","try_from","try_into","try_into","type_id","type_id","vcpu","vm","with_init","x86_64","CapBool","CapInt","CheckExtensionVm","MaxVcpus","NrVcpus","borrow","borrow","borrow_mut","borrow_mut","from","from","into","into","into","into","try_from","try_from","try_into","try_into","type_id","type_id","Kvm","borrow","borrow_mut","check_extenstion","check_extenstion_int","create_vm","from","into","new","try_from","try_into","type_id","apic_base","avl","base","base","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","cr0","cr2","cr3","cr4","cr8","cs","db","db","default","default","default","default","default","dpl","dr6","dr7","ds","efer","es","flags","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","fs","g","gdt","gs","idt","interrupt_bitmap","into","into","into","into","into","kvm_debugregs","kvm_dtable","kvm_regs","kvm_segment","kvm_sregs","l","ldt","limit","limit","present","r10","r11","r12","r13","r14","r15","r8","r9","rax","rbp","rbx","rcx","rdi","rdx","reserved","rflags","rip","rsi","rsp","s","selector","ss","to_string","to_string","to_string","to_string","tr","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_","type_id","type_id","type_id","type_id","type_id","Debug","Halt","IoIn","IoOut","KvmExit","MmioRead","MmioWrite","Vcpu","borrow","borrow","borrow_mut","borrow_mut","from","from","get_debugregs","get_regs","get_sregs","into","into","run","set_debugregs","set_regs","set_single_step","set_sregs","try_from","try_from","try_into","try_into","type_id","type_id","Vm","borrow","borrow_mut","create_vpcu","from","into","set_user_memory_region","try_from","try_into","type_id","CR0_AM","CR0_CD","CR0_EM","CR0_ET","CR0_MP","CR0_NE","CR0_NW","CR0_PE","CR0_PG","CR0_TS","CR0_WP","CR3_PAGE_BASE_MASK","CR3_PCD","CR3_PWT","CR4_LA57","CR4_PAE","EFER_LMA","EFER_LME","MSR_EFER","PAGE_ENTRY_PRESENT","PAGE_ENTRY_RW","RFLAGS_AC","RFLAGS_AF","RFLAGS_CF","RFLAGS_DF","RFLAGS_IF","RFLAGS_IOPL","RFLAGS_OF","RFLAGS_PF","RFLAGS_SF","RFLAGS_TF","RFLAGS_ZF","SEG_SELECTOR_INDEX","SEG_SELECTOR_RPL","SEG_SELECTOR_TI","rflags_ac","rflags_af","rflags_cf","rflags_df","rflags_if","rflags_iopl","rflags_of","rflags_pf","rflags_sf","rflags_tf","rflags_zf","seg_selector_index","seg_selector_rpl","seg_selector_ti"],"q":[[0,"kvm_rs"],[28,"kvm_rs::cap"],[49,"kvm_rs::kvm"],[61,"kvm_rs::kvm_sys"],[173,"kvm_rs::vcpu"],[203,"kvm_rs::vm"],[213,"kvm_rs::x86_64"]],"d":["Strong type representing physical addresses.","Wrapper to safely allocate memory for guest VMs.","","","","","","","Definitions of KVM capabilities.","Free underlying memory.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","KVM system ioctls.","Definitions of the system header <linux/kvm.h>.","Load the bytes stored in data into memory at physical …","Allocate a zero-initialized memory region of len bytes.","","","","","","","VCPU system ioctls.","VM system ioctls.","Allocate a zero-initialized memory region of len bytes and …","x86_64 flags and bitfields.","Definition of capabilities that return a bool value …","Definition of capabilities that return an integer value …","Check if capabilities can be queried on VM fds (…","Get the possible max VPCUs (KVM_CAP_MAX_VCPUS).","Get the recommended max VPCUs (KVM_CAP_NR_VCPUS).","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","","","Calls U::from(self).","","","","","","","Wrapper for /dev/kvm ioctls.","","","Check availability of an extension with the …","Check availability of an extension with the …","Create a new virtual machine with the KVM_CREATE_VM ioctl. …","Returns the argument unchanged.","Calls U::from(self).","Open the /dev/kvm device.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Exit reasons for the Vcpu::run function.","","","Wrapper for VCPU ioctls.","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Get the debug registers with the KVM_GET_DEBUGREGS ioctl …","Get the general purpose registers with the KVM_GET_REGS …","Get the special registers with the KVM_GET_SREGS ioctl in …","Calls U::from(self).","Calls U::from(self).","Run the guest VCPU with the KVM_RUN ioctl until it exits …","Set the debug registers with the KVM_SET_DEBUGREGS ioctl …","Set the general purpose registers with the KVM_SET_REGS …","Enable or disable guest single steppig (debug) with the …","Set the special registers with the KVM_SET_SREGS ioctl in …","","","","","","","Wrapper for VM ioctls.","","","Create a new virtual cpu with the KVM_CREATE_VCPU ioctl. …","Returns the argument unchanged.","Calls U::from(self).","Map memory from userspace into the VM as guest physical …","","","","Alignment Mask.","Cachine disable.","Emulation.","Extension Type.","Monitor Coprocessor.","Numeric Error.","Not Write-Torugh.","Protection Enable.","Paging.","Task Switched.","Write Protect.","Mask for physical base address of paging structure.","Page-level Cache Disable.","Page-level Write-Through.","57-bit Linear Addresses.","Physical Address Extenstion.","Long Mode Active (readonly).","Long Mode Enable.","Extended Feature Enable Register MSR number.","Page entry present.","Page region read/write.","Alignment check.","Adjust flag.","Carry flag.","Direction flag.","Sign flag.","I/O privilege level.","Overflow flag.","Parity flag.","Sign flag.","Trap flag.","Zero flag.","Table index.","Requested privilege level.","Table indicator.","","","","","","","","","","","","","",""],"i":[0,0,1,1,4,1,4,1,0,1,4,1,4,1,0,0,1,1,4,1,4,1,4,1,0,0,1,0,0,0,9,11,11,9,11,9,11,9,11,9,9,11,11,9,11,9,11,9,11,0,12,12,12,12,12,12,12,12,12,12,12,19,17,17,18,16,17,18,19,20,16,17,18,19,20,19,19,19,19,19,19,17,20,16,17,18,19,20,17,20,20,19,19,19,20,16,16,17,17,18,18,19,19,20,16,17,18,19,20,19,17,19,19,19,19,16,17,18,19,20,0,0,0,0,0,17,19,17,18,17,16,16,16,16,16,16,16,16,16,16,16,16,16,16,20,16,16,16,16,17,17,19,16,17,18,19,19,16,17,18,19,20,16,17,18,19,20,17,16,17,18,19,20,25,25,25,25,0,25,25,0,25,24,25,24,25,24,24,24,24,25,24,24,24,24,24,24,25,24,25,24,25,24,0,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"f":[0,0,[1,[[3,[2]]]],[1,[[3,[2]]]],[[]],[[]],[[]],[[]],0,[1],[[]],[[]],[[]],[[]],0,0,[[1,4,[3,[2]]]],[5,[[6,[1]]]],[[],7],[[],7],[[],7],[[],7],[[],8],[[],8],0,0,[[5,[3,[2]]],[[6,[1]]]],0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[9,10],[11,10],[[]],[[],7],[[],7],[[],7],[[],7],[[],8],[[],8],0,[[]],[[]],[[12,9],13],[[12,11],14],[12,[[6,[15]]]],[[]],[[]],[[],[[6,[12]]]],[[],7],[[],7],[[],8],0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,0,0,0,[[],16],[[],17],[[],18],[[],19],[[],20],0,0,0,0,0,0,0,[[16,21],22],[[16,21],22],[[17,21],22],[[17,21],22],[[18,21],22],[[18,21],22],[[19,21],22],[[19,21],22],[[20,21],22],[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[],23],[[],23],[[],23],[[],23],0,[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],[[],7],0,[[],8],[[],8],[[],8],[[],8],[[],8],0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[24,[[6,[20]]]],[24,[[6,[16]]]],[24,[[6,[19]]]],[[]],[[]],[24,[[6,[25]]]],[[24,20],6],[[24,16],6],[[24,13],6],[[24,19],6],[[],7],[[],7],[[],7],[[],7],[[],8],[[],8],0,[[]],[[]],[[15,10],[[6,[24]]]],[[]],[[]],[[15,4,1],6],[[],7],[[],7],[[],8],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[10,10],[10,10],[10,10],[10,10],[10,10],[10,10],[10,10],[10,10],[10,10],[10,10],[10,10],[26,26],[26,26],[26,26]],"c":[],"p":[[3,"UserMem"],[15,"u8"],[15,"slice"],[3,"PhysAddr"],[15,"usize"],[6,"Result"],[4,"Result"],[3,"TypeId"],[4,"CapBool"],[15,"u64"],[4,"CapInt"],[3,"Kvm"],[15,"bool"],[15,"i32"],[3,"Vm"],[3,"kvm_regs"],[3,"kvm_segment"],[3,"kvm_dtable"],[3,"kvm_sregs"],[3,"kvm_debugregs"],[3,"Formatter"],[6,"Result"],[3,"String"],[3,"Vcpu"],[4,"KvmExit"],[15,"u16"]]}\ }'); if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; diff --git a/search.js b/search.js deleted file mode 100644 index 8fd46df..0000000 --- a/search.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const 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",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_KEYWORD=itemTypes.indexOf("keyword");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("titles").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb}else if(nb!==0){printTab(0)}}const levenshtein_row2=[];function levenshtein(s1,s2){if(s1===s2){return 0}const s1_len=s1.length,s2_len=s2.length;if(s1_len&&s2_len){let i1=0,i2=0,a,b,c,c2;const row=levenshtein_row2;while(i1-".indexOf(c)!==-1}function isStopCharacter(c){return isWhitespace(c)||isEndCharacter(c)}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){for(let i=0,len=itemTypes.length;i0){throw new Error("Cannot use literal search when there is more than one element")}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw new Error("Unclosed `\"`")}else if(parserState.userQuery[end]!=="\""){throw new Error(`Unexpected \`${parserState.userQuery[end]}\` in a string element`)}else if(start===end){throw new Error("Cannot have empty string element")}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||isWhitespaceCharacter(c)}function isWhitespaceCharacter(c){return c===" "||c==="\t"}function createQueryElement(query,parserState,name,generics,isInGenerics){if(name==="*"||(name.length===0&&generics.length===0)){return}if(query.literalSearch&&parserState.totalElems-parserState.genericsElems>0){throw new Error("You cannot have more than one element if you use quotes")}const pathSegments=name.split("::");if(pathSegments.length>1){for(let i=0,len=pathSegments.length;i=end){throw new Error("Found generics without a path")}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(start>=end&&generics.length===0){return}elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;while(parserState.pos"){extra="`<`"}else if(endChar===""){extra="`->`"}throw new Error("Unexpected `"+c+"` after "+extra)}if(!foundStopChar){if(endChar!==""){throw new Error(`Expected \`,\`, \` \` or \`${endChar}\`, found \`${c}\``)}throw new Error(`Expected \`,\` or \` \`, found \`${c}\``)}const posBefore=parserState.pos;getNextElem(query,parserState,elems,endChar===">");if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}parserState.pos+=1}function checkExtraTypeFilterCharacters(parserState){const query=parserState.userQuery;for(let pos=0;pos"){if(isReturnArrow(parserState)){break}throw new Error(`Unexpected \`${c}\` (did you mean \`->\`?)`)}throw new Error(`Unexpected \`${c}\``)}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw new Error("Unexpected `:`")}if(query.elems.length===0){throw new Error("Expected type filter before `:`")}else if(query.elems.length!==1||parserState.totalElems!==1){throw new Error("Unexpected `:`")}else if(query.literalSearch){throw new Error("You cannot use quotes on type filter")}checkExtraTypeFilterCharacters(parserState);parserState.typeFilter=query.elems.pop().name;parserState.pos+=1;parserState.totalElems=0;query.literalSearch=false;foundStopChar=true;continue}if(!foundStopChar){if(parserState.typeFilter!==null){throw new Error(`Expected \`,\`, \` \` or \`->\`, found \`${c}\``)}throw new Error(`Expected \`,\`, \` \`, \`:\` or \`->\`, found \`${c}\``)}before=query.elems.length;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}while(parserState.pos`")}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),typeFilter:NO_TYPE_FILTER,elems:[],returned:[],foundElems:0,literalSearch:false,error:null,}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return null}function parseQuery(userQuery){userQuery=userQuery.trim();const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);if(parserState.typeFilter!==null){let typeFilter=parserState.typeFilter;if(typeFilter==="const"){typeFilter="constant"}query.typeFilter=itemTypeFromName(typeFilter)}}catch(err){query=newParsedQuery(userQuery);query.error=err.message;query.typeFilter=-1;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,searchWords,filterCrates,currentCrate){const results_others={},results_in_args={},results_returned={};function transformResults(results){const duplicates={};const out=[];for(const result of results){if(result.id>-1){const obj=searchIndex[result.id];obj.lev=result.lev;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates[obj.fullPath]){continue}duplicates[obj.fullPath]=true;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){const userQuery=parsedQuery.userQuery;const ar=[];for(const entry in results){if(hasOwnPropertyRustdoc(results,entry)){const result=results[entry];result.word=searchWords[result.id];result.item=searchIndex[result.id]||{};ar.push(result)}}results=ar;if(results.length===0){return[]}results.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.lev);b=(bbb.lev);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+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});let nameSplit=null;if(parsedQuery.elems.length===1){const hasPath=typeof parsedQuery.elems[0].path==="undefined";nameSplit=hasPath?null:parsedQuery.elems[0].path}for(const result of results){if(result.dontValidate){continue}const name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,nameSplit,parent)){result.id=-1}}return transformResults(results)}function checkGenerics(row,elem,defaultLev){if(row.length<=GENERICS_DATA||row[GENERICS_DATA].length===0){return elem.generics.length===0?defaultLev:MAX_LEV_DISTANCE+1}else if(row[GENERICS_DATA].length>0&&row[GENERICS_DATA][0][NAME]===""){if(row.length>GENERICS_DATA){return checkGenerics(row[GENERICS_DATA][0],elem,defaultLev)}return elem.generics.length===0?defaultLev:MAX_LEV_DISTANCE+1}let elem_name;if(elem.generics.length>0&&row[GENERICS_DATA].length>=elem.generics.length){const elems=Object.create(null);for(const entry of row[GENERICS_DATA]){elem_name=entry[NAME];if(elem_name===""){if(checkGenerics(entry,elem,MAX_LEV_DISTANCE+1)!==0){return MAX_LEV_DISTANCE+1}continue}if(elems[elem_name]===undefined){elems[elem_name]=0}elems[elem_name]+=1}for(const generic of elem.generics){let match=null;if(elems[generic.name]){match=generic.name}else{for(elem_name in elems){if(!hasOwnPropertyRustdoc(elems,elem_name)){continue}if(elem_name===generic){match=elem_name;break}}}if(match===null){return MAX_LEV_DISTANCE+1}elems[match]-=1;if(elems[match]===0){delete elems[match]}}return 0}return MAX_LEV_DISTANCE+1}function checkIfInGenerics(row,elem){let lev=MAX_LEV_DISTANCE+1;for(const entry of row[GENERICS_DATA]){lev=Math.min(checkType(entry,elem,true),lev);if(lev===0){break}}return lev}function checkType(row,elem,literalSearch){if(row[NAME].length===0){if(row.length>GENERICS_DATA){return checkIfInGenerics(row,elem)}return MAX_LEV_DISTANCE+1}let lev=levenshtein(row[NAME],elem.name);if(literalSearch){if(lev!==0){if(elem.generics.length===0){const checkGeneric=(row.length>GENERICS_DATA&&row[GENERICS_DATA].length>0);if(checkGeneric&&row[GENERICS_DATA].findIndex(tmp_elem=>tmp_elem[NAME]===elem.name)!==-1){return 0}}return MAX_LEV_DISTANCE+1}else if(elem.generics.length>0){return checkGenerics(row,elem,MAX_LEV_DISTANCE+1)}return 0}else if(row.length>GENERICS_DATA){if(elem.generics.length===0){if(lev===0){return 0}lev=checkIfInGenerics(row,elem);return lev+0.5}else if(lev>MAX_LEV_DISTANCE){return checkIfInGenerics(row,elem)}else{const tmp_lev=checkGenerics(row,elem,lev);if(tmp_lev>MAX_LEV_DISTANCE){return MAX_LEV_DISTANCE+1}return(tmp_lev+lev)/2}}else if(elem.generics.length>0){return MAX_LEV_DISTANCE+1}return lev}function findArg(row,elem,typeFilter){let lev=MAX_LEV_DISTANCE+1;if(row&&row.type&&row.type[INPUTS_DATA]&&row.type[INPUTS_DATA].length>0){for(const input of row.type[INPUTS_DATA]){if(!typePassesFilter(typeFilter,input[1])){continue}lev=Math.min(lev,checkType(input,elem,parsedQuery.literalSearch));if(lev===0){return 0}}}return parsedQuery.literalSearch?MAX_LEV_DISTANCE+1:lev}function checkReturned(row,elem,typeFilter){let lev=MAX_LEV_DISTANCE+1;if(row&&row.type&&row.type.length>OUTPUT_DATA){let ret=row.type[OUTPUT_DATA];if(typeof ret[0]==="string"){ret=[ret]}for(const ret_ty of ret){if(!typePassesFilter(typeFilter,ret_ty[1])){continue}lev=Math.min(lev,checkType(ret_ty,elem,parsedQuery.literalSearch));if(lev===0){return 0}}}return parsedQuery.literalSearch?MAX_LEV_DISTANCE+1:lev}function checkPath(contains,ty){if(contains.length===0){return 0}let ret_lev=MAX_LEV_DISTANCE+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;if(clength>length){return MAX_LEV_DISTANCE+1}for(let i=0;ilength){break}let lev_total=0;let aborted=false;for(let 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||filter===type)return true;const 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,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES[filterCrates]&&ALIASES[filterCrates][lowerQuery]){const query_aliases=ALIASES[filterCrates][lowerQuery];for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{Object.keys(ALIASES).forEach(crate=>{if(ALIASES[crate][lowerQuery]){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=ALIASES[crate][lowerQuery];for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}})}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,lev){if(lev===0||(!parsedQuery.literalSearch&&lev<=MAX_LEV_DISTANCE)){if(results[fullId]!==undefined){const result=results[fullId];if(result.dontValidate||result.lev<=lev){return}}results[fullId]={id:id,index:index,dontValidate:parsedQuery.literalSearch,lev:lev,}}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let lev,lev_add=0,index=-1;const fullId=row.id;const in_args=findArg(row,elem,parsedQuery.typeFilter);const returned=checkReturned(row,elem,parsedQuery.typeFilter);addIntoResults(results_in_args,fullId,pos,index,in_args);addIntoResults(results_returned,fullId,pos,index,returned);if(!typePassesFilter(parsedQuery.typeFilter,row.ty)){return}const searchWord=searchWords[pos];if(parsedQuery.literalSearch){if(searchWord===elem.name){addIntoResults(results_others,fullId,pos,-1,0)}return}if(elem.name.length===0){if(row.type!==null){lev=checkGenerics(row.type,elem,MAX_LEV_DISTANCE+1);addIntoResults(results_others,fullId,pos,index,lev)}return}if(elem.fullPath.length>1){lev=checkPath(elem.pathWithoutLast,row);if(lev>MAX_LEV_DISTANCE||(parsedQuery.literalSearch&&lev!==0)){return}else if(lev>0){lev_add=lev/10}}if(searchWord.indexOf(elem.pathLast)>-1||row.normalizedName.indexOf(elem.pathLast)>-1){index=row.normalizedName.indexOf(elem.pathLast)}lev=levenshtein(searchWord,elem.pathLast);if(lev>0&&elem.pathLast.length>2&&searchWord.indexOf(elem.pathLast)>-1){if(elem.pathLast.length<6){lev=1}else{lev=0}}lev+=lev_add;if(lev>MAX_LEV_DISTANCE){return}else if(index!==-1&&elem.fullPath.length<2){lev-=1}if(lev<0){lev=0}addIntoResults(results_others,fullId,pos,index,lev)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let totalLev=0;let nbLev=0;function checkArgs(elems,callback){for(const elem of elems){const lev=callback(row,elem,NO_TYPE_FILTER);if(lev<=1){nbLev+=1;totalLev+=lev}else{return false}}return true}if(!checkArgs(parsedQuery.elems,findArg)){return}if(!checkArgs(parsedQuery.returned,checkReturned)){return}if(nbLev===0){return}const lev=Math.round(totalLev/nbLev);addIntoResults(results,row.id,pos,0,lev)}function innerRunQuery(){let elem,i,nSearchWords,in_returned,row;if(parsedQuery.foundElems===1){if(parsedQuery.elems.length===1){elem=parsedQuery.elems[0];for(i=0,nSearchWords=searchWords.length;i0){for(i=0,nSearchWords=searchWords.length;i-1||path.indexOf(key)>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(key)>-1)||levenshtein(name,key)<=MAX_LEV_DISTANCE)){return false}}return true}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const 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){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor="#"+type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const 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=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){const h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){let extraClass="";if(display===true){extraClass=" active"}const output=document.createElement("div");let length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];length+=1;let extra="";if(type==="primitive"){extra=" (primitive type)"}else if(type==="keyword"){extra=" (keyword)"}const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const wrapper=document.createElement("div");const resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){const alias=document.createElement("span");alias.className="alias";const 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);const description=document.createElement("div");description.className="desc";const spanDesc=document.createElement("span");spanDesc.insertAdjacentHTML("beforeend",item.desc);description.appendChild(spanDesc);wrapper.appendChild(description);link.appendChild(wrapper);output.appendChild(link)})}else if(query.error===null){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,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true"&&(!search.firstChild||search.firstChild.innerText!==searchState.loadingText))){const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let 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}}let crates="";const crates_list=Object.keys(rawSearchIndex);if(crates_list.length>1){crates=" in "}let typeFilter="";if(results.query.typeFilter!==NO_TYPE_FILTER){typeFilter=" (type: "+escape(itemTypes[results.query.typeFilter])+")"}let output="
"+`

Results for ${escape(results.query.userQuery)}`+`${typeFilter}

${crates}
`;if(results.query.error!==null){output+=`

Query parser error: "${results.query.error}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}const 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;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("titles").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function search(e,forced){const params=searchState.getQueryStringParams();const query=parseQuery(searchState.input.value.trim());if(e){e.preventDefault()}if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}let filterCrates=getFilterCrates();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";if(browserSupportsHistoryApi()){const newURL=buildUrl(query.original,filterCrates);if(!history.state&&!params.search){history.pushState(null,"",newURL)}else{history.replaceState(null,"",newURL)}}showResults(execQuery(query,searchWords,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildIndex(rawSearchIndex){searchIndex=[];const searchWords=[];let i,word;let currentIndex=0;let id=0;for(const crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}let crateSize=0;const crateCorpus=rawSearchIndex[crate];searchWords.push(crate);const crateRow={crate:crate,ty:1,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),};id+=1;searchIndex.push(crateRow);currentIndex+=1;const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=crateCorpus.q;const itemDescs=crateCorpus.d;const itemParentIdxs=crateCorpus.i;const itemFunctionSearchTypes=crateCorpus.f;const paths=crateCorpus.p;const aliases=crateCorpus.a;let 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]=Object.create(null);for(const alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}if(!hasOwnPropertyRustdoc(ALIASES[crate],alias_name)){ALIASES[crate][alias_name]=[]}for(const local_alias of aliases[alias_name]){ALIASES[crate][alias_name].push(local_alias+currentIndex)}}}currentIndex+=crateSize}return searchWords}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){if(browserSupportsHistoryApi()){history.replaceState(null,window.currentCrate+" - Rust",getNakedUrl()+window.location.hash)}searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="All crates"){const params=searchState.getQueryStringParams();const query=searchState.input.value.trim();if(!history.state&&!params.search){history.pushState(null,"",buildUrl(query,null))}else{history.replaceState(null,"",buildUrl(query,null))}}currentResults=null;search(undefined,true)}const searchWords=buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}return searchWords}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch({})}})() \ No newline at end of file diff --git a/settings.css b/settings.css deleted file mode 100644 index 2be35b2..0000000 --- a/settings.css +++ /dev/null @@ -1 +0,0 @@ -.setting-line{margin:0.6em 0 0.6em 0.3em;position:relative;}.setting-line .choices{display:flex;flex-wrap:wrap;}.setting-line .radio-line input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:1px solid;outline:none;-webkit-appearance:none;cursor:pointer;border-radius:50%;}.setting-line .radio-line input+span{padding-bottom:1px;}.radio-line .setting-name{width:100%;}.radio-line .choice{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:flex;align-items:center;cursor:pointer;}.radio-line .choice+.choice{margin-left:0.5em;}.toggle{position:relative;display:inline-block;width:100%;height:27px;margin-right:20px;display:flex;align-items:center;cursor:pointer;}.toggle input{opacity:0;position:absolute;}.slider{position:relative;width:45px;display:block;height:28px;margin-right:20px;cursor:pointer;background-color:#ccc;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;transition:.3s;}input:checked+.slider:before{transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;}div#settings{position:absolute;right:0;z-index:1;display:block;margin-top:7px;border-radius:3px;border:1px solid;}#settings .setting-line{margin:1.2em 0.6em;}div#settings::before{content:'';position:absolute;right:11px;border:solid;border-width:1px 1px 0 0;display:inline-block;padding:4px;transform:rotate(-45deg);top:-5px;} \ No newline at end of file diff --git a/settings.html b/settings.html index 6299c60..cb2659c 100644 --- a/settings.html +++ b/settings.html @@ -1,8 +1 @@ -Rustdoc settings -

Rustdoc settings

Back
- \ No newline at end of file +Rustdoc settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/settings.js b/settings.js deleted file mode 100644 index 35d65a9..0000000 --- a/settings.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":case"use-system-theme":updateSystemTheme();updateLightAndDark();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 showLightAndDark(){addClass(document.getElementById("theme").parentElement,"hidden");removeClass(document.getElementById("preferred-light-theme").parentElement,"hidden");removeClass(document.getElementById("preferred-dark-theme").parentElement,"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme").parentElement,"hidden");addClass(document.getElementById("preferred-dark-theme").parentElement,"hidden");removeClass(document.getElementById("theme").parentElement,"hidden")}function updateLightAndDark(){if(getSettingValue("use-system-theme")!=="false"){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.getElementsByClassName("slider"),elem=>{const toggle=elem.previousElementSibling;const settingId=toggle.id;const 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(settingsElement.getElementsByClassName("select-wrapper"),elem=>{const select=elem.getElementsByTagName("select")[0];const settingId=select.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){select.value=settingValue}select.onchange=function(){changeSetting(this.id,this.value)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;const settingValue=getSettingValue(settingId);if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){output+="
";const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`
\ - ${setting_name}\ -
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";output+=``});output+="
"}else{const checked=setting["default"]===true?" checked":"";output+=``}output+="
"}return output}function buildSettingsPage(){const themes=getVar("themes").split(",");const settings=[{"name":"Use system theme","js_name":"use-system-theme","default":true,},{"name":"Theme","js_name":"theme","default":"light","options":themes,},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":themes,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":themes,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display=""}function elemIsInParent(elem,parent){while(elem&&elem!==document.body){if(elem===parent){return true}elem=elem.parentElement}return false}function blurHandler(event){const settingsButton=getSettingsButton();if(!elemIsInParent(document.activeElement,settingsButton)&&!elemIsInParent(event.relatedTarget,settingsButton)){window.hideSettings()}}if(isSettingsPage){getSettingsButton().onclick=function(event){event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");window.hideSettings=function(){settingsMenu.style.display="none"};settingsButton.onclick=function(event){if(elemIsInParent(event.target,settingsMenu)){return}event.preventDefault();if(settingsMenu.style.display!=="none"){window.hideSettings()}else{displaySettings()}};settingsButton.onblur=blurHandler;settingsButton.querySelector("a").onblur=blurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=blurHandler});settingsMenu.onblur=blurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/source-files.js b/source-files.js deleted file mode 100644 index d68eabd..0000000 --- a/source-files.js +++ /dev/null @@ -1,3 +0,0 @@ -var sourcesIndex = {}; -sourcesIndex["kvm_rs"] = {"name":"","files":["cap.rs","fmt.rs","kvm.rs","kvm_sys.rs","lib.rs","vcpu.rs","vm.rs","x86_64.rs"]}; -createSourceSidebar(); diff --git a/source-script.js b/source-script.js deleted file mode 100644 index c885670..0000000 --- a/source-script.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const rootPath=document.getElementById("rustdoc-vars").attributes["data-root-path"].value;function createDirEntry(elem,parent,fullPath,hasFoundFile){const name=document.createElement("div");name.className="name";fullPath+=elem["name"]+"/";name.onclick=ev=>{if(hasClass(ev.target,"expand")){removeClass(ev.target,"expand")}else{addClass(ev.target,"expand")}};name.innerText=elem["name"];const children=document.createElement("div");children.className="children";const folders=document.createElement("div");folders.className="folders";if(elem.dirs){for(const dir of elem.dirs){if(createDirEntry(dir,folders,fullPath,hasFoundFile)){addClass(name,"expand");hasFoundFile=true}}}children.appendChild(folders);const files=document.createElement("div");files.className="files";if(elem.files){for(const file_text of elem.files){const file=document.createElement("a");file.innerText=file_text;file.href=rootPath+"src/"+fullPath+file_text+".html";const w=window.location.href.split("#")[0];if(!hasFoundFile&&w===file.href){file.className="selected";addClass(name,"expand");hasFoundFile=true}files.appendChild(file)}}children.appendChild(files);parent.appendChild(name);parent.appendChild(children);return hasFoundFile}function toggleSidebar(){const child=this.children[0];if(child.innerText===">"){addClass(document.documentElement,"source-sidebar-expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{removeClass(document.documentElement,"source-sidebar-expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;const inner=document.createElement("div");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}sidebarToggle.appendChild(inner);return sidebarToggle}function createSourceSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="source-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(key=>{sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("span"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSourceHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const 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",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(match)}});onEachLazy(document.getElementsByClassName("line-numbers"),el=>{el.addEventListener("click",handleSourceHighlight)});highlightSourceLines();window.createSourceSidebar=createSourceSidebar})() \ No newline at end of file diff --git a/src-files.js b/src-files.js new file mode 100644 index 0000000..ba49cc7 --- /dev/null +++ b/src-files.js @@ -0,0 +1,4 @@ +var srcIndex = JSON.parse('{\ +"kvm_rs":["",[],["cap.rs","fmt.rs","kvm.rs","kvm_sys.rs","lib.rs","vcpu.rs","vm.rs","x86_64.rs"]]\ +}'); +createSrcSidebar(); diff --git a/src/kvm_rs/cap.rs.html b/src/kvm_rs/cap.rs.html index 34abcf0..03bd966 100644 --- a/src/kvm_rs/cap.rs.html +++ b/src/kvm_rs/cap.rs.html @@ -1,77 +1,69 @@ -cap.rs - source -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-
//! Definitions of KVM capabilities.
+cap.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+
//! Definitions of KVM capabilities.
 
-use crate::kvm_sys;
-use std::convert::Into;
+use crate::kvm_sys;
+use std::convert::Into;
 
-/// Definition of capabilities that return a bool value indicating whether the capability is
-/// supported or not.
-#[repr(u64)]
-pub enum CapBool {
-    /// Check if capabilities can be queried on VM fds (`KVM_CAP_CHECK_EXTENSION_VM`).
-    CheckExtensionVm = kvm_sys::KVM_CAP_CHECK_EXTENSION_VM,
+/// Definition of capabilities that return a bool value indicating whether the capability is
+/// supported or not.
+#[repr(u64)]
+pub enum CapBool {
+    /// Check if capabilities can be queried on VM fds (`KVM_CAP_CHECK_EXTENSION_VM`).
+    CheckExtensionVm = kvm_sys::KVM_CAP_CHECK_EXTENSION_VM,
 }
 
-impl Into<u64> for CapBool {
-    fn into(self) -> u64 {
-        self as u64
+impl Into<u64> for CapBool {
+    fn into(self) -> u64 {
+        self as u64
     }
 }
 
-/// Definition of capabilities that return an integer value indicating the amount of the queried
-/// capability.
-#[repr(u64)]
-pub enum CapInt {
-    /// Get the recommended max VPCUs (`KVM_CAP_NR_VCPUS`).
-    NrVcpus = kvm_sys::KVM_CAP_NR_VCPUS,
-    /// Get the possible max VPCUs (`KVM_CAP_MAX_VCPUS`).
-    MaxVcpus = kvm_sys::KVM_CAP_MAX_VCPUS,
+/// Definition of capabilities that return an integer value indicating the amount of the queried
+/// capability.
+#[repr(u64)]
+pub enum CapInt {
+    /// Get the recommended max VPCUs (`KVM_CAP_NR_VCPUS`).
+    NrVcpus = kvm_sys::KVM_CAP_NR_VCPUS,
+    /// Get the possible max VPCUs (`KVM_CAP_MAX_VCPUS`).
+    MaxVcpus = kvm_sys::KVM_CAP_MAX_VCPUS,
 }
 
-impl Into<u64> for CapInt {
-    fn into(self) -> u64 {
-        self as u64
+impl Into<u64> for CapInt {
+    fn into(self) -> u64 {
+        self as u64
     }
 }
-
-
- \ No newline at end of file + \ No newline at end of file diff --git a/src/kvm_rs/fmt.rs.html b/src/kvm_rs/fmt.rs.html index dffb60f..4b49d36 100644 --- a/src/kvm_rs/fmt.rs.html +++ b/src/kvm_rs/fmt.rs.html @@ -1,239 +1,233 @@ -fmt.rs - source -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-
use std::fmt;
+fmt.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+
use std::fmt;
 
-use crate::kvm_sys::{kvm_dtable, kvm_regs, kvm_segment, kvm_sregs};
-use crate::x86_64::*;
+use crate::kvm_sys::{kvm_dtable, kvm_regs, kvm_segment, kvm_sregs};
+use crate::x86_64::*;
 
-impl fmt::Display for kvm_regs {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+impl fmt::Display for kvm_regs {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         write!(
-            f,
+            f,
             "rax: {:#018x} rbx: {:#018x} rcx: {:#018x} rdx: {:#018x}\n\
              rsi: {:#018x} rdi: {:#018x}\n\
              r8 : {:#018x} r9 : {:#018x} r10: {:#018x} r11: {:#018x}\n\
              r12: {:#018x} r13: {:#018x} r14: {:#018x} r15: {:#018x}\n\
              rsp: {:#018x} rbp: {:#018x}\n\
              rip: {:#018x} rfl: {:#018x} O({}) D({}) I({}) T({}) S({}) Z({}) P({}) C({})",
-            self.rax,
-            self.rbx,
-            self.rcx,
-            self.rdx,
-            self.rsi,
-            self.rdi,
-            self.r8,
-            self.r9,
-            self.r10,
-            self.r11,
-            self.r12,
-            self.r13,
-            self.r14,
-            self.r15,
-            self.rsp,
-            self.rbp,
-            self.rip,
-            self.rflags,
-            rflags_of(self.rflags),
-            rflags_df(self.rflags),
-            rflags_if(self.rflags),
-            rflags_tf(self.rflags),
-            rflags_sf(self.rflags),
-            rflags_zf(self.rflags),
-            rflags_pf(self.rflags),
-            rflags_cf(self.rflags),
+            self.rax,
+            self.rbx,
+            self.rcx,
+            self.rdx,
+            self.rsi,
+            self.rdi,
+            self.r8,
+            self.r9,
+            self.r10,
+            self.r11,
+            self.r12,
+            self.r13,
+            self.r14,
+            self.r15,
+            self.rsp,
+            self.rbp,
+            self.rip,
+            self.rflags,
+            rflags_of(self.rflags),
+            rflags_df(self.rflags),
+            rflags_if(self.rflags),
+            rflags_tf(self.rflags),
+            rflags_sf(self.rflags),
+            rflags_zf(self.rflags),
+            rflags_pf(self.rflags),
+            rflags_cf(self.rflags),
         )
     }
 }
 
-impl fmt::Display for kvm_segment {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        if self.present == 0 {
-            write!(f, "{:#04x} P(0)", self.selector)
-        } else {
+impl fmt::Display for kvm_segment {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        if self.present == 0 {
+            write!(f, "{:#04x} P(0)", self.selector)
+        } else {
             write!(
-                f,
+                f,
                 "{:#06x} T({}) RPL({}) BASE({:#010x}) LIMIT({:#07x}) P(1) S({}) DPL({}) DB({}) L({}) TYPE({})",
-                self.selector,
-                if seg_selector_ti(self.selector) == 0 {
-                    "GDT"
-                } else {
-                    "LDT"
-                },
-                seg_selector_rpl(self.selector),
-                self.base,
-                self.limit,
-                self.s,
-                self.dpl,
-                self.db,
-                self.l,
-                match self.type_ {
-                    0 => "D:R---",
-                    1 => "D:R-A-",
-                    2 => "D:RW--",
-                    3 => "D:RWA-",
-                    4 => "D:R--E",
-                    5 => "D:R-AE",
-                    6 => "D:RW-E",
-                    7 => "D:RWAE",
-                    8 => "C:X---",
-                    9 => "C:X-A-",
-                    10 => "C:XR--",
-                    11 => "C:XRA-",
-                    12 => "C:X--C",
-                    13 => "C:X-AC",
-                    14 => "C:XR-C",
-                    15 => "C:XRAC",
-                    _ => unreachable!(),
+                self.selector,
+                if seg_selector_ti(self.selector) == 0 {
+                    "GDT"
+                } else {
+                    "LDT"
+                },
+                seg_selector_rpl(self.selector),
+                self.base,
+                self.limit,
+                self.s,
+                self.dpl,
+                self.db,
+                self.l,
+                match self.type_ {
+                    0 => "D:R---",
+                    1 => "D:R-A-",
+                    2 => "D:RW--",
+                    3 => "D:RWA-",
+                    4 => "D:R--E",
+                    5 => "D:R-AE",
+                    6 => "D:RW-E",
+                    7 => "D:RWAE",
+                    8 => "C:X---",
+                    9 => "C:X-A-",
+                    10 => "C:XR--",
+                    11 => "C:XRA-",
+                    12 => "C:X--C",
+                    13 => "C:X-AC",
+                    14 => "C:XR-C",
+                    15 => "C:XRAC",
+                    _ => unreachable!(),
                 }
             )
         }
     }
 }
 
-impl fmt::Display for kvm_dtable {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        write!(f, "BASE({:#018x}) LIMIT({:#07x})", self.base, self.limit)
+impl fmt::Display for kvm_dtable {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "BASE({:#018x}) LIMIT({:#07x})", self.base, self.limit)
     }
 }
 
-impl fmt::Display for kvm_sregs {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+impl fmt::Display for kvm_sregs {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         write!(
-            f,
+            f,
             "cs  : {}\n\
              ds  : {}\n\
              es  : {}\n\
@@ -246,24 +240,22 @@
              idt : {}\n\
              cr0 : {:#018x} cr2: {:#018x} cr3: {:#018x} cr4: {:#018x}\n\
              efer: {:#018x}",
-            self.cs,
-            self.ds,
-            self.es,
-            self.fs,
-            self.gs,
-            self.ss,
-            self.tr,
-            self.ldt,
-            self.gdt,
-            self.idt,
-            self.cr0,
-            self.cr2,
-            self.cr3,
-            self.cr4,
-            self.efer,
+            self.cs,
+            self.ds,
+            self.es,
+            self.fs,
+            self.gs,
+            self.ss,
+            self.tr,
+            self.ldt,
+            self.gdt,
+            self.idt,
+            self.cr0,
+            self.cr2,
+            self.cr3,
+            self.cr4,
+            self.efer,
         )
     }
 }
-
-
- \ No newline at end of file + \ No newline at end of file diff --git a/src/kvm_rs/kvm.rs.html b/src/kvm_rs/kvm.rs.html index 91ed733..557c8d0 100644 --- a/src/kvm_rs/kvm.rs.html +++ b/src/kvm_rs/kvm.rs.html @@ -1,155 +1,147 @@ -kvm.rs - source -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-
//! KVM system ioctls.
+kvm.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+
//! KVM system ioctls.
 
-use std::fs;
-use std::io;
-use std::os::unix::io::FromRawFd;
+use std::fs;
+use std::io;
+use std::os::unix::io::FromRawFd;
 
-use crate::cap::{CapBool, CapInt};
-use crate::vm::Vm;
-use crate::{ioctl, kvm_sys, libcret};
+use crate::cap::{CapBool, CapInt};
+use crate::vm::Vm;
+use crate::{ioctl, kvm_sys, libcret};
 
-/// Wrapper for `/dev/kvm` ioctls.
-///
-/// Representation of the file descriptor obtained by opening `/dev/kvm`.
-/// This wrapper provides access to the `system ioctls` as described in [KVM API][kvm].
-///
-/// [kvm]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#general-description
-pub struct Kvm {
-    kvm: fs::File,
+/// Wrapper for `/dev/kvm` ioctls.
+///
+/// Representation of the file descriptor obtained by opening `/dev/kvm`.
+/// This wrapper provides access to the `system ioctls` as described in [KVM API][kvm].
+///
+/// [kvm]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#general-description
+pub struct Kvm {
+    kvm: fs::File,
 }
 
-impl Kvm {
-    /// Open the `/dev/kvm` device.
-    pub fn new() -> io::Result<Kvm> {
-        let kvm = libcret(unsafe {
-            libc::open("/dev/kvm\0".as_ptr().cast(), libc::O_RDWR | libc::O_CLOEXEC)
+impl Kvm {
+    /// Open the `/dev/kvm` device.
+    pub fn new() -> io::Result<Kvm> {
+        let kvm = libcret(unsafe {
+            libc::open("/dev/kvm\0".as_ptr().cast(), libc::O_RDWR | libc::O_CLOEXEC)
         })
-        .map(|fd| unsafe { fs::File::from_raw_fd(fd) })?;
+        .map(|fd| unsafe { fs::File::from_raw_fd(fd) })?;
 
         assert_eq!(
-            kvm_sys::KVM_API_VERSION,
-            ioctl(&kvm, kvm_sys::KVM_GET_API_VERSION, 0)?
-        );
+            kvm_sys::KVM_API_VERSION,
+            ioctl(&kvm, kvm_sys::KVM_GET_API_VERSION, 0)?
+        );
 
-        Ok(Kvm { kvm })
+        Ok(Kvm { kvm })
     }
 
-    fn get_vpcu_mmap_size(&self) -> io::Result<usize> {
-        ioctl(&self.kvm, kvm_sys::KVM_GET_VCPU_MMAP_SIZE, 0).map(|size| size as usize)
+    fn get_vpcu_mmap_size(&self) -> io::Result<usize> {
+        ioctl(&self.kvm, kvm_sys::KVM_GET_VCPU_MMAP_SIZE, 0).map(|size| size as usize)
     }
 
-    /// Create a new virtual machine with the [`KVM_CREATE_VM`][kvm-create-vm] ioctl.
-    /// Returns a wrapper [`vm::Vm`][crate::vm::Vm] representing the VM.
-    ///
-    /// [kvm-create-vm]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-create-vm
-    pub fn create_vm(&self) -> io::Result<Vm> {
-        let vm = ioctl(&self.kvm, kvm_sys::KVM_CREATE_VM, 0 /* machine id */)
-            .map(|fd| unsafe { fs::File::from_raw_fd(fd) })?;
+    /// Create a new virtual machine with the [`KVM_CREATE_VM`][kvm-create-vm] ioctl.
+    /// Returns a wrapper [`vm::Vm`][crate::vm::Vm] representing the VM.
+    ///
+    /// [kvm-create-vm]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-create-vm
+    pub fn create_vm(&self) -> io::Result<Vm> {
+        let vm = ioctl(&self.kvm, kvm_sys::KVM_CREATE_VM, 0 /* machine id */)
+            .map(|fd| unsafe { fs::File::from_raw_fd(fd) })?;
 
-        let vcpu_mmap_size = self.get_vpcu_mmap_size()?;
+        let vcpu_mmap_size = self.get_vpcu_mmap_size()?;
 
-        Ok(Vm::new(vm, vcpu_mmap_size))
+        Ok(Vm::new(vm, vcpu_mmap_size))
     }
 
-    /// Check availability of an extension with the [`KVM_CHECK_EXTENSION`][kvm-check-extension]
-    /// ioctl.
-    ///
-    /// [kvm-check-extension]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-check-extension
-    pub fn check_extenstion(&self, cap: CapBool) -> bool {
-        let ret = ioctl(&self.kvm, kvm_sys::KVM_CHECK_EXTENSION, cap.into());
+    /// Check availability of an extension with the [`KVM_CHECK_EXTENSION`][kvm-check-extension]
+    /// ioctl.
+    ///
+    /// [kvm-check-extension]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-check-extension
+    pub fn check_extenstion(&self, cap: CapBool) -> bool {
+        let ret = ioctl(&self.kvm, kvm_sys::KVM_CHECK_EXTENSION, cap.into());
 
-        matches!(ret, Ok(ret) if ret > 0)
+        matches!(ret, Ok(ret) if ret > 0)
     }
 
-    /// Check availability of an extension with the [`KVM_CHECK_EXTENSION`][kvm-check-extension]
-    /// ioctl.
-    ///
-    /// [kvm-check-extension]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-check-extension
-    pub fn check_extenstion_int(&self, cap: CapInt) -> i32 {
-        let ret = ioctl(&self.kvm, kvm_sys::KVM_CHECK_EXTENSION, cap.into());
+    /// Check availability of an extension with the [`KVM_CHECK_EXTENSION`][kvm-check-extension]
+    /// ioctl.
+    ///
+    /// [kvm-check-extension]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-check-extension
+    pub fn check_extenstion_int(&self, cap: CapInt) -> i32 {
+        let ret = ioctl(&self.kvm, kvm_sys::KVM_CHECK_EXTENSION, cap.into());
 
-        ret.unwrap_or(0)
+        ret.unwrap_or(0)
     }
 }
-
-
- \ No newline at end of file + \ No newline at end of file diff --git a/src/kvm_rs/kvm_sys.rs.html b/src/kvm_rs/kvm_sys.rs.html index 0557e54..37de075 100644 --- a/src/kvm_rs/kvm_sys.rs.html +++ b/src/kvm_rs/kvm_sys.rs.html @@ -1,549 +1,541 @@ -kvm_sys.rs - source -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-
//! Definitions of the system header [`<linux/kvm.h>`][kvm-h].
-//!
-//! [kvm-h]: https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/kvm.h
+kvm_sys.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+
//! Definitions of the system header [`<linux/kvm.h>`][kvm-h].
+//!
+//! [kvm-h]: https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/kvm.h
 
-#![allow(non_snake_case)]
-#![allow(non_camel_case_types)]
-#![allow(dead_code)]
+#![allow(non_snake_case)]
+#![allow(non_camel_case_types)]
+#![allow(dead_code)]
 
-// Generated by `build.rs`.
-include!(concat!(env!("OUT_DIR"), "/kvm_constants.rs"));
+// Generated by `build.rs`.
+include!(concat!(env!("OUT_DIR"), "/kvm_constants.rs"));
 
-#[repr(C)]
-#[derive(Default, Debug)]
-pub struct kvm_regs {
-    pub rax: u64,
-    pub rbx: u64,
-    pub rcx: u64,
-    pub rdx: u64,
-    pub rsi: u64,
-    pub rdi: u64,
-    pub rsp: u64,
-    pub rbp: u64,
-    pub r8: u64,
-    pub r9: u64,
-    pub r10: u64,
-    pub r11: u64,
-    pub r12: u64,
-    pub r13: u64,
-    pub r14: u64,
-    pub r15: u64,
-    pub rip: u64,
-    pub rflags: u64,
+#[repr(C)]
+#[derive(Default, Debug)]
+pub struct kvm_regs {
+    pub rax: u64,
+    pub rbx: u64,
+    pub rcx: u64,
+    pub rdx: u64,
+    pub rsi: u64,
+    pub rdi: u64,
+    pub rsp: u64,
+    pub rbp: u64,
+    pub r8: u64,
+    pub r9: u64,
+    pub r10: u64,
+    pub r11: u64,
+    pub r12: u64,
+    pub r13: u64,
+    pub r14: u64,
+    pub r15: u64,
+    pub rip: u64,
+    pub rflags: u64,
 }
 
-#[repr(C)]
-#[derive(Default, Debug)]
-pub struct kvm_segment {
-    pub base: u64,
-    pub limit: u32,
-    pub selector: u16,
-    pub type_: u8,
-    pub present: u8,
-    pub dpl: u8,
-    pub db: u8,
-    pub s: u8,
-    pub l: u8,
-    pub g: u8,
-    pub avl: u8,
-    unusable: u8,
-    _padding: u8,
+#[repr(C)]
+#[derive(Default, Debug)]
+pub struct kvm_segment {
+    pub base: u64,
+    pub limit: u32,
+    pub selector: u16,
+    pub type_: u8,
+    pub present: u8,
+    pub dpl: u8,
+    pub db: u8,
+    pub s: u8,
+    pub l: u8,
+    pub g: u8,
+    pub avl: u8,
+    unusable: u8,
+    _padding: u8,
 }
 
-#[repr(C)]
-#[derive(Default, Debug)]
-pub struct kvm_dtable {
-    pub base: u64,
-    pub limit: u16,
-    _padding: [u16; 3],
+#[repr(C)]
+#[derive(Default, Debug)]
+pub struct kvm_dtable {
+    pub base: u64,
+    pub limit: u16,
+    _padding: [u16; 3],
 }
 
-#[repr(C)]
-#[derive(Default, Debug)]
-pub struct kvm_sregs {
-    pub cs: kvm_segment,
-    pub ds: kvm_segment,
-    pub es: kvm_segment,
-    pub fs: kvm_segment,
-    pub gs: kvm_segment,
-    pub ss: kvm_segment,
-    pub tr: kvm_segment,
-    pub ldt: kvm_segment,
-    pub gdt: kvm_dtable,
-    pub idt: kvm_dtable,
-    pub cr0: u64,
-    pub cr2: u64,
-    pub cr3: u64,
-    pub cr4: u64,
-    pub cr8: u64,
-    pub efer: u64,
-    pub apic_base: u64,
-    pub interrupt_bitmap: [u64; 4],
+#[repr(C)]
+#[derive(Default, Debug)]
+pub struct kvm_sregs {
+    pub cs: kvm_segment,
+    pub ds: kvm_segment,
+    pub es: kvm_segment,
+    pub fs: kvm_segment,
+    pub gs: kvm_segment,
+    pub ss: kvm_segment,
+    pub tr: kvm_segment,
+    pub ldt: kvm_segment,
+    pub gdt: kvm_dtable,
+    pub idt: kvm_dtable,
+    pub cr0: u64,
+    pub cr2: u64,
+    pub cr3: u64,
+    pub cr4: u64,
+    pub cr8: u64,
+    pub efer: u64,
+    pub apic_base: u64,
+    pub interrupt_bitmap: [u64; 4],
 }
 
-#[repr(C)]
-#[derive(Default, Debug)]
-pub(crate) struct kvm_userspace_memory_region {
-    pub slot: u32,
-    pub flags: u32,
-    pub guest_phys_addr: u64,
-    pub memory_size: u64,
-    pub userspace_addr: u64,
+#[repr(C)]
+#[derive(Default, Debug)]
+pub(crate) struct kvm_userspace_memory_region {
+    pub slot: u32,
+    pub flags: u32,
+    pub guest_phys_addr: u64,
+    pub memory_size: u64,
+    pub userspace_addr: u64,
 }
 
-#[cfg(target_arch = "x86_64")]
-#[repr(C)]
-#[derive(Default, Debug)]
-pub struct kvm_debugregs {
-    pub db: [u64; 4],
-    pub dr6: u64,
-    pub dr7: u64,
-    pub flags: u64,
-    pub reserved: [u64; 9],
+#[cfg(target_arch = "x86_64")]
+#[repr(C)]
+#[derive(Default, Debug)]
+pub struct kvm_debugregs {
+    pub db: [u64; 4],
+    pub dr6: u64,
+    pub dr7: u64,
+    pub flags: u64,
+    pub reserved: [u64; 9],
 }
 
-#[repr(C)]
-#[derive(Default, Debug)]
-pub(crate) struct kvm_guest_debug {
-    pub control: u32,
-    pad: u32,
-    pub arch: kvm_guest_debug_arch,
+#[repr(C)]
+#[derive(Default, Debug)]
+pub(crate) struct kvm_guest_debug {
+    pub control: u32,
+    pad: u32,
+    pub arch: kvm_guest_debug_arch,
 }
 
-#[cfg(target_arch = "x86_64")]
-#[repr(C)]
-#[derive(Default, Debug)]
-pub(crate) struct kvm_guest_debug_arch {
-    pub debugreg: [u64; 8],
+#[cfg(target_arch = "x86_64")]
+#[repr(C)]
+#[derive(Default, Debug)]
+pub(crate) struct kvm_guest_debug_arch {
+    pub debugreg: [u64; 8],
 }
 
-#[repr(C)]
-pub(crate) struct kvm_run {
-    request_interrupt_window: u8,
-    immediate_exit: u8,
-    padding1: [u8; 6],
-    pub exit_reason: u32,
-    ready_for_interrupt_injection: u8,
-    if_flag: u8,
-    flags: u16,
-    cr8: u64,
-    apic_base: u64,
-    pub inner: kvm_run_union,
-    kvm_valid_regs: u64,
-    kvm_dirty_regs: u64,
-    s: kvm_run_union_s,
+#[repr(C)]
+pub(crate) struct kvm_run {
+    request_interrupt_window: u8,
+    immediate_exit: u8,
+    padding1: [u8; 6],
+    pub exit_reason: u32,
+    ready_for_interrupt_injection: u8,
+    if_flag: u8,
+    flags: u16,
+    cr8: u64,
+    apic_base: u64,
+    pub inner: kvm_run_union,
+    kvm_valid_regs: u64,
+    kvm_dirty_regs: u64,
+    s: kvm_run_union_s,
 }
 
-#[repr(C)]
-#[derive(Copy, Clone, Debug)]
-pub(crate) struct kvm_run_io {
-    pub direction: u8,
-    pub size: u8,
-    pub port: u16,
-    pub count: u32,
-    pub data_offset: u64,
+#[repr(C)]
+#[derive(Copy, Clone, Debug)]
+pub(crate) struct kvm_run_io {
+    pub direction: u8,
+    pub size: u8,
+    pub port: u16,
+    pub count: u32,
+    pub data_offset: u64,
 }
 
-#[repr(C)]
-#[derive(Copy, Clone, Debug)]
-pub(crate) struct kvm_run_mmio {
-    pub phys_addr: u64,
-    pub data: [u8; 8],
-    pub len: u32,
-    pub is_write: u8,
+#[repr(C)]
+#[derive(Copy, Clone, Debug)]
+pub(crate) struct kvm_run_mmio {
+    pub phys_addr: u64,
+    pub data: [u8; 8],
+    pub len: u32,
+    pub is_write: u8,
 }
 
-#[cfg(target_arch = "x86_64")]
-#[repr(C)]
-#[derive(Copy, Clone, Debug)]
-pub(crate) struct kvm_run_debug {
-    pub exception: u32,
-    pad: u32,
-    pub pc: u64,
-    pub dr6: u64,
-    pub dr7: u64,
+#[cfg(target_arch = "x86_64")]
+#[repr(C)]
+#[derive(Copy, Clone, Debug)]
+pub(crate) struct kvm_run_debug {
+    pub exception: u32,
+    pad: u32,
+    pub pc: u64,
+    pub dr6: u64,
+    pub dr7: u64,
 }
 
-// Only add the union fields used here.
-#[repr(C)]
-pub(crate) union kvm_run_union {
-    pub io: kvm_run_io,
-    pub mmio: kvm_run_mmio,
-    pub debug: kvm_run_debug,
-    padding: [u8; 256],
+// Only add the union fields used here.
+#[repr(C)]
+pub(crate) union kvm_run_union {
+    pub io: kvm_run_io,
+    pub mmio: kvm_run_mmio,
+    pub debug: kvm_run_debug,
+    padding: [u8; 256],
 }
 
-// Only add the union fields used here.
-#[repr(C)]
-union kvm_run_union_s {
-    padding: [u8; 2048],
+// Only add the union fields used here.
+#[repr(C)]
+union kvm_run_union_s {
+    padding: [u8; 2048],
 }
 
-#[cfg(test)]
-mod tests {
-    use super::*;
-    use std::mem;
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use std::mem;
 
-    #[test]
-    fn check_kvm_regs() {
-        assert_eq!(mem::size_of::<kvm_regs>(), TEST_KVM_REGS_SIZE);
-        assert_eq!(mem::align_of::<kvm_regs>(), TEST_KVM_REGS_ALIGN);
+    #[test]
+    fn check_kvm_regs() {
+        assert_eq!(mem::size_of::<kvm_regs>(), TEST_KVM_REGS_SIZE);
+        assert_eq!(mem::align_of::<kvm_regs>(), TEST_KVM_REGS_ALIGN);
     }
 
-    #[test]
-    fn check_kvm_segment() {
-        assert_eq!(mem::size_of::<kvm_segment>(), TEST_KVM_SEGMENT_SIZE);
-        assert_eq!(mem::align_of::<kvm_segment>(), TEST_KVM_SEGMENT_ALIGN);
+    #[test]
+    fn check_kvm_segment() {
+        assert_eq!(mem::size_of::<kvm_segment>(), TEST_KVM_SEGMENT_SIZE);
+        assert_eq!(mem::align_of::<kvm_segment>(), TEST_KVM_SEGMENT_ALIGN);
     }
 
-    #[test]
-    fn check_kvm_dtable() {
-        assert_eq!(mem::size_of::<kvm_dtable>(), TEST_KVM_DTABLE_SIZE);
-        assert_eq!(mem::align_of::<kvm_dtable>(), TEST_KVM_DTABLE_ALIGN);
+    #[test]
+    fn check_kvm_dtable() {
+        assert_eq!(mem::size_of::<kvm_dtable>(), TEST_KVM_DTABLE_SIZE);
+        assert_eq!(mem::align_of::<kvm_dtable>(), TEST_KVM_DTABLE_ALIGN);
     }
 
-    #[test]
-    fn check_kvm_sregs() {
-        assert_eq!(mem::size_of::<kvm_sregs>(), TEST_KVM_SREGS_SIZE);
-        assert_eq!(mem::align_of::<kvm_sregs>(), TEST_KVM_SREGS_ALIGN);
+    #[test]
+    fn check_kvm_sregs() {
+        assert_eq!(mem::size_of::<kvm_sregs>(), TEST_KVM_SREGS_SIZE);
+        assert_eq!(mem::align_of::<kvm_sregs>(), TEST_KVM_SREGS_ALIGN);
         assert_eq!(
-            mem::size_of_val(&kvm_sregs::default().interrupt_bitmap),
-            TEST_KVM_SREGS_INTERRTUP_BITMAP_SIZE
+            mem::size_of_val(&kvm_sregs::default().interrupt_bitmap),
+            TEST_KVM_SREGS_INTERRTUP_BITMAP_SIZE
         );
     }
 
-    #[test]
-    fn check_kvm_userspace_memory_region() {
+    #[test]
+    fn check_kvm_userspace_memory_region() {
         assert_eq!(
-            mem::size_of::<kvm_userspace_memory_region>(),
-            TEST_KVM_USERSPACE_MEMORY_REGION_SIZE
+            mem::size_of::<kvm_userspace_memory_region>(),
+            TEST_KVM_USERSPACE_MEMORY_REGION_SIZE
         );
         assert_eq!(
-            mem::align_of::<kvm_userspace_memory_region>(),
-            TEST_KVM_USERSPACE_MEMORY_REGION_ALIGN
+            mem::align_of::<kvm_userspace_memory_region>(),
+            TEST_KVM_USERSPACE_MEMORY_REGION_ALIGN
         );
     }
 
-    #[test]
-    fn check_kvm_run() {
-        assert_eq!(mem::size_of::<kvm_run>(), TEST_KVM_RUN_SIZE);
-        assert_eq!(mem::align_of::<kvm_run>(), TEST_KVM_RUN_ALIGN);
-        assert_eq!(mem::size_of::<kvm_run_io>(), TEST_KVM_RUN_IO_SIZE);
-        assert_eq!(mem::size_of::<kvm_run_mmio>(), TEST_KVM_RUN_MMIO_SIZE);
-        assert_eq!(mem::size_of::<kvm_run_union_s>(), TEST_KVM_RUN_UNION_S_SIZE);
+    #[test]
+    fn check_kvm_run() {
+        assert_eq!(mem::size_of::<kvm_run>(), TEST_KVM_RUN_SIZE);
+        assert_eq!(mem::align_of::<kvm_run>(), TEST_KVM_RUN_ALIGN);
+        assert_eq!(mem::size_of::<kvm_run_io>(), TEST_KVM_RUN_IO_SIZE);
+        assert_eq!(mem::size_of::<kvm_run_mmio>(), TEST_KVM_RUN_MMIO_SIZE);
+        assert_eq!(mem::size_of::<kvm_run_union_s>(), TEST_KVM_RUN_UNION_S_SIZE);
     }
 
-    #[cfg(target_arch = "x86_64")]
-    #[test]
-    fn check_kvm_run_x86() {
-        assert_eq!(mem::size_of::<kvm_run_debug>(), TEST_KVM_RUN_DEBUG_SIZE);
+    #[cfg(target_arch = "x86_64")]
+    #[test]
+    fn check_kvm_run_x86() {
+        assert_eq!(mem::size_of::<kvm_run_debug>(), TEST_KVM_RUN_DEBUG_SIZE);
     }
 
-    #[cfg(target_arch = "x86_64")]
-    #[test]
-    fn check_kvm_debugregs() {
-        assert_eq!(mem::size_of::<kvm_debugregs>(), TEST_KVM_DEBUGREGS_SIZE);
-        assert_eq!(mem::align_of::<kvm_debugregs>(), TEST_KVM_DEBUGREGS_ALIGN);
+    #[cfg(target_arch = "x86_64")]
+    #[test]
+    fn check_kvm_debugregs() {
+        assert_eq!(mem::size_of::<kvm_debugregs>(), TEST_KVM_DEBUGREGS_SIZE);
+        assert_eq!(mem::align_of::<kvm_debugregs>(), TEST_KVM_DEBUGREGS_ALIGN);
     }
 
-    #[test]
-    fn check_kvm_guest_dbg() {
-        assert_eq!(mem::size_of::<kvm_guest_debug>(), TEST_KVM_GUEST_DEBUG_SIZE);
+    #[test]
+    fn check_kvm_guest_dbg() {
+        assert_eq!(mem::size_of::<kvm_guest_debug>(), TEST_KVM_GUEST_DEBUG_SIZE);
         assert_eq!(
-            mem::align_of::<kvm_guest_debug>(),
-            TEST_KVM_GUEST_DEBUG_ALIGN
+            mem::align_of::<kvm_guest_debug>(),
+            TEST_KVM_GUEST_DEBUG_ALIGN
         );
     }
 
-    #[cfg(target_arch = "x86_64")]
-    #[test]
-    fn check_kvm_guest_dbg_arch() {
+    #[cfg(target_arch = "x86_64")]
+    #[test]
+    fn check_kvm_guest_dbg_arch() {
         assert_eq!(
-            mem::size_of::<kvm_guest_debug_arch>(),
-            TEST_KVM_GUEST_DEBUG_ARCH_SIZE
+            mem::size_of::<kvm_guest_debug_arch>(),
+            TEST_KVM_GUEST_DEBUG_ARCH_SIZE
         );
         assert_eq!(
-            mem::align_of::<kvm_guest_debug_arch>(),
-            TEST_KVM_GUEST_DEBUG_ARCH_ALIGN
+            mem::align_of::<kvm_guest_debug_arch>(),
+            TEST_KVM_GUEST_DEBUG_ARCH_ALIGN
         );
     }
 }
-
-
- \ No newline at end of file + \ No newline at end of file diff --git a/src/kvm_rs/lib.rs.html b/src/kvm_rs/lib.rs.html index 51825a9..8f5cba9 100644 --- a/src/kvm_rs/lib.rs.html +++ b/src/kvm_rs/lib.rs.html @@ -1,341 +1,333 @@ -lib.rs - source -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-
use std::convert::{AsMut, AsRef};
-use std::io;
-use std::ops;
-use std::os::unix::io::AsRawFd;
+lib.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+
use std::convert::{AsMut, AsRef};
+use std::io;
+use std::ops;
+use std::os::unix::io::AsRawFd;
 
-pub mod cap;
-mod fmt;
-pub mod kvm;
-pub mod kvm_sys;
-pub mod vcpu;
-pub mod vm;
-pub mod x86_64;
+pub mod cap;
+mod fmt;
+pub mod kvm;
+pub mod kvm_sys;
+pub mod vcpu;
+pub mod vm;
+pub mod x86_64;
 
-/// Strong type representing physical addresses.
-pub struct PhysAddr(pub u64);
+/// Strong type representing physical addresses.
+pub struct PhysAddr(pub u64);
 
-/// Helper to turn libc return values into an [io::Result](std::io::Result). Returns
-/// [`Error::last_os_error`](std::io::Error::last_os_error) if `ret < 0`.
-fn libcret(ret: libc::c_int) -> io::Result<libc::c_int> {
-    if ret < 0 {
-        Err(io::Error::last_os_error())
-    } else {
-        Ok(ret)
+/// Helper to turn libc return values into an [io::Result](std::io::Result). Returns
+/// [`Error::last_os_error`](std::io::Error::last_os_error) if `ret < 0`.
+fn libcret(ret: libc::c_int) -> io::Result<libc::c_int> {
+    if ret < 0 {
+        Err(io::Error::last_os_error())
+    } else {
+        Ok(ret)
     }
 }
 
-/// Wrapper of `libc::ioctl` for KVM ioctls with one argument and returning an
-/// [`io::Result`](std::io::Result).
-fn ioctl<F: AsRawFd>(fd: &F, cmd: u64, arg: u64) -> io::Result<libc::c_int> {
-    libcret(unsafe { libc::ioctl(fd.as_raw_fd(), cmd, arg) })
+/// Wrapper of `libc::ioctl` for KVM ioctls with one argument and returning an
+/// [`io::Result`](std::io::Result).
+fn ioctl<F: AsRawFd>(fd: &F, cmd: u64, arg: u64) -> io::Result<libc::c_int> {
+    libcret(unsafe { libc::ioctl(fd.as_raw_fd(), cmd, arg) })
 }
 
-/// Wrapper to safely allocate memory for guest VMs.
-///
-/// The underlying memory is freed automatically once the `UserMem` instance is dropped.
-///
-/// Memory can be mapped into a guest VM with
-/// [`Vm::set_user_memory_region`](crate::vm::Vm::set_user_memory_region).
-pub struct UserMem {
-    ptr: *mut u8,
-    len: usize,
+/// Wrapper to safely allocate memory for guest VMs.
+///
+/// The underlying memory is freed automatically once the `UserMem` instance is dropped.
+///
+/// Memory can be mapped into a guest VM with
+/// [`Vm::set_user_memory_region`](crate::vm::Vm::set_user_memory_region).
+pub struct UserMem {
+    ptr: *mut u8,
+    len: usize,
 }
 
-impl UserMem {
-    /// Allocate a zero-initialized memory region of `len` bytes.
-    pub fn new(len: usize) -> io::Result<UserMem> {
-        let ptr = unsafe {
-            libc::mmap(
-                std::ptr::null_mut(),
-                len,
-                libc::PROT_READ | libc::PROT_WRITE,
-                libc::MAP_PRIVATE | libc::MAP_ANONYMOUS,
-                -1,
+impl UserMem {
+    /// Allocate a zero-initialized memory region of `len` bytes.
+    pub fn new(len: usize) -> io::Result<UserMem> {
+        let ptr = unsafe {
+            libc::mmap(
+                std::ptr::null_mut(),
+                len,
+                libc::PROT_READ | libc::PROT_WRITE,
+                libc::MAP_PRIVATE | libc::MAP_ANONYMOUS,
+                -1,
                 0,
             )
         };
 
-        if ptr == libc::MAP_FAILED {
-            Err(io::Error::last_os_error())
-        } else {
-            Ok(UserMem {
-                ptr: ptr.cast(),
-                len,
+        if ptr == libc::MAP_FAILED {
+            Err(io::Error::last_os_error())
+        } else {
+            Ok(UserMem {
+                ptr: ptr.cast(),
+                len,
             })
         }
     }
 
-    /// Allocate a zero-initialized memory region of `len` bytes and initialize the first bytes
-    /// with `init_from`.
-    ///
-    /// # Panics
-    ///
-    /// Panics if `init_from` is larger than the memory size `len`.
-    pub fn with_init(len: usize, init_from: &[u8]) -> io::Result<UserMem> {
-        assert!(len >= init_from.len());
+    /// Allocate a zero-initialized memory region of `len` bytes and initialize the first bytes
+    /// with `init_from`.
+    ///
+    /// # Panics
+    ///
+    /// Panics if `init_from` is larger than the memory size `len`.
+    pub fn with_init(len: usize, init_from: &[u8]) -> io::Result<UserMem> {
+        assert!(len >= init_from.len());
 
-        let mut m = UserMem::new(len)?;
-        m.load(PhysAddr(0), init_from);
-        Ok(m)
+        let mut m = UserMem::new(len)?;
+        m.load(PhysAddr(0), init_from);
+        Ok(m)
     }
 
-    /// Load the bytes stored in `data` into memory at physical address `addr`.
-    ///
-    /// # Panics
-    ///
-    /// Panics if `addr + data.len` is larger than the memory size `len`.
-    pub fn load(&mut self, addr: PhysAddr, data: &[u8]) {
-        assert!(self.len >= addr.0 as usize + data.len());
+    /// Load the bytes stored in `data` into memory at physical address `addr`.
+    ///
+    /// # Panics
+    ///
+    /// Panics if `addr + data.len` is larger than the memory size `len`.
+    pub fn load(&mut self, addr: PhysAddr, data: &[u8]) {
+        assert!(self.len >= addr.0 as usize + data.len());
 
-        let addr = addr.0 as usize;
-        self.as_mut()[addr..addr + data.len()].copy_from_slice(data);
+        let addr = addr.0 as usize;
+        self.as_mut()[addr..addr + data.len()].copy_from_slice(data);
     }
 }
 
-impl ops::Drop for UserMem {
-    /// Free underlying memory.
-    fn drop(&mut self) {
-        unsafe { libc::munmap(self.ptr.cast(), self.len) };
+impl ops::Drop for UserMem {
+    /// Free underlying memory.
+    fn drop(&mut self) {
+        unsafe { libc::munmap(self.ptr.cast(), self.len) };
     }
 }
 
-impl AsRef<[u8]> for UserMem {
-    fn as_ref(&self) -> &[u8] {
-        unsafe { std::slice::from_raw_parts(self.ptr, self.len) }
+impl AsRef<[u8]> for UserMem {
+    fn as_ref(&self) -> &[u8] {
+        unsafe { std::slice::from_raw_parts(self.ptr, self.len) }
     }
 }
 
-impl AsMut<[u8]> for UserMem {
-    fn as_mut(&mut self) -> &mut [u8] {
-        unsafe { std::slice::from_raw_parts_mut(self.ptr, self.len) }
+impl AsMut<[u8]> for UserMem {
+    fn as_mut(&mut self) -> &mut [u8] {
+        unsafe { std::slice::from_raw_parts_mut(self.ptr, self.len) }
     }
 }
 
-/// Internal wrapper to automatically `mmap` and `munmap` the the [`struct kvm_run`][kvm_run]
-/// for a given VPCU.
-///
-/// [kvm_run]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#the-kvm-run-structure
-struct KvmRun {
-    ptr: *mut kvm_sys::kvm_run,
-    len: usize,
+/// Internal wrapper to automatically `mmap` and `munmap` the the [`struct kvm_run`][kvm_run]
+/// for a given VPCU.
+///
+/// [kvm_run]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#the-kvm-run-structure
+struct KvmRun {
+    ptr: *mut kvm_sys::kvm_run,
+    len: usize,
 }
 
-impl KvmRun {
-    /// Mmap the `struct kvm_run` for a given `VCPU` referenced by the argument file descriptor
-    /// `vcpu`.
-    fn new<F: AsRawFd>(vcpu: &F, len: usize) -> io::Result<KvmRun> {
-        let ptr = unsafe {
-            libc::mmap(
-                std::ptr::null_mut(),
-                len,
-                libc::PROT_READ | libc::PROT_WRITE,
-                libc::MAP_SHARED,
-                vcpu.as_raw_fd(),
+impl KvmRun {
+    /// Mmap the `struct kvm_run` for a given `VCPU` referenced by the argument file descriptor
+    /// `vcpu`.
+    fn new<F: AsRawFd>(vcpu: &F, len: usize) -> io::Result<KvmRun> {
+        let ptr = unsafe {
+            libc::mmap(
+                std::ptr::null_mut(),
+                len,
+                libc::PROT_READ | libc::PROT_WRITE,
+                libc::MAP_SHARED,
+                vcpu.as_raw_fd(),
                 0,
             )
         };
 
-        if ptr == libc::MAP_FAILED {
-            Err(io::Error::last_os_error())
-        } else {
-            Ok(KvmRun {
-                ptr: ptr.cast(),
-                len,
+        if ptr == libc::MAP_FAILED {
+            Err(io::Error::last_os_error())
+        } else {
+            Ok(KvmRun {
+                ptr: ptr.cast(),
+                len,
             })
         }
     }
 }
 
-impl ops::Drop for KvmRun {
-    /// Munmap the mmaped `struct kvm_run`.
-    fn drop(&mut self) {
-        unsafe { libc::munmap(self.ptr.cast(), self.len) };
+impl ops::Drop for KvmRun {
+    /// Munmap the mmaped `struct kvm_run`.
+    fn drop(&mut self) {
+        unsafe { libc::munmap(self.ptr.cast(), self.len) };
     }
 }
 
-impl AsRef<kvm_sys::kvm_run> for KvmRun {
-    fn as_ref(&self) -> &kvm_sys::kvm_run {
-        unsafe { &*(self.ptr as *const kvm_sys::kvm_run) }
+impl AsRef<kvm_sys::kvm_run> for KvmRun {
+    fn as_ref(&self) -> &kvm_sys::kvm_run {
+        unsafe { &*(self.ptr as *const kvm_sys::kvm_run) }
     }
 }
 
-impl AsMut<kvm_sys::kvm_run> for KvmRun {
-    fn as_mut(&mut self) -> &mut kvm_sys::kvm_run {
-        unsafe { &mut *(self.ptr as *mut kvm_sys::kvm_run) }
+impl AsMut<kvm_sys::kvm_run> for KvmRun {
+    fn as_mut(&mut self) -> &mut kvm_sys::kvm_run {
+        unsafe { &mut *(self.ptr as *mut kvm_sys::kvm_run) }
     }
 }
-
-
- \ No newline at end of file + \ No newline at end of file diff --git a/src/kvm_rs/vcpu.rs.html b/src/kvm_rs/vcpu.rs.html index 43ba988..1bfda1f 100644 --- a/src/kvm_rs/vcpu.rs.html +++ b/src/kvm_rs/vcpu.rs.html @@ -1,413 +1,405 @@ -vcpu.rs - source -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-
//! VCPU system ioctls.
+vcpu.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+
//! VCPU system ioctls.
 
-use std::fs;
-use std::io;
+use std::fs;
+use std::io;
 
-use crate::{ioctl, kvm_sys, KvmRun};
+use crate::{ioctl, kvm_sys, KvmRun};
 
-/// Exit reasons for the [`Vcpu::run`][crate::vcpu::Vcpu::run] function.
-///
-/// Details for the different exit reasons can be found in the [`kvm_run`
-/// structure][kvm-run-struct] description.
-///
-/// [kvm-run]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-run
-/// [kvm-run-struct]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#the-kvm-run-structure
-pub enum KvmExit<'cpu> {
-    Halt,
-    IoIn(u16, &'cpu mut [u8]),
-    IoOut(u16, &'cpu [u8]),
-    MmioRead(u64, &'cpu mut [u8]),
-    MmioWrite(u64, &'cpu [u8]),
-    Debug(u64),
+/// Exit reasons for the [`Vcpu::run`][crate::vcpu::Vcpu::run] function.
+///
+/// Details for the different exit reasons can be found in the [`kvm_run`
+/// structure][kvm-run-struct] description.
+///
+/// [kvm-run]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-run
+/// [kvm-run-struct]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#the-kvm-run-structure
+pub enum KvmExit<'cpu> {
+    Halt,
+    IoIn(u16, &'cpu mut [u8]),
+    IoOut(u16, &'cpu [u8]),
+    MmioRead(u64, &'cpu mut [u8]),
+    MmioWrite(u64, &'cpu [u8]),
+    Debug(u64),
 }
 
-/// Wrapper for VCPU ioctls.
-///
-/// Representation of the file descriptor obtained by the [`KVM_CREATE_VCPU`][kvm-create-vcpu] ioctl.
-/// This wrapper provides access to the `VCPU ioctls` as described in [KVM API][kvm].
-///
-/// [kvm]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#general-description
-/// [kvm-create-vcpu]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-create-vcpu
-pub struct Vcpu {
-    vcpu: fs::File,
-    kvm_run: KvmRun,
+/// Wrapper for VCPU ioctls.
+///
+/// Representation of the file descriptor obtained by the [`KVM_CREATE_VCPU`][kvm-create-vcpu] ioctl.
+/// This wrapper provides access to the `VCPU ioctls` as described in [KVM API][kvm].
+///
+/// [kvm]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#general-description
+/// [kvm-create-vcpu]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-create-vcpu
+pub struct Vcpu {
+    vcpu: fs::File,
+    kvm_run: KvmRun,
 }
 
-impl Vcpu {
-    pub(crate) fn new(vcpu: fs::File, kvm_run: KvmRun) -> Vcpu {
-        Vcpu { vcpu, kvm_run }
+impl Vcpu {
+    pub(crate) fn new(vcpu: fs::File, kvm_run: KvmRun) -> Vcpu {
+        Vcpu { vcpu, kvm_run }
     }
 
-    /// Get the general purpose registers with the [`KVM_GET_REGS`][kvm-get-regs] ioctl in form of
-    /// [`kvm_regs`](crate::kvm_sys::kvm_regs).
-    ///
-    /// [kvm-get-regs]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-get-regs
-    pub fn get_regs(&self) -> io::Result<kvm_sys::kvm_regs> {
-        let mut regs = kvm_sys::kvm_regs::default();
-        ioctl(
-            &self.vcpu,
-            kvm_sys::KVM_GET_REGS,
-            &mut regs as *mut _ as u64,
+    /// Get the general purpose registers with the [`KVM_GET_REGS`][kvm-get-regs] ioctl in form of
+    /// [`kvm_regs`](crate::kvm_sys::kvm_regs).
+    ///
+    /// [kvm-get-regs]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-get-regs
+    pub fn get_regs(&self) -> io::Result<kvm_sys::kvm_regs> {
+        let mut regs = kvm_sys::kvm_regs::default();
+        ioctl(
+            &self.vcpu,
+            kvm_sys::KVM_GET_REGS,
+            &mut regs as *mut _ as u64,
         )?;
-        Ok(regs)
+        Ok(regs)
     }
 
-    /// Set the general purpose registers with the [`KVM_SET_REGS`][kvm-set-regs] ioctl in form of
-    /// [`kvm_regs`](crate::kvm_sys::kvm_regs).
-    ///
-    /// [kvm-set-regs]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-set-regs
-    pub fn set_regs(&self, regs: kvm_sys::kvm_regs) -> io::Result<()> {
-        ioctl(&self.vcpu, kvm_sys::KVM_SET_REGS, &regs as *const _ as u64).map(|_| ())
+    /// Set the general purpose registers with the [`KVM_SET_REGS`][kvm-set-regs] ioctl in form of
+    /// [`kvm_regs`](crate::kvm_sys::kvm_regs).
+    ///
+    /// [kvm-set-regs]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-set-regs
+    pub fn set_regs(&self, regs: kvm_sys::kvm_regs) -> io::Result<()> {
+        ioctl(&self.vcpu, kvm_sys::KVM_SET_REGS, &regs as *const _ as u64).map(|_| ())
     }
 
-    /// Get the special registers with the [`KVM_GET_SREGS`][kvm-get-sregs] ioctl in form of
-    /// [`kvm_sregs`](crate::kvm_sys::kvm_sregs).
-    ///
-    /// [kvm-get-sregs]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-get-sregs
-    pub fn get_sregs(&self) -> io::Result<kvm_sys::kvm_sregs> {
-        let mut sregs = kvm_sys::kvm_sregs::default();
-        ioctl(
-            &self.vcpu,
-            kvm_sys::KVM_GET_SREGS,
-            &mut sregs as *mut _ as u64,
+    /// Get the special registers with the [`KVM_GET_SREGS`][kvm-get-sregs] ioctl in form of
+    /// [`kvm_sregs`](crate::kvm_sys::kvm_sregs).
+    ///
+    /// [kvm-get-sregs]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-get-sregs
+    pub fn get_sregs(&self) -> io::Result<kvm_sys::kvm_sregs> {
+        let mut sregs = kvm_sys::kvm_sregs::default();
+        ioctl(
+            &self.vcpu,
+            kvm_sys::KVM_GET_SREGS,
+            &mut sregs as *mut _ as u64,
         )?;
-        Ok(sregs)
+        Ok(sregs)
     }
 
-    /// Set the special registers with the [`KVM_SET_SREGS`][kvm-set-sregs] ioctl in form of
-    /// [`kvm_sregs`](crate::kvm_sys::kvm_sregs).
-    ///
-    /// [kvm-set-sregs]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-set-sregs
-    pub fn set_sregs(&self, sregs: kvm_sys::kvm_sregs) -> io::Result<()> {
-        ioctl(
-            &self.vcpu,
-            kvm_sys::KVM_SET_SREGS,
-            &sregs as *const _ as u64,
+    /// Set the special registers with the [`KVM_SET_SREGS`][kvm-set-sregs] ioctl in form of
+    /// [`kvm_sregs`](crate::kvm_sys::kvm_sregs).
+    ///
+    /// [kvm-set-sregs]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-set-sregs
+    pub fn set_sregs(&self, sregs: kvm_sys::kvm_sregs) -> io::Result<()> {
+        ioctl(
+            &self.vcpu,
+            kvm_sys::KVM_SET_SREGS,
+            &sregs as *const _ as u64,
         )
-        .map(|_| ())
+        .map(|_| ())
     }
 
-    /// Get the debug registers with the [`KVM_GET_DEBUGREGS`][kvm-get-debugregs] ioctl in form of
-    /// [`kvm_debugregs`](crate::kvm_sys::kvm_debugregs).
-    ///
-    /// [kvm-get-debugregs]:
-    /// https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-get-debugregs
-    #[cfg(target_arch = "x86_64")]
-    pub fn get_debugregs(&self) -> io::Result<kvm_sys::kvm_debugregs> {
-        let mut dregs = kvm_sys::kvm_debugregs::default();
-        ioctl(
-            &self.vcpu,
-            kvm_sys::KVM_GET_DEBUGREGS,
-            &mut dregs as *mut _ as u64,
+    /// Get the debug registers with the [`KVM_GET_DEBUGREGS`][kvm-get-debugregs] ioctl in form of
+    /// [`kvm_debugregs`](crate::kvm_sys::kvm_debugregs).
+    ///
+    /// [kvm-get-debugregs]:
+    /// https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-get-debugregs
+    #[cfg(target_arch = "x86_64")]
+    pub fn get_debugregs(&self) -> io::Result<kvm_sys::kvm_debugregs> {
+        let mut dregs = kvm_sys::kvm_debugregs::default();
+        ioctl(
+            &self.vcpu,
+            kvm_sys::KVM_GET_DEBUGREGS,
+            &mut dregs as *mut _ as u64,
         )?;
-        Ok(dregs)
+        Ok(dregs)
     }
 
-    /// Set the debug registers with the [`KVM_SET_DEBUGREGS`][kvm-set-debugregs] ioctl in form of
-    /// [`kvm_debugregs`](crate::kvm_sys::kvm_debugregs).
-    ///
-    /// [kvm-set-debugregs]:
-    /// https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-set-debugregs
-    #[cfg(target_arch = "x86_64")]
-    pub fn set_debugregs(&self, dregs: kvm_sys::kvm_debugregs) -> io::Result<()> {
-        ioctl(
-            &self.vcpu,
-            kvm_sys::KVM_SET_DEBUGREGS,
-            &dregs as *const _ as u64,
+    /// Set the debug registers with the [`KVM_SET_DEBUGREGS`][kvm-set-debugregs] ioctl in form of
+    /// [`kvm_debugregs`](crate::kvm_sys::kvm_debugregs).
+    ///
+    /// [kvm-set-debugregs]:
+    /// https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-set-debugregs
+    #[cfg(target_arch = "x86_64")]
+    pub fn set_debugregs(&self, dregs: kvm_sys::kvm_debugregs) -> io::Result<()> {
+        ioctl(
+            &self.vcpu,
+            kvm_sys::KVM_SET_DEBUGREGS,
+            &dregs as *const _ as u64,
         )
-        .map(|_| ())
+        .map(|_| ())
     }
 
-    /// Enable or disable guest single steppig (debug) with the
-    /// [`KVM_GUESTDBG_ENABLE`][kvm-guest-debug] ioctl.
-    ///
-    /// [kvm-guest-debug]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-set-guest-debug
-    #[cfg(target_arch = "x86_64")]
-    pub fn set_single_step(&self, enable: bool) -> io::Result<()> {
-        let mut dbg = kvm_sys::kvm_guest_debug::default();
+    /// Enable or disable guest single steppig (debug) with the
+    /// [`KVM_GUESTDBG_ENABLE`][kvm-guest-debug] ioctl.
+    ///
+    /// [kvm-guest-debug]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-set-guest-debug
+    #[cfg(target_arch = "x86_64")]
+    pub fn set_single_step(&self, enable: bool) -> io::Result<()> {
+        let mut dbg = kvm_sys::kvm_guest_debug::default();
 
-        if enable {
-            // Enable guest debugging and single stepping.
-            dbg.control = kvm_sys::KVM_GUESTDBG_ENABLE | kvm_sys::KVM_GUESTDBG_SINGLESTEP;
+        if enable {
+            // Enable guest debugging and single stepping.
+            dbg.control = kvm_sys::KVM_GUESTDBG_ENABLE | kvm_sys::KVM_GUESTDBG_SINGLESTEP;
         }
 
-        // Initialize debug registers based on current VCPUs debug register values.
-        let dregs = self.get_debugregs()?;
-        dbg.arch.debugreg[0..4].copy_from_slice(&dregs.db);
-        // DR4-DR5 are reserved.
-        dbg.arch.debugreg[6] = dregs.dr6;
-        dbg.arch.debugreg[7] = dregs.dr7;
+        // Initialize debug registers based on current VCPUs debug register values.
+        let dregs = self.get_debugregs()?;
+        dbg.arch.debugreg[0..4].copy_from_slice(&dregs.db);
+        // DR4-DR5 are reserved.
+        dbg.arch.debugreg[6] = dregs.dr6;
+        dbg.arch.debugreg[7] = dregs.dr7;
 
-        ioctl(
-            &self.vcpu,
-            kvm_sys::KVM_SET_GUEST_DEBUG,
-            &dbg as *const _ as u64,
+        ioctl(
+            &self.vcpu,
+            kvm_sys::KVM_SET_GUEST_DEBUG,
+            &dbg as *const _ as u64,
         )
-        .map(|_| ())
+        .map(|_| ())
     }
 
-    /// Run the guest VCPU with the [`KVM_RUN`][kvm-run] ioctl until it exits with one of the exit
-    /// reasons described in [`KvmExit`](crate::vcpu::KvmExit).
-    ///
-    /// [kvm-run]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-run
-    pub fn run(&mut self) -> io::Result<KvmExit<'_>> {
-        ioctl(&self.vcpu, kvm_sys::KVM_RUN, 0)?;
+    /// Run the guest VCPU with the [`KVM_RUN`][kvm-run] ioctl until it exits with one of the exit
+    /// reasons described in [`KvmExit`](crate::vcpu::KvmExit).
+    ///
+    /// [kvm-run]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-run
+    pub fn run(&mut self) -> io::Result<KvmExit<'_>> {
+        ioctl(&self.vcpu, kvm_sys::KVM_RUN, 0)?;
 
-        let kvm_run = self.kvm_run.as_mut();
+        let kvm_run = self.kvm_run.as_mut();
 
-        match kvm_run.exit_reason as u64 {
-            kvm_sys::KVM_EXIT_HLT => Ok(KvmExit::Halt),
-            kvm_sys::KVM_EXIT_IO => {
-                // Safe to use union `io` field, as Kernel instructed us to.
-                let io = unsafe { kvm_run.inner.io };
+        match kvm_run.exit_reason as u64 {
+            kvm_sys::KVM_EXIT_HLT => Ok(KvmExit::Halt),
+            kvm_sys::KVM_EXIT_IO => {
+                // Safe to use union `io` field, as Kernel instructed us to.
+                let io = unsafe { kvm_run.inner.io };
 
-                let kvm_run_ptr = kvm_run as *mut kvm_sys::kvm_run as *mut u8;
+                let kvm_run_ptr = kvm_run as *mut kvm_sys::kvm_run as *mut u8;
 
-                // Create IO buffer located at `kvm_run + io.offset`.
-                let data = unsafe {
-                    std::slice::from_raw_parts_mut(
-                        kvm_run_ptr.offset(io.data_offset as isize),
-                        io.count /* num blocks */ as usize * io.size /* bytes per block */ as usize,
+                // Create IO buffer located at `kvm_run + io.offset`.
+                let data = unsafe {
+                    std::slice::from_raw_parts_mut(
+                        kvm_run_ptr.offset(io.data_offset as isize),
+                        io.count /* num blocks */ as usize * io.size /* bytes per block */ as usize,
                     )
                 };
 
-                match io.direction as u64 {
-                    kvm_sys::KVM_EXIT_IO_IN => Ok(KvmExit::IoIn(io.port, data)),
-                    kvm_sys::KVM_EXIT_IO_OUT => Ok(KvmExit::IoOut(io.port, data)),
-                    _ => unreachable!(),
+                match io.direction as u64 {
+                    kvm_sys::KVM_EXIT_IO_IN => Ok(KvmExit::IoIn(io.port, data)),
+                    kvm_sys::KVM_EXIT_IO_OUT => Ok(KvmExit::IoOut(io.port, data)),
+                    _ => unreachable!(),
                 }
             }
-            kvm_sys::KVM_EXIT_MMIO => {
-                // Safe to use union `mmio` filed, as Kernel instructed us to.
-                let mmio = unsafe { &mut kvm_run.inner.mmio };
-                let len = mmio.len as usize;
+            kvm_sys::KVM_EXIT_MMIO => {
+                // Safe to use union `mmio` filed, as Kernel instructed us to.
+                let mmio = unsafe { &mut kvm_run.inner.mmio };
+                let len = mmio.len as usize;
 
-                match mmio.is_write {
-                    0 => Ok(KvmExit::MmioRead(mmio.phys_addr, &mut mmio.data[..len])),
-                    1 => Ok(KvmExit::MmioWrite(mmio.phys_addr, &mmio.data[..len])),
-                    _ => unreachable!(),
+                match mmio.is_write {
+                    0 => Ok(KvmExit::MmioRead(mmio.phys_addr, &mut mmio.data[..len])),
+                    1 => Ok(KvmExit::MmioWrite(mmio.phys_addr, &mmio.data[..len])),
+                    _ => unreachable!(),
                 }
             }
-            kvm_sys::KVM_EXIT_DEBUG => {
-                // Safe to use union `debug` field, as Kernel instructed us to.
-                let debug = unsafe { kvm_run.inner.debug };
+            kvm_sys::KVM_EXIT_DEBUG => {
+                // Safe to use union `debug` field, as Kernel instructed us to.
+                let debug = unsafe { kvm_run.inner.debug };
 
-                Ok(KvmExit::Debug(debug.pc))
+                Ok(KvmExit::Debug(debug.pc))
             }
-            r @ _ => {
-                todo!("KVM_EXIT_... (exit_reason={}) not implemented!", r)
+            r @ _ => {
+                todo!("KVM_EXIT_... (exit_reason={}) not implemented!", r)
             }
         }
     }
 }
-
-
- \ No newline at end of file + \ No newline at end of file diff --git a/src/kvm_rs/vm.rs.html b/src/kvm_rs/vm.rs.html index 7e99ae1..f633afe 100644 --- a/src/kvm_rs/vm.rs.html +++ b/src/kvm_rs/vm.rs.html @@ -1,147 +1,139 @@ -vm.rs - source -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-
//! VM system ioctls.
+vm.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+
//! VM system ioctls.
 
-use std::fs;
-use std::io;
-use std::os::unix::io::FromRawFd;
+use std::fs;
+use std::io;
+use std::os::unix::io::FromRawFd;
 
-use crate::vcpu::Vcpu;
-use crate::{ioctl, kvm_sys, KvmRun, PhysAddr, UserMem};
+use crate::vcpu::Vcpu;
+use crate::{ioctl, kvm_sys, KvmRun, PhysAddr, UserMem};
 
-/// Wrapper for VM ioctls.
-///
-/// Representation of the file descriptor obtained by the [`KVM_CREATE_VM`][kvm-create-vm] ioctl.
-/// This wrapper provides access to the `VM ioctls` as described in [KVM API][kvm].
-///
-/// [kvm]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#general-description
-/// [kvm-create-vm]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-create-vm
-pub struct Vm {
-    vm: fs::File,
-    vcpu_mmap_size: usize,
+/// Wrapper for VM ioctls.
+///
+/// Representation of the file descriptor obtained by the [`KVM_CREATE_VM`][kvm-create-vm] ioctl.
+/// This wrapper provides access to the `VM ioctls` as described in [KVM API][kvm].
+///
+/// [kvm]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#general-description
+/// [kvm-create-vm]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-create-vm
+pub struct Vm {
+    vm: fs::File,
+    vcpu_mmap_size: usize,
 }
 
-impl Vm {
-    pub(crate) fn new(vm: fs::File, vcpu_mmap_size: usize) -> Vm {
-        Vm { vm, vcpu_mmap_size }
+impl Vm {
+    pub(crate) fn new(vm: fs::File, vcpu_mmap_size: usize) -> Vm {
+        Vm { vm, vcpu_mmap_size }
     }
 
-    /// Map memory from userspace into the VM as `guest physical` memory starting at address
-    /// `phys_addr`.
-    /// The underlying operation is the [`KVM_SET_USER_MEMORY_REGION`][kvm-set-user-memory-region]
-    /// ioctl.
-    ///
-    /// # Safety
-    ///
-    /// The `mem: &UserMem` argument passed to this function must at least live as long the `Vcpu`
-    /// instance.
-    ///
-    /// [kvm-set-user-memory-region]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-set-user-memory-region
-    pub unsafe fn set_user_memory_region(
+    /// Map memory from userspace into the VM as `guest physical` memory starting at address
+    /// `phys_addr`.
+    /// The underlying operation is the [`KVM_SET_USER_MEMORY_REGION`][kvm-set-user-memory-region]
+    /// ioctl.
+    ///
+    /// # Safety
+    ///
+    /// The `mem: &UserMem` argument passed to this function must at least live as long the `Vcpu`
+    /// instance.
+    ///
+    /// [kvm-set-user-memory-region]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-set-user-memory-region
+    pub unsafe fn set_user_memory_region(
         &self,
-        phys_addr: PhysAddr,
-        mem: &UserMem,
-    ) -> io::Result<()> {
-        // Create guest physical memory mapping for `slot : 0` at guest `phys_addr`.
-        let mut kvm_mem = kvm_sys::kvm_userspace_memory_region::default();
-        kvm_mem.userspace_addr = mem.ptr as u64;
-        kvm_mem.memory_size = mem.len as u64;
-        kvm_mem.guest_phys_addr = phys_addr.0;
+        phys_addr: PhysAddr,
+        mem: &UserMem,
+    ) -> io::Result<()> {
+        // Create guest physical memory mapping for `slot : 0` at guest `phys_addr`.
+        let mut kvm_mem = kvm_sys::kvm_userspace_memory_region::default();
+        kvm_mem.userspace_addr = mem.ptr as u64;
+        kvm_mem.memory_size = mem.len as u64;
+        kvm_mem.guest_phys_addr = phys_addr.0;
 
-        ioctl(
-            &self.vm,
-            kvm_sys::KVM_SET_USER_MEMORY_REGION,
-            &kvm_mem as *const _ as u64,
+        ioctl(
+            &self.vm,
+            kvm_sys::KVM_SET_USER_MEMORY_REGION,
+            &kvm_mem as *const _ as u64,
         )
-        .map(|_| ())
+        .map(|_| ())
     }
 
-    /// Create a new virtual cpu with the [`KVM_CREATE_VCPU`][kvm-create-vcpu] ioctl.
-    /// Returns a wrapper [`vcpu::Vcpu`][crate::vcpu::Vcpu] representing the VCPU.
-    ///
-    /// [kvm-create-vcpu]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-create-vcpu
-    pub fn create_vpcu(&self, id: u64) -> io::Result<Vcpu> {
-        let vcpu = ioctl(&self.vm, kvm_sys::KVM_CREATE_VCPU, id)
-            .map(|fd| unsafe { fs::File::from_raw_fd(fd) })?;
+    /// Create a new virtual cpu with the [`KVM_CREATE_VCPU`][kvm-create-vcpu] ioctl.
+    /// Returns a wrapper [`vcpu::Vcpu`][crate::vcpu::Vcpu] representing the VCPU.
+    ///
+    /// [kvm-create-vcpu]: https://www.kernel.org/doc/html/latest/virt/kvm/api.html#kvm-create-vcpu
+    pub fn create_vpcu(&self, id: u64) -> io::Result<Vcpu> {
+        let vcpu = ioctl(&self.vm, kvm_sys::KVM_CREATE_VCPU, id)
+            .map(|fd| unsafe { fs::File::from_raw_fd(fd) })?;
 
-        let kvm_run = KvmRun::new(&vcpu, self.vcpu_mmap_size)?;
+        let kvm_run = KvmRun::new(&vcpu, self.vcpu_mmap_size)?;
 
-        Ok(Vcpu::new(vcpu, kvm_run))
+        Ok(Vcpu::new(vcpu, kvm_run))
     }
 }
-
-
- \ No newline at end of file + \ No newline at end of file diff --git a/src/kvm_rs/x86_64.rs.html b/src/kvm_rs/x86_64.rs.html index abfd34f..fc55e05 100644 --- a/src/kvm_rs/x86_64.rs.html +++ b/src/kvm_rs/x86_64.rs.html @@ -1,333 +1,325 @@ -x86_64.rs - source -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-
//! `x86_64` flags and bitfields.
+x86_64.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+
//! `x86_64` flags and bitfields.
 
-pub use x86_64::*;
+pub use x86_64::*;
 
-#[rustfmt::skip]
-mod x86_64 {
-    /* Rflags Register */
+#[rustfmt::skip]
+mod x86_64 {
+    /* Rflags Register */
 
-    /// Carry flag.
-    pub const RFLAGS_CF: u64 = 1 << 0;
-    /// Parity flag.
-    pub const RFLAGS_PF: u64 = 1 << 2;
-    /// Adjust flag.
-    pub const RFLAGS_AF: u64 = 1 << 4;
-    /// Zero flag.
-    pub const RFLAGS_ZF: u64 = 1 << 6;
-    /// Sign flag.
-    pub const RFLAGS_SF: u64 = 1 << 7;
-    /// Trap flag.
-    pub const RFLAGS_TF: u64 = 1 << 8;
-    /// Sign flag.
-    pub const RFLAGS_IF: u64 = 1 << 9;
-    /// Direction flag.
-    pub const RFLAGS_DF: u64 = 1 << 10;
-    /// Overflow flag.
-    pub const RFLAGS_OF: u64 = 1 << 11;
-    /// I/O privilege level.
-    pub const RFLAGS_IOPL: u64 = 0b11 << 12;
-    /// Alignment check.
-    pub const RFLAGS_AC: u64 = 1 << 18;
+    /// Carry flag.
+    pub const RFLAGS_CF: u64 = 1 << 0;
+    /// Parity flag.
+    pub const RFLAGS_PF: u64 = 1 << 2;
+    /// Adjust flag.
+    pub const RFLAGS_AF: u64 = 1 << 4;
+    /// Zero flag.
+    pub const RFLAGS_ZF: u64 = 1 << 6;
+    /// Sign flag.
+    pub const RFLAGS_SF: u64 = 1 << 7;
+    /// Trap flag.
+    pub const RFLAGS_TF: u64 = 1 << 8;
+    /// Sign flag.
+    pub const RFLAGS_IF: u64 = 1 << 9;
+    /// Direction flag.
+    pub const RFLAGS_DF: u64 = 1 << 10;
+    /// Overflow flag.
+    pub const RFLAGS_OF: u64 = 1 << 11;
+    /// I/O privilege level.
+    pub const RFLAGS_IOPL: u64 = 0b11 << 12;
+    /// Alignment check.
+    pub const RFLAGS_AC: u64 = 1 << 18;
 
-    pub const fn rflags_cf(r: u64) -> u64   { (r & RFLAGS_CF)   >> 0 }
-    pub const fn rflags_pf(r: u64) -> u64   { (r & RFLAGS_PF)   >> 2 }
-    pub const fn rflags_af(r: u64) -> u64   { (r & RFLAGS_AF)   >> 4 }
-    pub const fn rflags_zf(r: u64) -> u64   { (r & RFLAGS_ZF)   >> 6 }
-    pub const fn rflags_sf(r: u64) -> u64   { (r & RFLAGS_SF)   >> 7 }
-    pub const fn rflags_tf(r: u64) -> u64   { (r & RFLAGS_TF)   >> 8 }
-    pub const fn rflags_if(r: u64) -> u64   { (r & RFLAGS_IF)   >> 9 }
-    pub const fn rflags_df(r: u64) -> u64   { (r & RFLAGS_DF)   >> 10 }
-    pub const fn rflags_of(r: u64) -> u64   { (r & RFLAGS_OF)   >> 11 }
-    pub const fn rflags_iopl(r: u64) -> u64 { (r & RFLAGS_IOPL) >> 12 }
-    pub const fn rflags_ac(r: u64) -> u64   { (r & RFLAGS_AC)   >> 18 }
+    pub const fn rflags_cf(r: u64) -> u64   { (r & RFLAGS_CF)   >> 0 }
+    pub const fn rflags_pf(r: u64) -> u64   { (r & RFLAGS_PF)   >> 2 }
+    pub const fn rflags_af(r: u64) -> u64   { (r & RFLAGS_AF)   >> 4 }
+    pub const fn rflags_zf(r: u64) -> u64   { (r & RFLAGS_ZF)   >> 6 }
+    pub const fn rflags_sf(r: u64) -> u64   { (r & RFLAGS_SF)   >> 7 }
+    pub const fn rflags_tf(r: u64) -> u64   { (r & RFLAGS_TF)   >> 8 }
+    pub const fn rflags_if(r: u64) -> u64   { (r & RFLAGS_IF)   >> 9 }
+    pub const fn rflags_df(r: u64) -> u64   { (r & RFLAGS_DF)   >> 10 }
+    pub const fn rflags_of(r: u64) -> u64   { (r & RFLAGS_OF)   >> 11 }
+    pub const fn rflags_iopl(r: u64) -> u64 { (r & RFLAGS_IOPL) >> 12 }
+    pub const fn rflags_ac(r: u64) -> u64   { (r & RFLAGS_AC)   >> 18 }
 
-    /* Segment Selector */
+    /* Segment Selector */
 
-    /// Requested privilege level.
-    ///
-    /// Privilege level of the segment selector, where `0` is the most privileged mode and `3` the
-    /// least.
-    pub const SEG_SELECTOR_RPL: u16 = 0b11 << 0;
-    /// Table indicator.
-    ///
-    /// | TI | Table |
-    /// |----|-------|
-    /// | 0  | GDT   |
-    /// | 1  | LDT   |
-    pub const SEG_SELECTOR_TI: u16 = 1 << 2;
-    /// Table index.
-    ///
-    /// Index into the `GDT` or `LDT` table to select the segment descriptor. `GDT.base + 8 * index`
-    /// gives the address of the segment descriptor (times `8` because every segment descriptor is `8
-    /// byte`).
-    pub const SEG_SELECTOR_INDEX: u16 = 0x1fff << 3;
+    /// Requested privilege level.
+    ///
+    /// Privilege level of the segment selector, where `0` is the most privileged mode and `3` the
+    /// least.
+    pub const SEG_SELECTOR_RPL: u16 = 0b11 << 0;
+    /// Table indicator.
+    ///
+    /// | TI | Table |
+    /// |----|-------|
+    /// | 0  | GDT   |
+    /// | 1  | LDT   |
+    pub const SEG_SELECTOR_TI: u16 = 1 << 2;
+    /// Table index.
+    ///
+    /// Index into the `GDT` or `LDT` table to select the segment descriptor. `GDT.base + 8 * index`
+    /// gives the address of the segment descriptor (times `8` because every segment descriptor is `8
+    /// byte`).
+    pub const SEG_SELECTOR_INDEX: u16 = 0x1fff << 3;
 
-    pub const fn seg_selector_rpl(s: u16) -> u16   { (s & SEG_SELECTOR_RPL)   >> 0 }
-    pub const fn seg_selector_ti(s: u16) -> u16    { (s & SEG_SELECTOR_TI)    >> 2 }
-    pub const fn seg_selector_index(s: u16) -> u16 { (s & SEG_SELECTOR_INDEX) >> 3 }
+    pub const fn seg_selector_rpl(s: u16) -> u16   { (s & SEG_SELECTOR_RPL)   >> 0 }
+    pub const fn seg_selector_ti(s: u16) -> u16    { (s & SEG_SELECTOR_TI)    >> 2 }
+    pub const fn seg_selector_index(s: u16) -> u16 { (s & SEG_SELECTOR_INDEX) >> 3 }
 
-    /* Control Register CR0 (operation mode & state of the processor) */
+    /* Control Register CR0 (operation mode & state of the processor) */
 
-    /// Protection Enable.
-    ///
-    /// Enables `protected mode` when set and `real-address mode` when cleared. This enables
-    /// `segment-level protection` not paging.
-    pub const CR0_PE: u64 = 1 << 0;
-    /// Monitor Coprocessor.
-    pub const CR0_MP: u64 = 1 << 1;
-    /// Emulation.
-    ///
-    /// When set indicates the process does not have a FPU. FPU instructions will generate an exception
-    /// that software can emulate the instruction.
-    pub const CR0_EM: u64 = 1 << 2;
-    /// Task Switched.
-    pub const CR0_TS: u64 = 1 << 3;
-    /// Extension Type.
-    pub const CR0_ET: u64 = 1 << 4;
-    /// Numeric Error.
-    pub const CR0_NE: u64 = 1 << 5;
-    /// Write Protect.
-    ///
-    /// When set supervisor-level procedures can't write to read-only pages.
-    pub const CR0_WP: u64 = 1 << 16;
-    /// Alignment Mask.
-    ///
-    /// Enables alignment check for `CPL=3`, check is only done if the [AC
-    /// bit](crate::x86_64::RFLAGS_AC) of the `rflags` register ist set.
-    pub const CR0_AM: u64 = 1 << 18;
-    /// Not Write-Torugh.
-    pub const CR0_NW: u64 = 1 << 29;
-    /// Cachine disable.
-    pub const CR0_CD: u64 = 1 << 30;
-    /// Paging.
-    ///
-    /// Enables paging when set, requires [CR0_PE](crate::x86_64::CR0_PE) to be set as well.
-    pub const CR0_PG: u64 = 1 << 31;
+    /// Protection Enable.
+    ///
+    /// Enables `protected mode` when set and `real-address mode` when cleared. This enables
+    /// `segment-level protection` not paging.
+    pub const CR0_PE: u64 = 1 << 0;
+    /// Monitor Coprocessor.
+    pub const CR0_MP: u64 = 1 << 1;
+    /// Emulation.
+    ///
+    /// When set indicates the process does not have a FPU. FPU instructions will generate an exception
+    /// that software can emulate the instruction.
+    pub const CR0_EM: u64 = 1 << 2;
+    /// Task Switched.
+    pub const CR0_TS: u64 = 1 << 3;
+    /// Extension Type.
+    pub const CR0_ET: u64 = 1 << 4;
+    /// Numeric Error.
+    pub const CR0_NE: u64 = 1 << 5;
+    /// Write Protect.
+    ///
+    /// When set supervisor-level procedures can't write to read-only pages.
+    pub const CR0_WP: u64 = 1 << 16;
+    /// Alignment Mask.
+    ///
+    /// Enables alignment check for `CPL=3`, check is only done if the [AC
+    /// bit](crate::x86_64::RFLAGS_AC) of the `rflags` register ist set.
+    pub const CR0_AM: u64 = 1 << 18;
+    /// Not Write-Torugh.
+    pub const CR0_NW: u64 = 1 << 29;
+    /// Cachine disable.
+    pub const CR0_CD: u64 = 1 << 30;
+    /// Paging.
+    ///
+    /// Enables paging when set, requires [CR0_PE](crate::x86_64::CR0_PE) to be set as well.
+    pub const CR0_PG: u64 = 1 << 31;
 
     /* Control Register CR3 (paging information)
      *
      * Holds the physical base address of the first paging structure. The 12 lower bytes of the base
      * address are assumed to be 0 and hence the first paging structure must be aligned to a 4K
      * boundary.
-     */
+     */
 
-    /// Mask for physical base address of paging structure.
-    pub const CR3_PAGE_BASE_MASK: u64 = 0xffff_ffff_ffff_0000;
+    /// Mask for physical base address of paging structure.
+    pub const CR3_PAGE_BASE_MASK: u64 = 0xffff_ffff_ffff_0000;
 
-    /// Page-level Write-Through.
-    pub const CR3_PWT: u64 = 1 << 3;
-    /// Page-level Cache Disable.
-    pub const CR3_PCD: u64 = 1 << 4;
+    /// Page-level Write-Through.
+    pub const CR3_PWT: u64 = 1 << 3;
+    /// Page-level Cache Disable.
+    pub const CR3_PCD: u64 = 1 << 4;
 
-    /* Control Register CR4 (flags for arch extenstions processor capabilities) */
+    /* Control Register CR4 (flags for arch extenstions processor capabilities) */
 
-    /// Physical Address Extenstion.
-    ///
-    /// When set enables paging to produce physicall addresses with more than 32 bits. Required before
-    /// entering `long mode`.
-    pub const CR4_PAE: u64 = 1 << 5;
-    /// 57-bit Linear Addresses.
-    ///
-    /// When set in `long mode` enables `5-level` paging to translate `57-bit` linear addresses. When
-    /// cleared use `4-level` paging to translate `48-bit` linear addresses.
-    pub const CR4_LA57: u64 = 1 << 5;
+    /// Physical Address Extenstion.
+    ///
+    /// When set enables paging to produce physicall addresses with more than 32 bits. Required before
+    /// entering `long mode`.
+    pub const CR4_PAE: u64 = 1 << 5;
+    /// 57-bit Linear Addresses.
+    ///
+    /// When set in `long mode` enables `5-level` paging to translate `57-bit` linear addresses. When
+    /// cleared use `4-level` paging to translate `48-bit` linear addresses.
+    pub const CR4_LA57: u64 = 1 << 5;
 
-    /* Extended Feature Enable Register (EFER) */
+    /* Extended Feature Enable Register (EFER) */
 
-    /// Extended Feature Enable Register MSR number.
-    ///
-    /// MSR number used with the [`rdmsr`][msr] and [`wrmsr`][msr] instructions to read/write the
-    /// `EFER` model specific register.
-    ///
-    /// [msr]: https://johannst.github.io/notes/arch/x86_64.html#model-specific-register-msr
-    pub const MSR_EFER: u64 = 0xc000_0080;
+    /// Extended Feature Enable Register MSR number.
+    ///
+    /// MSR number used with the [`rdmsr`][msr] and [`wrmsr`][msr] instructions to read/write the
+    /// `EFER` model specific register.
+    ///
+    /// [msr]: https://johannst.github.io/notes/arch/x86_64.html#model-specific-register-msr
+    pub const MSR_EFER: u64 = 0xc000_0080;
 
-    /// Long Mode Enable.
-    ///
-    /// When set enables long mode operations.
-    pub const EFER_LME: u64 = 1 << 8;
-    /// Long Mode Active (readonly).
-    ///
-    /// When set indicates long mode is active.
-    pub const EFER_LMA: u64 = 1 << 10;
+    /// Long Mode Enable.
+    ///
+    /// When set enables long mode operations.
+    pub const EFER_LME: u64 = 1 << 8;
+    /// Long Mode Active (readonly).
+    ///
+    /// When set indicates long mode is active.
+    pub const EFER_LMA: u64 = 1 << 10;
 
-    /* Paging */
+    /* Paging */
 
-    /// Page entry present.
-    pub const PAGE_ENTRY_PRESENT: u64 = 1 << 0;
-    /// Page region read/write.
-    ///
-    /// If set, region reference by paging entry is writeable.
-    pub const PAGE_ENTRY_RW: u64 = 1 << 1;
+    /// Page entry present.
+    pub const PAGE_ENTRY_PRESENT: u64 = 1 << 0;
+    /// Page region read/write.
+    ///
+    /// If set, region reference by paging entry is writeable.
+    pub const PAGE_ENTRY_RW: u64 = 1 << 1;
 }
-
-
- \ No newline at end of file + \ No newline at end of file diff --git a/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/static.files/COPYRIGHT-23e9bde6c69aea69.txt new file mode 100644 index 0000000..1447df7 --- /dev/null +++ b/static.files/COPYRIGHT-23e9bde6c69aea69.txt @@ -0,0 +1,50 @@ +# REUSE-IgnoreStart + +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.ttf.woff2, + SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, + SourceSerif4-It.ttf.woff2): + + 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. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerif4-LICENSE.md. + +This copyright file is intended to be distributed with rustdoc output. + +# REUSE-IgnoreEnd diff --git a/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/static.files/FiraSans-LICENSE-db4b642586e02d97.txt new file mode 100644 index 0000000..d7e9c14 --- /dev/null +++ b/static.files/FiraSans-LICENSE-db4b642586e02d97.txt @@ -0,0 +1,98 @@ +// REUSE-IgnoreStart + +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 new file mode 100644 index 0000000..7a1e5fc Binary files /dev/null and b/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 differ diff --git a/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 new file mode 100644 index 0000000..e766e06 Binary files /dev/null and b/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 differ diff --git a/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt new file mode 100644 index 0000000..16fe87b --- /dev/null +++ b/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static.files/LICENSE-MIT-65090b722b3f6c56.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/static.files/LICENSE-MIT-65090b722b3f6c56.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 new file mode 100644 index 0000000..1866ad4 Binary files /dev/null and b/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 differ diff --git a/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt new file mode 100644 index 0000000..4b3edc2 --- /dev/null +++ b/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt @@ -0,0 +1,103 @@ +// REUSE-IgnoreStart + +Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), + +with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, +NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, +Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, +NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, +Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 new file mode 100644 index 0000000..462c34e Binary files /dev/null and b/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 differ diff --git a/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt new file mode 100644 index 0000000..0d2941e --- /dev/null +++ b/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt @@ -0,0 +1,97 @@ +// REUSE-IgnoreStart + +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 new file mode 100644 index 0000000..10b558e Binary files /dev/null and b/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 differ diff --git a/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 new file mode 100644 index 0000000..5ec64ee Binary files /dev/null and b/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 differ diff --git a/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 new file mode 100644 index 0000000..181a07f Binary files /dev/null and b/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 differ diff --git a/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 new file mode 100644 index 0000000..2ae08a7 Binary files /dev/null and b/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 differ diff --git a/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md new file mode 100644 index 0000000..175fa4f --- /dev/null +++ b/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md @@ -0,0 +1,98 @@ + + +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. +Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + + diff --git a/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 new file mode 100644 index 0000000..0263fc3 Binary files /dev/null and b/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 differ diff --git a/static.files/ayu-fd19013d6ce078bf.css b/static.files/ayu-fd19013d6ce078bf.css new file mode 100644 index 0000000..ba3aa60 --- /dev/null +++ b/static.files/ayu-fd19013d6ce078bf.css @@ -0,0 +1 @@ + :root{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-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);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:rgb(91,59,1);--scrape-example-code-line-highlight-focus:rgb(124,75,15);--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);}h1,h2,h3,h4,h1 a,.sidebar h2 a,.sidebar h3 a,#src-sidebar>.title{color:#fff;}h4{border:none;}.docblock code{color:#ffb454;}.docblock a>code{color:#39AFD7 !important;}.code-header,.docblock pre>code,pre,pre>code,.item-info code,.rustdoc.src .example-wrap{color:#e6e1cf;}.sidebar .current,.sidebar a:hover,#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus,#src-sidebar div.files>a.selected{color:#ffb44c;}.sidebar-elems .location{color:#ff7733;}.src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}.search-results a:hover,.search-results a:focus{color:#fff !important;background-color:#3c3c3c;}.search-results a{color:#0096cf;}.search-results a div.desc{color:#c5c5c5;}.result-name .primitive>i,.result-name .keyword>i{color:#788797;}#search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}#search-tabs>button:not(.selected){border:none;background-color:transparent !important;}#search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#settings-menu>a img{filter:invert(100);} \ No newline at end of file diff --git a/static.files/clipboard-7571035ce49a181d.svg b/static.files/clipboard-7571035ce49a181d.svg new file mode 100644 index 0000000..8adbd99 --- /dev/null +++ b/static.files/clipboard-7571035ce49a181d.svg @@ -0,0 +1 @@ + diff --git a/static.files/dark-0a43001d3fc2282c.css b/static.files/dark-0a43001d3fc2282c.css new file mode 100644 index 0000000..81032b2 --- /dev/null +++ b/static.files/dark-0a43001d3fc2282c.css @@ -0,0 +1 @@ +:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-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);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2A2A2A;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:rgb(91,59,1);--scrape-example-code-line-highlight-focus:rgb(124,75,15);--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);} \ No newline at end of file diff --git a/static.files/favicon-16x16-8b506e7a72182f1c.png b/static.files/favicon-16x16-8b506e7a72182f1c.png new file mode 100644 index 0000000..ea4b45c Binary files /dev/null and b/static.files/favicon-16x16-8b506e7a72182f1c.png differ diff --git a/static.files/favicon-2c020d218678b618.svg b/static.files/favicon-2c020d218678b618.svg new file mode 100644 index 0000000..8b34b51 --- /dev/null +++ b/static.files/favicon-2c020d218678b618.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/static.files/favicon-32x32-422f7d1d52889060.png b/static.files/favicon-32x32-422f7d1d52889060.png new file mode 100644 index 0000000..69b8613 Binary files /dev/null and b/static.files/favicon-32x32-422f7d1d52889060.png differ diff --git a/static.files/light-1596385f77d47ef2.css b/static.files/light-1596385f77d47ef2.css new file mode 100644 index 0000000..50adde5 --- /dev/null +++ b/static.files/light-1596385f77d47ef2.css @@ -0,0 +1 @@ +:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#F5F5F5;--sidebar-background-color-hover:#E0E0E0;--code-block-background-color:#F5F5F5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#ffffff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#F5F5F5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);} \ No newline at end of file diff --git a/static.files/main-0795b7d26be81095.js b/static.files/main-0795b7d26be81095.js new file mode 100644 index 0000000..87b4338 --- /dev/null +++ b/static.files/main-0795b7d26be81095.js @@ -0,0 +1,12 @@ +"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function elemIsInParent(elem,parent){while(elem&&elem!==document.body){if(elem===parent){return true}elem=elem.parentElement}return false}function blurHandler(event,parentElem,hideCallback){if(!elemIsInParent(document.activeElement,parentElem)&&!elemIsInParent(event.relatedTarget,parentElem)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileLocationTitle=document.querySelector(".mobile-topbar h2");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileLocationTitle&&locationTitle){mobileLocationTitle.innerHTML=locationTitle.innerHTML}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function loadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="stylesheet";document.getElementsByTagName("head")[0].appendChild(link)}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadCss(getVar("static-root-path")+getVar("settings-css"));loadScript(getVar("static-root-path")+getVar("settings-js"));preLoadCss(getVar("static-root-path")+getVar("theme-light-css"));preLoadCss(getVar("static-root-path")+getVar("theme-dark-css"));preLoadCss(getVar("static-root-path")+getVar("theme-ayu-css"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}}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 handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=name+"/index.html"}else{path=shortty+"."+name+".html"}const current_page=document.location.href.split("/").pop();const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("union","unions","Unions");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Definitions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","));for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";if(window.rootPath!=="./"&&crate===window.currentCrate){link.className="current"}link.textContent=crate;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px")}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=function(ev){if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=function(ev){if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,e)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=function(){this.TOOLTIP_FORCE_VISIBLE=this.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!this.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(this);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=function(ev){if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(this,true)};e.onpointermove=function(ev){if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(this,true)};e.onpointerleave=function(ev){if(ev.pointerType!=="mouse"){return}if(!this.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","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(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

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

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=function(switchFocus){hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=function(){onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const 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";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,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)}}()) \ No newline at end of file diff --git a/static.files/normalize-76eba96aa4d2e634.css b/static.files/normalize-76eba96aa4d2e634.css new file mode 100644 index 0000000..469959f --- /dev/null +++ b/static.files/normalize-76eba96aa4d2e634.css @@ -0,0 +1,2 @@ + /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ +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} \ No newline at end of file diff --git a/static.files/noscript-cffde32267a19fd6.css b/static.files/noscript-cffde32267a19fd6.css new file mode 100644 index 0000000..12d3f6d --- /dev/null +++ b/static.files/noscript-cffde32267a19fd6.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;} \ No newline at end of file diff --git a/static.files/rust-logo-151179464ae7ed46.svg b/static.files/rust-logo-151179464ae7ed46.svg new file mode 100644 index 0000000..62424d8 --- /dev/null +++ b/static.files/rust-logo-151179464ae7ed46.svg @@ -0,0 +1,61 @@ + + + diff --git a/static.files/rustdoc-cb6f1f67f1bcd037.css b/static.files/rustdoc-cb6f1f67f1bcd037.css new file mode 100644 index 0000000..ac78724 --- /dev/null +++ b/static.files/rustdoc-cb6f1f67f1bcd037.css @@ -0,0 +1,8 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.small-section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p{margin:0 0 .75em 0;}p:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.sub-logo-container,.logo-container{line-height:0;display:block;}.sub-logo-container{margin-right:32px;}.sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 200px;overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;}.rustdoc.src .sidebar{flex-basis:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;z-index:1;}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}#src-sidebar-toggle>button:hover,#src-sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.src .sidebar>*:not(#src-sidebar-toggle){visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:300px;}.src-sidebar-expanded .src .sidebar>*:not(#src-sidebar-toggle){visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.sidebar .logo-container{margin-top:10px;margin-bottom:10px;text-align:center;}.version{overflow-wrap:break-word;}.logo-container>img{height:100px;width:100px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}.method .where,.fn .where,.where.fmt-newline{display:block;white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.small-section-header{display:block;position:relative;}.small-section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block a.current{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:2;margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{min-height:36px;display:flex;padding:3px;margin-bottom:5px;align-items:center;vertical-align:text-bottom;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji{font-size:1.25rem;margin-right:0.3rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar-toggle{position:sticky;top:0;left:0;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:stretch;align-items:stretch;z-index:10;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid var(--border-color);margin-bottom:6px;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}#src-sidebar-toggle>button{font-size:inherit;font-weight:bold;background:none;color:inherit;text-align:center;border:none;outline:none;flex:1 1;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;display:flex;}#settings-menu>a,#help-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus{border-color:var(--settings-button-border-focus);}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;margin-left:10px;padding:0;padding-left:2px;border:0;width:33px;}#copy-path>img{filter:var(--copy-path-img-filter);}#copy-path:hover>img{filter:var(--copy-path-img-hover-filter);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;}.mobile-topbar h2 a{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;color:var(--main-color);}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#search-tabs .count{display:block;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#src-sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;border:1px solid;border-left:0;}.src-sidebar-expanded #src-sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}#copy-path,#help-button{display:none;}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{max-width:100vw;width:100vw;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}.sub-logo-container>img{height:35px;width:35px;margin-bottom:var(--nav-sub-mobile-padding);}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;} \ No newline at end of file diff --git a/static.files/scrape-examples-ef1e698c1d417c0c.js b/static.files/scrape-examples-ef1e698c1d417c0c.js new file mode 100644 index 0000000..ba830e3 --- /dev/null +++ b/static.files/scrape-examples-ef1e698c1d417c0c.js @@ -0,0 +1 @@ +"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelector(".src-line-numbers");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines.children[line].offsetTop}else{const wrapper=elt.querySelector(".code-wrapper");const halfHeight=wrapper.offsetHeight/2;const offsetTop=lines.children[loc[0]].offsetTop;const lastLine=lines.children[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function updateScrapedExample(example,isHidden){const locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");if(locs.length>1){const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};example.querySelector(".prev").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});example.querySelector(".next").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}const expandButton=example.querySelector(".expand");if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded")}})}scrollToLoc(example,locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>updateScrapedExample(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>updateScrapedExample(el,true))})},{once:true})})})() \ No newline at end of file diff --git a/static.files/search-6dfdfced5eff6596.js b/static.files/search-6dfdfced5eff6596.js new file mode 100644 index 0000000..90d0eb7 --- /dev/null +++ b/static.files/search-6dfdfced5eff6596.js @@ -0,0 +1,5 @@ +"use strict";(function(){const 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",];const longItemTypes=["module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","primitive type","assoc type","constant","assoc const","union","foreign type","keyword","existential type","attribute macro","derive macro","trait alias",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_KEYWORD=itemTypes.indexOf("keyword");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let currentResults;let typeNameIdMap;const ALIASES=new Map();let typeNameIdOfArray;let typeNameIdOfSlice;let typeNameIdOfArrayOrSlice;function buildTypeMapIndex(name){if(name===""||name===null){return-1}if(typeNameIdMap.has(name)){return typeNameIdMap.get(name)}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,id);return id}}function isWhitespace(c){return" \t\n\r".indexOf(c)!==-1}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return",>-]".indexOf(c)!==-1}function isStopCharacter(c){return isEndCharacter(c)}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","}function isPathSeparator(c){return c===":"||isWhitespace(c)}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(!isWhitespace(c)){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}return{name:"never",id:-1,fullPath:["never"],pathWithoutLast:[],pathLast:"never",generics:[],typeFilter:"primitive",}}if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(path.includes("::::")){throw["Unexpected ","::::"]}else if(path.includes(" ::")){throw["Unexpected "," ::"]}else if(path.includes(":: ")){throw["Unexpected ",":: "]}const pathSegments=path.split(/::|\s+/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}return{name:name.trim(),id:-1,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast:pathSegments[pathSegments.length-1],generics:generics,typeFilter,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let start=parserState.pos;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",","," or ",endChar,...extra,", found ",c,]}throw["Expected ",",",...extra,", found ",c,]}const posBefore=parserState.pos;start=parserState.pos;getNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;parserState.typeFilter=oldTypeFilter}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;let start=parserState.pos;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}throw["Unexpected ",c]}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}else if(query.elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=query.elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;foundStopChar=true;continue}else if(isWhitespace(c)){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;start=parserState.pos;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,literalSearch:false,error:null,correction:null,}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}}userQuery=userQuery.trim();const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,searchWords,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id>-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}duplicates.add(obj.fullPath);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){if(results.size===0){return[]}const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.word=searchWords[result.id];result.item=searchIndex[result.id]||{};result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=aaa.item.deprecated;b=bbb.item.deprecated;if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}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});let nameSplit=null;if(parsedQuery.elems.length===1){const hasPath=typeof parsedQuery.elems[0].path==="undefined";nameSplit=hasPath?null:parsedQuery.elems[0].path}for(const result of result_list){if(result.dontValidate){continue}const name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,nameSplit,parent)){result.id=-1}}return transformResults(result_list)}function checkGenerics(fnType,queryElem){return unifyFunctionTypes(fnType.generics,queryElem.generics)}function unifyFunctionTypes(fnTypes,queryElems){if(queryElems.length===0){return true}if(!fnTypes||fnTypes.length===0){return false}const queryElemSet=new Map();const addQueryElemToQueryElemSet=function addQueryElemToQueryElemSet(queryElem){let currentQueryElemList;if(queryElemSet.has(queryElem.id)){currentQueryElemList=queryElemSet.get(queryElem.id)}else{currentQueryElemList=[];queryElemSet.set(queryElem.id,currentQueryElemList)}currentQueryElemList.push(queryElem)};for(const queryElem of queryElems){addQueryElemToQueryElemSet(queryElem)}const fnTypeSet=new Map();const addFnTypeToFnTypeSet=function addFnTypeToFnTypeSet(fnType){const queryContainsArrayOrSliceElem=queryElemSet.has(typeNameIdOfArrayOrSlice);if(fnType.id===-1||!(queryElemSet.has(fnType.id)||(fnType.id===typeNameIdOfSlice&&queryContainsArrayOrSliceElem)||(fnType.id===typeNameIdOfArray&&queryContainsArrayOrSliceElem))){for(const innerFnType of fnType.generics){addFnTypeToFnTypeSet(innerFnType)}return}let currentQueryElemList=queryElemSet.get(fnType.id)||[];let matchIdx=currentQueryElemList.findIndex(queryElem=>{return typePassesFilter(queryElem.typeFilter,fnType.ty)&&checkGenerics(fnType,queryElem)});if(matchIdx===-1&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)&&queryContainsArrayOrSliceElem){currentQueryElemList=queryElemSet.get(typeNameIdOfArrayOrSlice)||[];matchIdx=currentQueryElemList.findIndex(queryElem=>{return typePassesFilter(queryElem.typeFilter,fnType.ty)&&checkGenerics(fnType,queryElem)})}if(matchIdx===-1){for(const innerFnType of fnType.generics){addFnTypeToFnTypeSet(innerFnType)}return}let currentFnTypeList;if(fnTypeSet.has(fnType.id)){currentFnTypeList=fnTypeSet.get(fnType.id)}else{currentFnTypeList=[];fnTypeSet.set(fnType.id,currentFnTypeList)}currentFnTypeList.push(fnType)};for(const fnType of fnTypes){addFnTypeToFnTypeSet(fnType)}const doHandleQueryElemList=(currentFnTypeList,queryElemList)=>{if(queryElemList.length===0){return true}const queryElem=queryElemList.pop();const l=currentFnTypeList.length;for(let i=0;i{if(!fnTypeSet.has(id)){if(id===typeNameIdOfArrayOrSlice){return handleQueryElemList(typeNameIdOfSlice,queryElemList)||handleQueryElemList(typeNameIdOfArray,queryElemList)}return false}const currentFnTypeList=fnTypeSet.get(id);if(currentFnTypeList.length0?checkIfInList(row.generics,elem):false}const matchesExact=row.id===elem.id;const matchesArrayOrSlice=elem.id===typeNameIdOfArrayOrSlice&&(row.id===typeNameIdOfSlice||row.id===typeNameIdOfArray);if((matchesExact||matchesArrayOrSlice)&&typePassesFilter(elem.typeFilter,row.ty)){if(elem.generics.length>0){return checkGenerics(row,elem)}return true}return checkIfInList(row.generics,elem)}function checkPath(contains,ty,maxEditDistance){if(contains.length===0){return 0}let ret_dist=maxEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;if(clength>length){return maxEditDistance+1}for(let i=0;ilength){break}let dist_total=0;let aborted=false;for(let x=0;xmaxEditDistance){aborted=true;break}dist_total+=dist}if(!aborted){ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}}return ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const 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,deprecated:item.deprecated,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){const inBounds=dist<=maxEditDistance||index!==-1;if(dist===0||(!parsedQuery.literalSearch&&inBounds)){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let index=-1,path_dist=0;const fullId=row.id;const searchWord=searchWords[pos];const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem);if(in_args){addIntoResults(results_in_args,fullId,pos,-1,0,0,maxEditDistance)}const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem);if(returned){addIntoResults(results_returned,fullId,pos,-1,0,0,maxEditDistance)}if(!typePassesFilter(elem.typeFilter,row.ty)){return}const row_index=row.normalizedName.indexOf(elem.pathLast);const word_index=searchWord.indexOf(elem.pathLast);if(row_index===-1){index=word_index}else if(word_index===-1){index=row_index}else if(word_index1){path_dist=checkPath(elem.pathWithoutLast,row,maxEditDistance);if(path_dist>maxEditDistance){return}}if(parsedQuery.literalSearch){if(searchWord===elem.name){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(searchWord,elem.pathLast,maxEditDistance);if(index===-1&&dist+path_dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems)){return}if(!unifyFunctionTypes(row.type.output,parsedQuery.returned)){return}addIntoResults(results,row.id,pos,0,0,0,Number.MAX_VALUE)}function innerRunQuery(){let elem,i,nSearchWords,in_returned,row;let queryLen=0;for(const elem of parsedQuery.elems){queryLen+=elem.name.length}for(const elem of parsedQuery.returned){queryLen+=elem.name.length}const maxEditDistance=Math.floor(queryLen/3);function convertNameToId(elem){if(typeNameIdMap.has(elem.name)){elem.id=typeNameIdMap.get(elem.name)}else if(!parsedQuery.literalSearch){let match=-1;let matchDist=maxEditDistance+1;let matchName="";for(const[name,id]of typeNameIdMap){const dist=editDistance(name,elem.name,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==-1){parsedQuery.correction=matchName}elem.id=match}for(const elem2 of elem.generics){convertNameToId(elem2)}}for(const elem of parsedQuery.elems){convertNameToId(elem)}for(const elem of parsedQuery.returned){convertNameToId(elem)}if(parsedQuery.foundElems===1){if(parsedQuery.elems.length===1){elem=parsedQuery.elems[0];for(i=0,nSearchWords=searchWords.length;i0){for(i=0,nSearchWords=searchWords.length;i-1||path.indexOf(key)>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(key)>-1)||editDistance(name,key,maxEditDistance)<=maxEditDistance)){return false}}return true}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor="#"+type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const 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=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){let extraClass="";if(display===true){extraClass=" active"}const output=document.createElement("div");let length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";length+=1;const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)})}else if(query.error===null){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,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let 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}}let crates="";const crates_list=Object.keys(rawSearchIndex);if(crates_list.length>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}const 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;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}function search(e,forced){if(e){e.preventDefault()}const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));showResults(execQuery(query,searchWords,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;return types.map(type=>{let pathIndex,generics;if(typeof type==="number"){pathIndex=type;generics=[]}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths)}return{id:pathIndex===0?-1:buildTypeMapIndex(lowercasePaths[pathIndex-1].name),ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:generics,}})}function buildFunctionSearchType(functionSearchType,lowercasePaths){const INPUTS_DATA=0;const OUTPUT_DATA=1;if(functionSearchType===0){return null}let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){const pathIndex=functionSearchType[INPUTS_DATA];inputs=[{id:pathIndex===0?-1:buildTypeMapIndex(lowercasePaths[pathIndex-1].name),ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:[],}]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){const pathIndex=functionSearchType[OUTPUT_DATA];output=[{id:pathIndex===0?-1:buildTypeMapIndex(lowercasePaths[pathIndex-1].name),ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:[],}]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}return{inputs,output,}}function buildIndex(rawSearchIndex){searchIndex=[];const searchWords=[];typeNameIdMap=new Map();const charA="A".charCodeAt(0);let currentIndex=0;let id=0;typeNameIdOfArray=buildTypeMapIndex("array");typeNameIdOfSlice=buildTypeMapIndex("slice");typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");for(const crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}let crateSize=0;const crateCorpus=rawSearchIndex[crate];searchWords.push(crate);const crateRow={crate:crate,ty:1,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),deprecated:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemDescs=crateCorpus.d;const itemParentIdxs=crateCorpus.i;const itemFunctionSearchTypes=crateCorpus.f;const deprecatedItems=new Set(crateCorpus.c);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];let len=paths.length;for(let i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:buildFunctionSearchType(itemFunctionSearchTypes[i],lowercasePaths),id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),deprecated:deprecatedItems.has(i),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=crateSize}return searchWords}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(undefined,true)}const searchWords=buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}return searchWords}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch({})}})() \ No newline at end of file diff --git a/static.files/settings-8c76f75bfb6bd192.css b/static.files/settings-8c76f75bfb6bd192.css new file mode 100644 index 0000000..5241bb8 --- /dev/null +++ b/static.files/settings-8c76f75bfb6bd192.css @@ -0,0 +1,3 @@ +.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;} \ No newline at end of file diff --git a/static.files/settings-de11bff964e9d4e5.js b/static.files/settings-de11bff964e9d4e5.js new file mode 100644 index 0000000..cc508a8 --- /dev/null +++ b/static.files/settings-de11bff964e9d4e5.js @@ -0,0 +1,17 @@ +"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
+
${setting_name}
+
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `});output+=`\ +
+
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
\ + \ +
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display=""}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=function(event){event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=function(event){if(elemIsInParent(event.target,settingsMenu)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static.files/src-script-3280b574d94e47b4.js b/static.files/src-script-3280b574d94e47b4.js new file mode 100644 index 0000000..9ea8892 --- /dev/null +++ b/static.files/src-script-3280b574d94e47b4.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth"){addClass(document.documentElement,"src-sidebar-expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{removeClass(document.documentElement,"src-sidebar-expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="src-sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(srcIndex).forEach(key=>{srcIndex[key][NAME_OFFSET]=key;hasFoundFile=createDirEntry(srcIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSrcLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const 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",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSrcLines(match)}});onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static.files/storage-db41da1a38ea3cb8.js b/static.files/storage-db41da1a38ea3cb8.js new file mode 100644 index 0000000..b872813 --- /dev/null +++ b/static.files/storage-db41da1a38ea3cb8.js @@ -0,0 +1 @@ +"use strict";const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func,reversed){if(arr&&arr.length>0){if(reversed){for(let i=arr.length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}let newHref;if(newThemeName==="light"||newThemeName==="dark"||newThemeName==="ayu"){newHref=getVar("static-root-path")+getVar("theme-"+newThemeName+"-css")}else{newHref=getVar("root-path")+newThemeName+getVar("resource-suffix")+".css"}if(!window.currentTheme){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0)}}) \ No newline at end of file diff --git a/static.files/wheel-7b819b6101059cd0.svg b/static.files/wheel-7b819b6101059cd0.svg new file mode 100644 index 0000000..83c07f6 --- /dev/null +++ b/static.files/wheel-7b819b6101059cd0.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/storage.js b/storage.js deleted file mode 100644 index ad14b2a..0000000 --- a/storage.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");window.mainTheme=document.getElementById("mainThemeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");if(settingsElement===null){return null}const dataset=settingsElement.dataset;if(dataset===undefined){return null}return dataset})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current!==null){return current}if(settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return null}const localStoredTheme=getSettingValue("theme");const 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){if(reversed){const length=arr.length;for(let i=length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){const newHref=mainStyleElem.href.replace(/\/rustdoc([^/]*)\.css/,"/"+newTheme+"$1"+".css");if(saveTheme){updateLocalStorage("theme",newTheme)}if(styleElem.href===newHref){return}let found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),el=>{savedHref.push(el.href)})}onEach(savedHref,el=>{if(el===newHref){found=true;return true}});if(found){styleElem.href=newHref}}function useSystemTheme(value){if(value===undefined){value=true}updateLocalStorage("use-system-theme",value);const toggle=document.getElementById("use-system-theme");if(toggle&&toggle instanceof HTMLInputElement){toggle.checked=value}}const updateSystemTheme=(function(){if(!window.matchMedia){return()=>{const cssTheme=getComputedStyle(document.documentElement).getPropertyValue("content");switchTheme(window.currentTheme,window.mainTheme,JSON.parse(cssTheme)||"light",true)}}const mql=window.matchMedia("(prefers-color-scheme: dark)");function handlePreferenceChange(mql){const use=theme=>{switchTheme(window.currentTheme,window.mainTheme,theme,true)};if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";if(mql.matches){use(darkTheme)}else{use(lightTheme)}}else{use(getSettingValue("theme"))}}mql.addListener(handlePreferenceChange);return()=>{handlePreferenceChange(mql)}})();function switchToSavedTheme(){switchTheme(window.currentTheme,window.mainTheme,getSettingValue("theme")||"light",false)}if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}updateSystemTheme()}else{switchToSavedTheme()}if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"source-sidebar-expanded")}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(switchToSavedTheme,0)}}) \ No newline at end of file diff --git a/toggle-minus.svg b/toggle-minus.svg deleted file mode 100644 index 7315478..0000000 --- a/toggle-minus.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/toggle-plus.svg b/toggle-plus.svg deleted file mode 100644 index 08b1703..0000000 --- a/toggle-plus.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wheel.svg b/wheel.svg deleted file mode 100644 index 01da3b2..0000000 --- a/wheel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file -- cgit v1.2.3